Skip to content

Commit 3f4c69a

Browse files
committed
Merge branch 'release/3.4.2.3'
2 parents 75102d4 + 7e05391 commit 3f4c69a

22 files changed

Lines changed: 406 additions & 2608 deletions

.github/workflows/python-package.yml

Lines changed: 38 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -14,122 +14,93 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ['3.10', '3.11', '3.12']
18-
poetry-version: [1.8.3]
19-
pandoc-version: [3.2.1]
17+
python-version: ['3.10', '3.11', '3.12', '3.13']
18+
pandoc-version: ['3.5']
2019
steps:
2120
- uses: actions/checkout@v4
2221
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v4
22+
uses: actions/setup-python@v5
2423
with:
2524
python-version: ${{ matrix.python-version }}
26-
- name: Set up Poetry ${{ matrix.poetry-version }}
27-
uses: abatilo/actions-poetry@v2
28-
with:
29-
poetry-version: ${{ matrix.poetry-version }}
25+
- name: Install Hatch
26+
run: pipx install hatch
3027
- name: Install dependencies
3128
run: |
3229
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
3330
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
34-
poetry install
35-
- name: Test with tox
31+
- name: Test
3632
run: |
37-
poetry run tox -e py
33+
hatch test -py ${{ matrix.python-version }}
3834
39-
poetry:
35+
pandoc:
4036
runs-on: ubuntu-latest
4137
strategy:
4238
matrix:
4339
python-version: ['3.12']
44-
poetry-version: [1.2.2, 1.3.2, 1.4.2, 1.5.1, 1.6.1, 1.7.1, 1.8.3]
45-
pandoc-version: [3.2.1]
40+
pandoc-version: [2.14.2, '2.15', 2.16.2, 2.17.1.1, '2.18', 2.19.2, 3.0.1, 3.1.13, 3.2.1, '3.3', '3.4', '3.5']
4641
steps:
4742
- uses: actions/checkout@v4
4843
- name: Set up Python ${{ matrix.python-version }}
49-
uses: actions/setup-python@v4
44+
uses: actions/setup-python@v5
5045
with:
5146
python-version: ${{ matrix.python-version }}
52-
- name: Set up Poetry ${{ matrix.poetry-version }}
53-
uses: abatilo/actions-poetry@v2
54-
with:
55-
poetry-version: ${{ matrix.poetry-version }}
47+
- name: Install Hatch
48+
run: pipx install hatch
5649
- name: Install dependencies
5750
run: |
5851
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
5952
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
60-
poetry install
61-
- name: Test with tox
53+
- name: Test
6254
run: |
63-
poetry run tox -e py
55+
hatch test
6456
65-
pandoc:
57+
style:
6658
runs-on: ubuntu-latest
6759
strategy:
6860
matrix:
6961
python-version: ['3.12']
70-
poetry-version: [1.8.3]
71-
pandoc-version: [2.14.2, '2.15', 2.16.2, 2.17.1.1, '2.18', 2.19.2, 3.0.1, 3.1.13, 3.2.1]
62+
pandoc-version: ['3.5']
7263
steps:
7364
- uses: actions/checkout@v4
74-
- name: Set up Python ${{ matrix.python-version }}
75-
uses: actions/setup-python@v4
65+
- name: Set up Python
66+
uses: actions/setup-python@v5
7667
with:
7768
python-version: ${{ matrix.python-version }}
78-
- name: Set up Poetry ${{ matrix.poetry-version }}
79-
uses: abatilo/actions-poetry@v2
80-
with:
81-
poetry-version: ${{ matrix.poetry-version }}
69+
- name: Install Hatch
70+
run: pipx install hatch
8271
- name: Install dependencies
8372
run: |
8473
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
8574
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
86-
poetry install
87-
- name: Test with tox
75+
- name: Static check
8876
run: |
89-
poetry run tox -e py
90-
91-
style:
92-
runs-on: ubuntu-latest
93-
steps:
94-
- uses: actions/checkout@v4
95-
- name: Set up Python
96-
uses: actions/setup-python@v4
97-
with:
98-
python-version: '3.12'
99-
- name: Set up Poetry
100-
uses: abatilo/actions-poetry@v2
101-
with:
102-
poetry-version: 1.8.3
103-
- name: Install dependencies
77+
hatch fmt --check
78+
- name: Dynamic check
10479
run: |
105-
poetry install
106-
- name: Test with tox
107-
run: |
108-
poetry run tox -e style
109-
poetry run tox -e linter
80+
hatch run lint:check
11081
11182
cov:
11283
runs-on: ubuntu-latest
84+
strategy:
85+
matrix:
86+
python-version: ['3.12']
87+
pandoc-version: ['3.5']
11388
steps:
11489
- uses: actions/checkout@v4
11590
- name: Set up Python
116-
uses: actions/setup-python@v4
117-
with:
118-
python-version: '3.12'
119-
- name: Set up Poetry
120-
uses: abatilo/actions-poetry@v2
91+
uses: actions/setup-python@v5
12192
with:
122-
poetry-version: 1.8.3
93+
python-version: ${{ matrix.python-version }}
94+
- name: Install Hatch
95+
run: pipx install hatch
12396
- name: Install dependencies
12497
run: |
125-
wget https://github.com/jgm/pandoc/releases/download/3.2.1/pandoc-3.2.1-1-amd64.deb
126-
sudo dpkg -i ./pandoc-3.2.1-1-amd64.deb
127-
poetry install
98+
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
99+
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
128100
- name: Test
129101
env:
130102
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
131-
run: |
132-
poetry run tox -e coverage
133-
poetry run pip install coveralls
134-
poetry run coveralls
135-
103+
run: |-
104+
hatch test --cover
105+
hatch run pip install coveralls
106+
hatch run coveralls

.github/workflows/python-publish.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,24 @@ on:
1010
jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ['3.12']
1316
steps:
1417
- uses: actions/checkout@v4
1518
with:
1619
fetch-depth: 0
1720
- name: Set up Python
18-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
1922
with:
20-
python-version: '3.12'
21-
- name: Set up Poetry
22-
uses: abatilo/actions-poetry@v2
23-
with:
24-
poetry-version: 1.8.3
25-
- name: Set up poetry-dynamic-versioning
26-
run: |
27-
poetry self add "poetry-dynamic-versioning[plugin]"
28-
- name: Install dependencies
29-
run: |
30-
poetry install
31-
poetry run pip install twine
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install Hatch
25+
run: pipx install hatch
3226
- name: Build and publish
3327
env:
34-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
35-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
36-
run: |
37-
poetry build
38-
poetry run twine upload dist/*
28+
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
29+
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
30+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }}
31+
run: |-
32+
hatch build -t wheel
33+
hatch publish dist/*.whl

.pre-commit-config.yaml

Lines changed: 22 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,43 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-toml
66
- id: check-yaml
77

8-
- repo: https://gitlab.com/smop/pre-commit-hooks
9-
rev: v1.0.0
10-
hooks:
11-
- id: check-poetry
12-
138
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
149
rev: v2.14.0
1510
hooks:
1611
- id: pretty-format-toml
17-
exclude: ^poetry.lock$
1812
args: [--autofix, --no-sort]
1913
- id: pretty-format-yaml
2014
args: [--autofix]
2115

22-
- repo: https://github.com/tox-dev/tox-ini-fmt
23-
rev: 1.3.1
24-
hooks:
25-
- id: tox-ini-fmt
26-
27-
- repo: https://github.com/ariebovenberg/slotscheck
28-
rev: v0.19.0
29-
hooks:
30-
- id: slotscheck
31-
language: system
32-
exclude: ^(?!pandoc_numbering/.*.py)
33-
34-
- repo: https://github.com/dosisod/refurb
35-
rev: v2.0.0
36-
hooks:
37-
- id: refurb
38-
39-
- repo: https://github.com/isidentical/teyit
40-
rev: 0.4.3
41-
hooks:
42-
- id: teyit
43-
44-
- repo: https://github.com/astral-sh/ruff-pre-commit
45-
rev: v0.5.4
46-
hooks:
47-
- id: ruff
48-
language: system
49-
exclude: ^(?!pandoc_numbering/.*.py)
50-
51-
- repo: https://github.com/psf/black
52-
rev: 24.4.2
53-
hooks:
54-
- id: black-jupyter
55-
args: [--config=pyproject.toml, pandoc_numbering, tests]
56-
57-
- repo: https://github.com/PyCQA/doc8/
58-
rev: v1.1.1
16+
- repo: https://github.com/asottile/pyupgrade
17+
rev: v3.18.0
5918
hooks:
60-
- id: doc8
61-
args: [docs]
19+
- id: pyupgrade
20+
args: [--py310-plus]
6221

63-
- repo: https://github.com/pre-commit/mirrors-mypy
64-
rev: v1.11.0
22+
- repo: local
6523
hooks:
66-
- id: mypy
24+
- id: format
25+
name: format
26+
entry: hatch fmt --check
6727
language: system
68-
exclude: ^(?!pandoc_numbering/.*.py)
69-
70-
- repo: https://github.com/pycqa/flake8
71-
rev: 7.1.0
72-
hooks:
73-
- id: flake8
28+
pass_filenames: false
29+
- id: lint
30+
name: lint
31+
entry: hatch run lint:check
7432
language: system
75-
exclude: ^(?!pandoc_numbering/.*.py)
76-
77-
- repo: https://github.com/pre-commit/mirrors-pylint
78-
rev: v3.0.0a5
79-
hooks:
80-
- id: pylint
33+
pass_filenames: false
34+
- id: test
35+
name: test
36+
entry: hatch test
8137
language: system
82-
exclude: ^(?!pandoc_numbering/.*.py)
83-
84-
85-
- repo: https://github.com/asottile/pyupgrade
86-
rev: v3.16.0
87-
hooks:
88-
- id: pyupgrade
38+
pass_filenames: false
39+
- id: lock
40+
name: lock
41+
entry: uv lock --upgrade
8942
language: system
90-
args: [--py310-plus]
43+
pass_filenames: false

.readthedocs.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,10 @@ build:
99
os: ubuntu-22.04
1010
tools:
1111
python: '3.11'
12-
jobs:
13-
post_create_environment:
14-
# Install poetry
15-
# https://python-poetry.org/docs/#installing-manually
16-
- pip install poetry
17-
- poetry self add "poetry-dynamic-versioning[plugin]"
18-
post_install:
19-
# Install dependencies with 'docs' dependency group
20-
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
21-
# VIRTUAL_ENV needs to be set manually for now.
22-
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
23-
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
24-
25-
# Build documentation in the "docs/" directory with Sphinx
26-
sphinx:
27-
configuration: docs/conf.py
12+
commands:
13+
- git fetch --unshallow || true
14+
- pip install hatch
15+
- hatch run docs:build $READTHEDOCS_OUTPUT/html/
2816

2917
# Optionally build your docs in additional formats such as PDF and ePub
3018
formats:

0 commit comments

Comments
 (0)