Skip to content

Commit 4431eb0

Browse files
committed
Fix global footnotes
1 parent c01f657 commit 4431eb0

File tree

11 files changed

+239
-2609
lines changed

11 files changed

+239
-2609
lines changed

.github/workflows/python-package.yml

Lines changed: 33 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -15,121 +15,94 @@ jobs:
1515
strategy:
1616
matrix:
1717
python-version: ['3.10', '3.11', '3.12']
18-
poetry-version: [1.8.3]
19-
pandoc-version: ['3.3']
18+
pandoc-version: ['3.4']
2019
steps:
2120
- uses: actions/checkout@v4
2221
- name: Set up Python ${{ matrix.python-version }}
2322
uses: actions/setup-python@v4
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.3']
40+
poetry-version: [1.8.3]
41+
pandoc-version: [3.0.1, 3.1.13, 3.2.1, '3.3', '3.4']
4642
steps:
4743
- uses: actions/checkout@v4
4844
- name: Set up Python ${{ matrix.python-version }}
4945
uses: actions/setup-python@v4
5046
with:
5147
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 }}
48+
- name: Install Hatch
49+
run: pipx install hatch
5650
- name: Install dependencies
5751
run: |
5852
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
5953
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
60-
poetry install
61-
- name: Test with tox
54+
- name: Test
6255
run: |
63-
poetry run tox -e py
56+
hatch test
6457
65-
pandoc:
58+
style:
6659
runs-on: ubuntu-latest
6760
strategy:
6861
matrix:
6962
python-version: ['3.12']
70-
poetry-version: [1.8.3]
71-
pandoc-version: [3.0.1, 3.1.13, 3.2.1, '3.3']
63+
pandoc-version: ['3.4']
7264
steps:
7365
- uses: actions/checkout@v4
74-
- name: Set up Python ${{ matrix.python-version }}
66+
- name: Set up Python
7567
uses: actions/setup-python@v4
7668
with:
7769
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 }}
70+
- name: Install Hatch
71+
run: pipx install hatch
8272
- name: Install dependencies
8373
run: |
8474
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
8575
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
86-
poetry install
87-
- name: Test with tox
76+
- name: Static check
8877
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
104-
run: |
105-
poetry install
106-
- name: Test with tox
78+
hatch fmt --check
79+
- name: Dynamic check
10780
run: |
108-
poetry run tox -e style
109-
poetry run tox -e linter
81+
hatch run dynamic-lint:check
11082
11183
cov:
11284
runs-on: ubuntu-latest
85+
strategy:
86+
matrix:
87+
python-version: ['3.12']
88+
pandoc-version: ['3.4']
11389
steps:
11490
- uses: actions/checkout@v4
11591
- name: Set up Python
11692
uses: actions/setup-python@v4
11793
with:
118-
python-version: '3.12'
119-
- name: Set up Poetry
120-
uses: abatilo/actions-poetry@v2
121-
with:
122-
poetry-version: 1.8.3
94+
python-version: ${{ matrix.python-version }}
95+
- name: Install Hatch
96+
run: pipx install hatch
12397
- name: Install dependencies
12498
run: |
125-
wget https://github.com/jgm/pandoc/releases/download/3.3/pandoc-3.3-1-amd64.deb
126-
sudo dpkg -i ./pandoc-3.3-1-amd64.deb
127-
poetry install
99+
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
100+
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
128101
- name: Test
129102
env:
130103
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
131104
run: |
132-
poetry run tox -e coverage
133-
poetry run pip install coveralls
134-
poetry run coveralls
105+
hatch test --cover
106+
hatch run pip install coveralls
107+
hatch run coveralls
135108

.github/workflows/python-publish.yml

Lines changed: 11 additions & 16 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
1821
uses: actions/setup-python@v4
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 }}
28+
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
29+
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
30+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }}
3631
run: |
37-
poetry build
38-
poetry run twine upload dist/*
32+
hatch build -t wheel
33+
hatch publish dist/*.whl

.pre-commit-config.yaml

Lines changed: 17 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -5,86 +5,35 @@ repos:
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_latex_admonition/)
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.6.3
46-
hooks:
47-
- id: ruff
48-
language: system
49-
exclude: ^(?!pandoc_latex_admonition/)
50-
51-
- repo: https://github.com/psf/black
52-
rev: 24.8.0
53-
hooks:
54-
- id: black-jupyter
55-
args: [--config=pyproject.toml, pandoc_latex_admonition/, tests]
56-
57-
- repo: https://github.com/PyCQA/doc8/
58-
rev: v1.1.1
16+
- repo: https://github.com/asottile/pyupgrade
17+
rev: v3.17.0
5918
hooks:
60-
- id: doc8
61-
files: \.(rst|md)$
19+
- id: pyupgrade
20+
args: [--py310-plus]
6221

63-
- repo: https://github.com/pre-commit/mirrors-mypy
64-
rev: v1.11.2
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_latex_admonition/)
69-
70-
- repo: https://github.com/pycqa/flake8
71-
rev: 7.1.1
72-
hooks:
73-
- id: flake8
28+
pass_filenames: false
29+
- id: dynamic-lint
30+
name: dynamic-lint
31+
entry: hatch run dynamic-lint:check
7432
language: system
75-
exclude: ^(?!pandoc_latex_admonition/)
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_latex_admonition/)
83-
84-
- repo: https://github.com/asottile/pyupgrade
85-
rev: v3.17.0
86-
hooks:
87-
- id: pyupgrade
88-
language: system
89-
args: [--py310-plus]
38+
pass_filenames: false
9039

.readthedocs.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +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-
# Tell poetry to not use a virtual environment
19-
- poetry config virtualenvs.create false
20-
post_install:
21-
# Install dependencies with 'docs' dependency group
22-
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
23-
# VIRTUAL_ENV needs to be set manually for now.
24-
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
25-
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
26-
27-
# Build documentation in the "docs/" directory with Sphinx
28-
sphinx:
29-
configuration: docs/conf.py
12+
commands:
13+
- git fetch --unshallow || true
14+
- pip install hatch
15+
- hatch run docs:build $READTHEDOCS_OUTPUT/html/
3016

3117
# Optionally build your docs in additional formats such as PDF and ePub
3218
formats:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Installation
22
============
33

44
[![Python package](https://github.com/chdemko/pandoc-latex-admonition/workflows/Python%20package/badge.svg?branch=develop)](https://github.com/chdemko/pandoc-latex-admonition/actions/workflows/python-package.yml)
5+
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
56
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
67
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://pypi.org/project/black/)
78
[![Coveralls](https://img.shields.io/coveralls/github/chdemko/pandoc-latex-admonition/develop.svg?logo=Codecov&logoColor=white)](https://coveralls.io/github/chdemko/pandoc-latex-admonition?branch=develop)
@@ -15,8 +16,7 @@ Installation
1516
[![Downloads](https://img.shields.io/pypi/dm/pandoc-latex-admonition?logo=pypi&logoColor=white)](https://pepy.tech/project/pandoc-latex-admonition)
1617
[![Development Status](https://img.shields.io/pypi/status/pandoc-latex-admonition.svg?llogo=pypi&logoColor=white)](https://pypi.org/project/pandoc-latex-admonition/)
1718
[![Python version](https://img.shields.io/pypi/pyversions/pandoc-latex-admonition.svg?logo=Python&logoColor=white)](https://pypi.org/project/pandoc-latex-admonition/)
18-
[![Poetry version](https://img.shields.io/badge/poetry-1.2%20|%201.3%20|%201.4%20|%201.5%20|%201.6%20|%201.7%20|%201.8-blue.svg?logo=poetry)](https://python-poetry.org/)
19-
[![Pandoc version](https://img.shields.io/badge/pandoc-3.0%20|%203.1%20|%203.2%20|%203.3-blue.svg?logo=markdown)](https://pandoc.org/)
19+
[![Pandoc version](https://img.shields.io/badge/pandoc-3.0%20|%203.1%20|%203.2%20|%203.3%20|%203.4-blue.svg?logo=markdown)](https://pandoc.org/)
2020
[![Latest release](https://img.shields.io/github/release-date/chdemko/pandoc-latex-admonition.svg?logo=github)](https://github.com/chdemko/pandoc-latex-admonition/releases)
2121
[![Last commit](https://img.shields.io/github/last-commit/chdemko/pandoc-latex-admonition/develop?logo=github)](https://github.com/chdemko/pandoc-latex-admonition/commit/develop/)
2222
[![Repo Size](https://img.shields.io/github/repo-size/chdemko/pandoc-latex-admonition.svg?logo=github)](http://pandoc-latex-admonition.readthedocs.io/en/latest/)

0 commit comments

Comments
 (0)