Skip to content

Commit 8a2e4a3

Browse files
[repo-helper] Configuration Update (#48)
* Updated files with 'repo_helper'. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 17be6b6 commit 8a2e4a3

7 files changed

Lines changed: 56 additions & 17 deletions

File tree

.github/workflows/conda_ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ jobs:
2424
- name: Setup Python 🐍
2525
uses: "actions/setup-python@v5"
2626
with:
27-
python-version: "3.8"
27+
python-version: "3.11"
2828

2929
- name: Setup Conda
30-
uses: conda-incubator/setup-miniconda@v2
30+
uses: conda-incubator/setup-miniconda@v2.1.1
3131
with:
3232
activate-environment: env
3333
conda-build-version: 3.28.4
34-
python-version: "3.8"
34+
miniconda-version: py311_24.1.2-0
35+
python-version: "3.11"
3536
miniforge-variant: Mambaforge
3637

3738
- name: Install dependencies 🔧

.github/workflows/python_ci_linux.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,15 @@ jobs:
183183
- name: Setup Python 🐍
184184
uses: "actions/setup-python@v5"
185185
with:
186-
python-version: 3.8
186+
python-version: 3.11
187187

188188
- name: Setup Conda
189-
uses: conda-incubator/setup-miniconda@v2
189+
uses: conda-incubator/setup-miniconda@v2.1.1
190190
with:
191191
activate-environment: env
192192
conda-build-version: 3.28.4
193-
python-version: "3.8"
193+
miniconda-version: py311_24.1.2-0
194+
python-version: "3.11"
194195
miniforge-variant: Mambaforge
195196

196197
- name: Install dependencies 🔧

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ci:
88

99
repos:
1010
- repo: https://github.com/repo-helper/pyproject-parser
11-
rev: v0.11.0
11+
rev: v0.11.1
1212
hooks:
1313
- id: reformat-pyproject
1414

@@ -42,7 +42,7 @@ repos:
4242
exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$
4343
- id: bind-requirements
4444

45-
- repo: https://github.com/domdfcoding/flake8-dunder-all
45+
- repo: https://github.com/python-formate/flake8-dunder-all
4646
rev: v0.4.1
4747
hooks:
4848
- id: ensure-dunder-all
@@ -86,7 +86,7 @@ repos:
8686
- id: formate
8787
exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$
8888

89-
- repo: https://github.com/domdfcoding/dep_checker
89+
- repo: https://github.com/python-coincidence/dep_checker
9090
rev: v0.8.0
9191
hooks:
9292
- id: dep_checker

doc-source/conf.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,28 @@
6666
}
6767

6868

69+
# Fix for pathlib issue with sphinxemoji on Python 3.9 and Sphinx 4.x
70+
def copy_asset_files(app, exc):
71+
# 3rd party
72+
from domdf_python_tools.compat import importlib_resources
73+
from sphinx.util.fileutil import copy_asset
74+
75+
if exc:
76+
return
77+
78+
asset_files = ["twemoji.js", "twemoji.css"]
79+
for path in asset_files:
80+
path_str = os.fspath(importlib_resources.files("sphinxemoji") / path)
81+
copy_asset(path_str, os.path.join(app.outdir, "_static"))
82+
83+
6984
def setup(app):
7085
# 3rd party
7186
from sphinx_toolbox.latex import better_header_layout
7287
from sphinxemoji import sphinxemoji
7388

7489
app.connect("config-inited", lambda app, config: better_header_layout(config))
75-
app.connect("build-finished", sphinxemoji.copy_asset_files)
90+
app.connect("build-finished", copy_asset_files)
7691
app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js")
7792
app.add_js_file("twemoji.js")
7893
app.add_css_file("twemoji.css")

doc-source/requirements.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ sphinx-copybutton>=0.5.2
88
sphinx-debuginfo>=0.2.2
99
sphinx-licenseinfo>=0.3.1
1010
sphinx-notfound-page>=0.7.1
11-
sphinx-prompt>=1.1.0
1211
sphinx-pyproject>=0.1.0
13-
sphinx-tabs>=1.1.13
1412
sphinx-toolbox>=3.5.0
13+
sphinxcontrib-applehelp==1.0.4
14+
sphinxcontrib-devhelp==1.0.2
15+
sphinxcontrib-htmlhelp==2.0.1
1516
sphinxcontrib-httpdomain>=1.7.0
17+
sphinxcontrib-jsmath==1.0.1
18+
sphinxcontrib-qthelp==1.0.3
19+
sphinxcontrib-serializinghtml==1.1.5
1620
sphinxemoji>=0.1.6
1721
toctree-plus>=0.6.1

tests/test_pcdl.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# 3rd party
1+
# stdlib
22
import sys
3+
4+
# 3rd party
35
import pytest
46
from _pytest.fixtures import FixtureRequest
57
from betamax import Betamax # type: ignore
@@ -252,10 +254,24 @@ def pcdl_cassette(request: FixtureRequest):
252254
("Styrene", "100-42-5"),
253255
]
254256

255-
@pytest.mark.parametrize("python_version", [
256-
pytest.param("<=3.8", marks=pytest.mark.skipif(sys.version_info >= (3, 9), reason="Output changes after Python 3.8")),
257-
pytest.param(">=3.9", marks=pytest.mark.skipif(sys.version_info < (3, 9), reason="Output changes after Python 3.8")),
258-
])
257+
258+
@pytest.mark.parametrize(
259+
"python_version",
260+
[
261+
pytest.param(
262+
"<=3.8",
263+
marks=pytest.mark.skipif(
264+
sys.version_info >= (3, 9), reason="Output changes after Python 3.8"
265+
)
266+
),
267+
pytest.param(
268+
">=3.9",
269+
marks=pytest.mark.skipif(
270+
sys.version_info < (3, 9), reason="Output changes after Python 3.8"
271+
)
272+
),
273+
]
274+
)
259275
@pytest.mark.usefixtures("pcdl_cassette", "python_version")
260276
def test_make_pcdl_csv(
261277
tmp_pathplus: PathPlus,

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# * testenv
66
# * testenv:.package
77
# * testenv:py313-dev
8+
# * testenv:py313
89
# * testenv:py312-dev
910
# * testenv:py312
1011
# * testenv:docs
@@ -51,6 +52,7 @@ setenv =
5152
PIP_DISABLE_PIP_VERSION_CHECK=1
5253

5354
[testenv:py312-dev]
55+
download = True
5456
setenv =
5557
PYTHONDEVMODE=1
5658
PIP_DISABLE_PIP_VERSION_CHECK=1

0 commit comments

Comments
 (0)