diff --git a/.github/workflows/docs_test_action.yml b/.github/workflows/docs_test_action.yml index d258e8d..331606e 100644 --- a/.github/workflows/docs_test_action.yml +++ b/.github/workflows/docs_test_action.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 84e9436..d7c372d 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -16,11 +16,11 @@ permissions: jobs: Run: name: "Flake8" - runs-on: "ubuntu-18.04" + runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 @@ -33,7 +33,7 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: "3.6" @@ -43,7 +43,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install tox + python -m pip install tox~=3.0 - name: "Run Flake8" if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index db8ab06..c707651 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 @@ -38,7 +38,7 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: "3.6" @@ -47,7 +47,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv!=20.16.0 + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run mypy" if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index e17433e..151df52 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -50,7 +50,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -60,14 +60,14 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv!=20.16.0 + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" if: steps.setup-python.outcome == 'success' run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 80ee082..7dc7a99 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -51,7 +51,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -61,7 +61,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv!=20.16.0 + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 python -m pip install --upgrade coverage_pyver_pragma - name: "Run Tests for Python ${{ matrix.config.python-version }}" @@ -69,7 +69,7 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" @@ -81,10 +81,10 @@ jobs: runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: 3.8 @@ -94,7 +94,7 @@ jobs: python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma - name: "Download Coverage 🪂" - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: path: coverage @@ -112,7 +112,7 @@ jobs: - name: "Upload Combined Coverage Artefact 🚀" if: ${{ steps.show.outcome != 'failure' }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: "combined-coverage" path: .coverage @@ -130,11 +130,11 @@ jobs: runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" if: startsWith(github.ref, 'refs/tags/') - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" if: startsWith(github.ref, 'refs/tags/') with: python-version: 3.8 @@ -143,7 +143,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') run: | python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox + python -m pip install --upgrade tox~=3.0 - name: Build distributions 📦 if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 66485d5..f64cbbe 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -50,7 +50,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -60,14 +60,14 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv!=20.16.0 + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" if: steps.setup-python.outcome == 'success' run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb9051c..78fe63d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,9 +3,12 @@ exclude: ^$ +ci: + autoupdate_schedule: quarterly + repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.7.0 + rev: v0.9.1 hooks: - id: reformat-pyproject @@ -40,18 +43,18 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.2.2 + rev: v0.3.1 hooks: - id: ensure-dunder-all files: ^notebook2script/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.2 + rev: v0.4.3 hooks: - id: flake2lint - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: - id: python-no-eval - id: rst-backticks @@ -67,24 +70,24 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.2.0 + rev: v1.5.1 hooks: - id: remove-crlf - id: forbid-crlf - repo: https://github.com/python-formate/snippet-fmt - rev: v0.1.4 + rev: v0.1.5 hooks: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.4.10 + rev: v0.7.0 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - repo: https://github.com/domdfcoding/dep_checker - rev: v0.7.0 + rev: v0.8.0 hooks: - id: dep_checker args: diff --git a/.readthedocs.yml b/.readthedocs.yml index 41d2e57..e928b70 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,9 +9,16 @@ formats: - pdf - htmlzip python: - version: 3.8 install: - requirements: requirements.txt - requirements: doc-source/requirements.txt - - method: pip - path: . +build: + os: ubuntu-20.04 + tools: + python: '3.9' + jobs: + post_create_environment: + - pip install . + post_install: + - pip install sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 + sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 diff --git a/README.rst b/README.rst index 578aa4d..cf96662 100644 --- a/README.rst +++ b/README.rst @@ -55,8 +55,8 @@ notebook2script :target: https://github.com/PyMassSpec/notebook2script/actions?query=workflow%3A%22mypy%22 :alt: mypy status -.. |requires| image:: https://dependency-dash.herokuapp.com/github/PyMassSpec/notebook2script/badge.svg - :target: https://dependency-dash.herokuapp.com/github/PyMassSpec/notebook2script/ +.. |requires| image:: https://dependency-dash.repo-helper.uk/github/PyMassSpec/notebook2script/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/PyMassSpec/notebook2script/ :alt: Requirements Status .. |coveralls| image:: https://img.shields.io/coveralls/github/PyMassSpec/notebook2script/master?logo=coveralls @@ -98,7 +98,7 @@ notebook2script :target: https://github.com/PyMassSpec/notebook2script/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2022 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2024 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/notebook2script diff --git a/doc-source/index.rst b/doc-source/index.rst index 3d899c9..348c99c 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -58,8 +58,8 @@ notebook2script :workflow: mypy :alt: mypy status - .. |requires| image:: https://dependency-dash.herokuapp.com/github/PyMassSpec/notebook2script/badge.svg - :target: https://dependency-dash.herokuapp.com/github/PyMassSpec/notebook2script/ + .. |requires| image:: https://dependency-dash.repo-helper.uk/github/PyMassSpec/notebook2script/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/PyMassSpec/notebook2script/ :alt: Requirements Status .. |coveralls| coveralls-shield:: @@ -104,7 +104,7 @@ notebook2script :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2022 + .. |maintained| maintained-shield:: 2024 :alt: Maintenance .. |pypi-downloads| pypi-shield:: diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 72b7cb9..1be307c 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -1,18 +1,18 @@ git+https://github.com/domdfcoding/sphinx-click.git -default-values>=0.5.0 -extras-require>=0.2.0 -furo>=2020.11.19b18 -html-section>=0.1.0 -seed-intersphinx-mapping>=0.3.1 +default-values>=0.6.0 +extras-require>=0.5.0 +furo==2021.06.18b36 +html-section>=0.3.0 +seed-intersphinx-mapping>=1.2.2 sphinx>=3.0.3 -sphinx-copybutton>=0.2.12 -sphinx-debuginfo>=0.1.0 -sphinx-licenseinfo>=0.1.1 -sphinx-notfound-page>=0.5 +sphinx-copybutton>=0.5.2 +sphinx-debuginfo>=0.2.2 +sphinx-licenseinfo>=0.3.1 +sphinx-notfound-page>=0.8.3 sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 sphinx-tabs>=1.1.13 -sphinx-toolbox>=2.13.0 +sphinx-toolbox>=3.5.0 sphinxcontrib-httpdomain>=1.7.0 -sphinxemoji>=0.1.6 -toctree-plus>=0.5.0 +sphinxemoji>=0.2.0 +toctree-plus>=0.6.1 diff --git a/tox.ini b/tox.ini index 41c1575..e8cca84 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,10 @@ # * tox # * envlists # * testenv +# * testenv:.package +# * testenv:py313-dev +# * testenv:py312-dev +# * testenv:py312 # * testenv:docs # * testenv:build # * testenv:lint @@ -23,6 +27,7 @@ isolated_build = True requires = pip>=21,!=22.2 tox-envlist>=0.2.1 + tox~=3.0 virtualenv!=20.16.0 [envlists] @@ -34,11 +39,17 @@ cov = py36, coverage setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 + SETUPTOOLS_USE_DISTUTILS=stdlib deps = -r{toxinidir}/tests/requirements.txt commands = python --version python -m pytest --cov=notebook2script -r aR tests/ {posargs} +[testenv:.package] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + [testenv:docs] setenv = SHOW_TODOS = 1 passenv = SPHINX_BUILDER @@ -48,12 +59,18 @@ deps = -r{toxinidir}/doc-source/requirements.txt commands = sphinx-build -M {env:SPHINX_BUILDER:html} . ./build {posargs} [testenv:build] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + PIP_PREFER_BINARY=1 skip_install = True changedir = {toxinidir} deps = build[virtualenv]>=0.3.1 check-wheel-contents>=0.1.0 - twine>=3.2.0 + twine>=3.2.0; python_version < "3.13" + twine@git+https://github.com/pypa/twine; python_version >= "3.13" + cryptography<40; implementation_name == "pypy" and python_version <= "3.7" commands = python -m build --sdist --wheel "{toxinidir}" twine check dist/*.tar.gz dist/*.whl @@ -123,6 +140,7 @@ passenv = COV_PYTHON_VERSION COV_PLATFORM COV_PYTHON_IMPLEMENTATION + * changedir = {toxinidir} deps = coverage>=5 @@ -134,7 +152,7 @@ commands = [flake8] max-line-length = 120 -select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 +select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv rst-directives = TODO @@ -162,6 +180,7 @@ plugins = coverage_pyver_pragma [coverage:report] fail_under = 80 +show_missing = True exclude_lines = raise AssertionError raise NotImplementedError