From 1f890664f7ac71ca560a3f796afafa1d8b2faea8 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:08:56 +0000 Subject: [PATCH 1/2] Updated files with 'repo_helper'. --- .github/workflows/conda_ci.yml | 7 ++++--- .github/workflows/python_ci_linux.yml | 7 ++++--- .pre-commit-config.yaml | 6 +++--- doc-source/conf.py | 17 ++++++++++++++++- doc-source/requirements.txt | 8 ++++++-- tox.ini | 2 ++ 6 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml index 8f96957..5227eb6 100644 --- a/.github/workflows/conda_ci.yml +++ b/.github/workflows/conda_ci.yml @@ -24,14 +24,15 @@ jobs: - name: Setup Python 🐍 uses: "actions/setup-python@v5" with: - python-version: "3.8" + python-version: "3.11" - name: Setup Conda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v2.1.1 with: activate-environment: env conda-build-version: 3.28.4 - python-version: "3.8" + miniconda-version: py311_24.1.2-0 + python-version: "3.11" miniforge-variant: Mambaforge - name: Install dependencies 🔧 diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 1f631bd..9dadb31 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -183,14 +183,15 @@ jobs: - name: Setup Python 🐍 uses: "actions/setup-python@v5" with: - python-version: 3.8 + python-version: 3.11 - name: Setup Conda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v2.1.1 with: activate-environment: env conda-build-version: 3.28.4 - python-version: "3.8" + miniconda-version: py311_24.1.2-0 + python-version: "3.11" miniforge-variant: Mambaforge - name: Install dependencies 🔧 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb900f2..3b569c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.11.0 + rev: v0.11.1 hooks: - id: reformat-pyproject @@ -42,7 +42,7 @@ repos: exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$ - id: bind-requirements - - repo: https://github.com/domdfcoding/flake8-dunder-all + - repo: https://github.com/python-formate/flake8-dunder-all rev: v0.4.1 hooks: - id: ensure-dunder-all @@ -86,7 +86,7 @@ repos: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - - repo: https://github.com/domdfcoding/dep_checker + - repo: https://github.com/python-coincidence/dep_checker rev: v0.8.0 hooks: - id: dep_checker diff --git a/doc-source/conf.py b/doc-source/conf.py index 4027cff..cb19385 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -66,13 +66,28 @@ } +# Fix for pathlib issue with sphinxemoji on Python 3.9 and Sphinx 4.x +def copy_asset_files(app, exc): + # 3rd party + from domdf_python_tools.compat import importlib_resources + from sphinx.util.fileutil import copy_asset + + if exc: + return + + asset_files = ["twemoji.js", "twemoji.css"] + for path in asset_files: + path_str = os.fspath(importlib_resources.files("sphinxemoji") / path) + copy_asset(path_str, os.path.join(app.outdir, "_static")) + + def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout from sphinxemoji import sphinxemoji app.connect("config-inited", lambda app, config: better_header_layout(config)) - app.connect("build-finished", sphinxemoji.copy_asset_files) + app.connect("build-finished", copy_asset_files) app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js") app.add_js_file("twemoji.js") app.add_css_file("twemoji.css") diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index e68aa34..37001f5 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -8,10 +8,14 @@ sphinx-copybutton>=0.5.2 sphinx-debuginfo>=0.2.2 sphinx-licenseinfo>=0.3.1 sphinx-notfound-page>=0.7.1 -sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 -sphinx-tabs>=1.1.13 sphinx-toolbox>=3.5.0 +sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-httpdomain>=1.7.0 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.5 sphinxemoji>=0.1.6 toctree-plus>=0.6.1 diff --git a/tox.ini b/tox.ini index 41a4a00..cce87c9 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ # * testenv # * testenv:.package # * testenv:py313-dev +# * testenv:py313 # * testenv:py312-dev # * testenv:py312 # * testenv:docs @@ -51,6 +52,7 @@ setenv = PIP_DISABLE_PIP_VERSION_CHECK=1 [testenv:py312-dev] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 From 88c306cbd457b230a462c4a83283b3a169dcb0c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:09:16 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_pcdl.py | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/tests/test_pcdl.py b/tests/test_pcdl.py index 8ce7a65..e6aefa7 100644 --- a/tests/test_pcdl.py +++ b/tests/test_pcdl.py @@ -1,5 +1,7 @@ -# 3rd party +# stdlib import sys + +# 3rd party import pytest from _pytest.fixtures import FixtureRequest from betamax import Betamax # type: ignore @@ -252,10 +254,24 @@ def pcdl_cassette(request: FixtureRequest): ("Styrene", "100-42-5"), ] -@pytest.mark.parametrize("python_version", [ - pytest.param("<=3.8", marks=pytest.mark.skipif(sys.version_info >= (3, 9), reason="Output changes after Python 3.8")), - pytest.param(">=3.9", marks=pytest.mark.skipif(sys.version_info < (3, 9), reason="Output changes after Python 3.8")), -]) + +@pytest.mark.parametrize( + "python_version", + [ + pytest.param( + "<=3.8", + marks=pytest.mark.skipif( + sys.version_info >= (3, 9), reason="Output changes after Python 3.8" + ) + ), + pytest.param( + ">=3.9", + marks=pytest.mark.skipif( + sys.version_info < (3, 9), reason="Output changes after Python 3.8" + ) + ), + ] + ) @pytest.mark.usefixtures("pcdl_cassette", "python_version") def test_make_pcdl_csv( tmp_pathplus: PathPlus,