Skip to content

Commit

Permalink
TST: Fix flake8 and release jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Dec 22, 2021
1 parent 1512acc commit 53ccf2a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/publish.yml
Expand Up @@ -20,8 +20,11 @@ jobs:
with:
python-version: 3.8

- name: Install python-build and twine
run: python -m pip install pip build "twine>=3.3" -U
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install graphviz
python -m pip install pip build "twine>=3.3" -U
- name: Build package
run: python -m build --sdist --wheel .
Expand All @@ -36,8 +39,9 @@ jobs:
run: |
cd ..
python -m venv testenv
testenv/bin/pip install pytest sphinx_automodapi/dist/*.whl
testenv/bin/pytest sphinx_automodapi
testenv/bin/pip install pip -U
testenv/bin/pip install pytest sphinx-automodapi/dist/*.whl
testenv/bin/pytest sphinx-automodapi/sphinx_automodapi/tests
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Expand Up @@ -45,4 +45,5 @@ filterwarnings =
ignore:'environmentfilter' is renamed to 'pass_environment':DeprecationWarning

[flake8]
max-line-length = 100
max-line-length = 125
exclude = sphinx_automodapi/tests/test_autodoc_enhancements.py,sphinx_automodapi/tests/test_automodapi.py
2 changes: 1 addition & 1 deletion sphinx_automodapi/automodsumm.py
Expand Up @@ -260,7 +260,7 @@ def process_automodsumm_generation(app):
if lines: # empty list means no automodsumm entry is in the file
outfn = os.path.join(app.srcdir, sfn) + '.automodsumm'
with open(outfn, 'w') as f:
for l in lines:
for l in lines: # noqa: E741
f.write(l)
f.write('\n')

Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Expand Up @@ -32,6 +32,7 @@ platform =

[testenv:codestyle]
skip_install = true
changedir = {toxinidir}
description = Run all style and file checks with pre-commit
deps = flake8
commands = flake8 sphinx_automodapi
commands = flake8 sphinx_automodapi --count

0 comments on commit 53ccf2a

Please sign in to comment.