Skip to content

Commit

Permalink
Merge pull request #20 from napalm-automation-community/develop
Browse files Browse the repository at this point in the history
Release 3.0.1
  • Loading branch information
bewing authored Mar 5, 2021
2 parents 4c4f078 + 04e9a2d commit effb3d9
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 36 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: build
on: [push, pull_request]
jobs:
test:
name: Lint and test
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
python -m pip install -e .
- name: Run black
run: |
black --check .
- name: Run linter
run: |
pylava .
- name: Run Tests
run: |
py.test --cov=napalm --cov-report term-missing -vs
release:
name: Build wheels and upload
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
- name: Build wheel
run: |
python setup.py bdist_wheel --universal --build-number $GITHUB_RUN_NUMBER
- name: Upload to test
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Upload Pypi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![PyPI](https://img.shields.io/pypi/v/napalm-mos.svg)](https://pypi.python.org/pypi/napalm-mos)
[![Build Status](https://travis-ci.org/napalm-automation-community/napalm-mos.svg?branch=master)](https://travis-ci.org/napalm-automation-community/napalm-mos)
[![Coverage Status](https://coveralls.io/repos/github/napalm-automation-community/napalm-mos/badge.svg?branch=master)](https://coveralls.io/github/napalm-automation-community/napalm-mos)


Expand Down
2 changes: 1 addition & 1 deletion napalm_mos/mos.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def get_ntp_stats(self):
r"^\s?(\+|\*|x|-)?([a-zA-Z0-9\.+-:]+)"
r"\s+([a-zA-Z0-9\.]+)\s+([0-9]{1,2})"
r"\s+(-|u)\s+([0-9h-]+)\s+([0-9]+)"
r"\s+([0-9]+)\s+([0-9\.]+)\s+([0-9\.-]+)"
r"\s+([0-9]+)\s+([0-9\.]+)\s+([\+0-9\.-]+)"
r"\s+([0-9\.]+)\s?$"
)

Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
black==18.9b0;python_version>="3.6"
black
pytest
pytest-cov
pytest-json
pytest-pythonpath
pylama
pylava
flake8-import-order
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[pylama]
[pylava]
linters = mccabe,pep8,pyflakes
ignore = D203,C901
skip = build/*,.tox/*

[pylama:pep8]
[pylava:pep8]
max_line_length = 100

[tool:pytest]
addopts = --cov=napalm_mos --cov-report term-missing -vs --pylama
addopts = --cov=napalm_mos --cov-report term-missing -vs --pylava
json_report = report.json
jsonapi = true

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="napalm-mos",
version="3.0.0",
version="3.0.1",
packages=find_packages(),
author="Benny Holmgren, Brandon Ewing",
author_email="[email protected], [email protected]",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"referenceid": ".GPS.", "remote": "192.0.2.1", "synchronized": false, "hostpoll": 64, "stratum": 1, "when": "17", "delay": 0.343, "reachability": 1, "offset": 0.004, "jitter": 0.0, "type": "u"}, {"referenceid": ".MRS.", "remote": "192.0.2.2", "synchronized": false, "hostpoll": 64, "stratum": 1, "when": "1", "delay": 14.541, "reachability": 1, "offset": -0.001, "jitter": 0.0, "type": "u"}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
remote refid st t when poll reach delay offset jitter
==============================================================================
192.0.2.1 .GPS. 1 u 17 64 1 0.343 +0.004 0.000
192.0.2.2 .MRS. 1 u 1 64 1 14.541 -0.001 0.000

0 comments on commit effb3d9

Please sign in to comment.