Skip to content

Commit

Permalink
Prepare Release (#63)
Browse files Browse the repository at this point in the history
* 2021.07.30 release; scraplicfg support, cleanup
  • Loading branch information
carlmontanari authored Jul 30, 2021
1 parent 6d0c79f commit 8ace891
Show file tree
Hide file tree
Showing 74 changed files with 1,433 additions and 265 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ updates:
interval: "weekly"
day: "sunday"
timezone: "PST8PDT"
time: "07:00"
time: "03:00"
target-branch: "develop"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
timezone: "PST8PDT"
time: "07:00"
time: "03:00"
target-branch: "develop"
21 changes: 17 additions & 4 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
build_posix:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 9
max-parallel: 12
matrix:
os: [ubuntu-latest, macos-latest]
version: [3.6, 3.7, 3.8, 3.9]
version: [3.6, 3.7, 3.8, 3.9, 3.10.0-beta.4]
steps:
- uses: actions/checkout@v2
- name: set up python ${{ matrix.version }}
Expand All @@ -42,8 +42,8 @@ jobs:
# version we are targeting with nox, while still having versions like 3.9.0a4
run: |
echo "FRIENDLY_PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" >> $GITHUB_ENV
- name: install libxml2 and libxslt seems to only be needed for 3.9 image for some reason
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.9'
- name: install libxml2 and libxslt seems to only be needed for 3.9+ image for some reason
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.9' || matrix.os == 'ubuntu-latest' && matrix.version == '3.10.0-beta.4'
run: |
sudo apt install libxml2-dev
sudo apt install libxslt-dev
Expand All @@ -53,4 +53,17 @@ jobs:
python -m pip install setuptools
python -m pip install nox
- name: run nox
env:
# needed to make the terminal a tty (i think? without this system ssh is super broken)
TERM: xterm
run: python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"

docs-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: docker run -v $(pwd):/docs --entrypoint "" squidfunk/mkdocs-material:latest ash -c 'pip install mdx_gh_links && mkdocs build --clean --strict'
- name: htmltest
run: |
curl https://htmltest.wjdp.uk | bash
./bin/htmltest -c docs/htmltest.yml
6 changes: 6 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ jobs:
run: |
python setup.py sdist bdist_wheel
python -m twine upload dist/*
- name: create release branch
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: ${{ github.event.release.tag_name }}
18 changes: 10 additions & 8 deletions .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Weekly Build

on:
schedule:
# weekly at 0700 PST/1400 UTC on Sunday
- cron: '0 14 * * 0'
# weekly at 0300 PST/1000 UTC on Sunday
- cron: '0 10 * * 0'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -31,10 +31,10 @@ jobs:
build_posix:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 9
max-parallel: 12
matrix:
os: [ubuntu-latest, macos-latest]
version: [3.6, 3.7, 3.8, 3.9]
version: [3.6, 3.7, 3.8, 3.9, 3.10.0-beta.4]
steps:
- uses: actions/checkout@v2
- name: set up python ${{ matrix.version }}
Expand All @@ -46,8 +46,8 @@ jobs:
# version we are targeting with nox, while still having versions like 3.9.0a4
run: |
echo "FRIENDLY_PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" >> $GITHUB_ENV
- name: install libxml2 and libxslt seems to only be needed for 3.9 image for some reason
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.9'
- name: install libxml2 and libxslt seems to only be needed for 3.9+ image for some reason
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.9' || matrix.os == 'ubuntu-latest' && matrix.version == '3.10.0-beta4'
run: |
sudo apt install libxml2-dev
sudo apt install libxslt-dev
Expand All @@ -57,5 +57,7 @@ jobs:
python -m pip install setuptools
python -m pip install nox
- name: run nox
run: python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"

env:
# needed to make the terminal a tty (i think? without this system ssh is super broken)
TERM: xterm
run: python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"
7 changes: 4 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=C0103,C0115,C0330,W1202,W1203,R0902,R0913
disable=C0103,C0115,C0330,R0901,R0902,R0913,W1202,W1203
# C0103 = constant-name (a little too aggressive for some things that aren't "really" constants")
# C0115 = class docstrings (init doc strings cover this already)
# C0330 = bad-continuation (hanging indent that black doesnt like)
# W1202 = use % formatting for logging (ignore, using f-strings)
# W1203 = logging-fstring-interpolation (py3.6, using f-strings so dont care)
# R0902 = too-many-instance-attributes
# R0913 = too-many-arguments
# R0901 = too-many-ancestors (ignore because it counts mixins and i think thats not useful here)

[REPORTS]

Expand Down Expand Up @@ -398,7 +399,7 @@ int-import-graph=
known-standard-library=

# Force import order to recognize a module as part of a third party library.
known-third-party=nornir,nornir_utils
known-third-party=enchant

# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
Expand All @@ -410,4 +411,4 @@ analyse-fallback-blocks=no

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=Exception
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
26 changes: 23 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ lint:
python -m black .
python -m pylama .
python -m pydocstyle .
python -m mypy nornir_scrapli/
python -m mypy --strict nornir_scrapli/

darglint:
find nornir_scrapli -type f \( -iname "*.py"\ ) | xargs darglint -x

test:
python -m pytest \
tests/

cov:
python -m pytest \
Expand All @@ -12,12 +19,25 @@ cov:
--cov-report term \
tests/

test:
python -m pytest tests/
test_unit:
python -m pytest \
tests/unit/

cov_unit:
python -m pytest \
--cov=nornir_scrapli \
--cov-report html \
--cov-report term \
tests/unit/

.PHONY: docs
docs:
python docs/generate/generate_docs.py

test_docs:
mkdocs build --clean --strict
htmltest -c docs/htmltest.yml -s
rm -rf tmp

deploy_docs:
mkdocs gh-deploy
13 changes: 7 additions & 6 deletions docs/about/contributing.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Contributing
=======
============

Thanks for thinking about contributing to nornir_scrapli! Contributions are not expected, but are quite welcome.
Thanks for thinking about contributing! Contributions are not expected, but are quite welcome.

Contributions of all kinds are welcomed -- typos, doc updates, adding examples, bug fixes, and feature adds.


Some notes on contributing:

- Please open an issue to discuss any bug fixes, feature adds, or really any thing that could result in a pull
request. This allows us to all be on the same page, and could save everyone some extra work!
- Once we've discussed any changes, pull requests are of course welcome and very much appreciated!
- All PRs should pass tests -- checkout the Makefile for some shortcuts for linting and testing.
- Please open a GitHub discussion topic for any potential feature adds/changes to discuss them prior to opening a PR,
this way everyone has a chance to chime in and make sure we're all on the same page!
- Please open an issue to discuss any bugs/bug fixes prior to opening a PR.
- Once we all have discussed any adds/changes, pull requests are very much welcome and appreciated!
- All PRs should pass tests/CI linting -- checkout the Makefile for some shortcuts for linting and testing.
- Please include tests! Even simple/basic tests are better than nothing -- it helps make sure changes in the future
don't break functionality or make things act in unexpected ways!
Loading

0 comments on commit 8ace891

Please sign in to comment.