Skip to content

Commit

Permalink
Merge pull request #70 from scrapli/develop
Browse files Browse the repository at this point in the history
2021.07.30
  • Loading branch information
carlmontanari authored Jul 30, 2021
2 parents 3266b95 + f3a42d7 commit b160ae6
Show file tree
Hide file tree
Showing 149 changed files with 1,784 additions and 5,422 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"
19 changes: 12 additions & 7 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,11 +42,6 @@ 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'
run: |
sudo apt install libxml2-dev
sudo apt install libxslt-dev
- name: setup test env
run: |
python -m pip install --upgrade pip
Expand All @@ -57,3 +52,13 @@ jobs:
# 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 }}
13 changes: 3 additions & 10 deletions .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- cron: '0 10 * * 0'
workflow_dispatch:

# in the future make this just call the commit workflow, but right now looks a little hacky to do in actions
jobs:
darglint:
runs-on: ${{ matrix.os }}
Expand All @@ -32,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 @@ -47,11 +46,6 @@ 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'
run: |
sudo apt install libxml2-dev
sudo apt install libxslt-dev
- name: setup test env
run: |
python -m pip install --upgrade pip
Expand All @@ -61,5 +55,4 @@ jobs:
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"

run: python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ dmypy.json
private/

# log output
*.log
*.log

# mkdocs site
site/*
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ 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,R0901,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)
Expand Down
41 changes: 28 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
lint:
python -m isort scrapli_community/
python -m isort tests/
python -m black scrapli_community/
python -m black tests/
python -m pylama scrapli_community/
python -m pydocstyle scrapli_community/
python -m mypy scrapli_community/
python -m isort .
python -m black .
python -m pylama .
python -m pydocstyle .
python -m mypy --strict scrapli_community/

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

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

test_unit:
python -m pytest \
tests/unit/

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

.PHONY: docs
docs:
rm -rf docs/scrapli_community
python -m pdoc \
--html \
--output-dir docs \
scrapli_community \
--force
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
Loading

0 comments on commit b160ae6

Please sign in to comment.