Skip to content

Commit ad8e9ec

Browse files
committed
Moving to src
1 parent 57ad45e commit ad8e9ec

File tree

8 files changed

+169
-37
lines changed

8 files changed

+169
-37
lines changed

.github/workflows/python-package.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ['3.10', '3.11', '3.12']
18-
pandoc-version: ['3.4']
17+
python-version: ['3.10', '3.11', '3.12', '3.13']
18+
pandoc-version: ['3.5']
1919
steps:
2020
- uses: actions/checkout@v4
2121
- name: Set up Python ${{ matrix.python-version }}
@@ -37,8 +37,7 @@ jobs:
3737
strategy:
3838
matrix:
3939
python-version: ['3.12']
40-
poetry-version: [1.8.3]
41-
pandoc-version: [3.0.1, 3.1.13, 3.2.1, '3.3', '3.4']
40+
pandoc-version: [3.0.1, 3.1.13, 3.2.1, '3.3', '3.4', '3.5']
4241
steps:
4342
- uses: actions/checkout@v4
4443
- name: Set up Python ${{ matrix.python-version }}
@@ -60,7 +59,7 @@ jobs:
6059
strategy:
6160
matrix:
6261
python-version: ['3.12']
63-
pandoc-version: ['3.4']
62+
pandoc-version: ['3.5']
6463
steps:
6564
- uses: actions/checkout@v4
6665
- name: Set up Python
@@ -85,7 +84,7 @@ jobs:
8584
strategy:
8685
matrix:
8786
python-version: ['3.12']
88-
pandoc-version: ['3.4']
87+
pandoc-version: ['3.5']
8988
steps:
9089
- uses: actions/checkout@v4
9190
- name: Set up Python

.pre-commit-config.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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
@@ -14,7 +14,7 @@ repos:
1414
args: [--autofix]
1515

1616
- repo: https://github.com/asottile/pyupgrade
17-
rev: v3.17.0
17+
rev: v3.18.0
1818
hooks:
1919
- id: pyupgrade
2020
args: [--py310-plus]
@@ -26,14 +26,18 @@ repos:
2626
entry: hatch fmt --check
2727
language: system
2828
pass_filenames: false
29-
- id: dynamic-lint
30-
name: dynamic-lint
31-
entry: hatch run dynamic-lint:check
29+
- id: lint
30+
name: lint
31+
entry: hatch run lint:check
3232
language: system
3333
pass_filenames: false
3434
- id: test
3535
name: test
3636
entry: hatch test
3737
language: system
3838
pass_filenames: false
39-
39+
- id: lock
40+
name: lock
41+
entry: uv lock --upgrade
42+
language: system
43+
pass_filenames: false

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Installation
1616
[![Downloads](https://img.shields.io/pypi/dm/pandoc-latex-admonition?logo=pypi&logoColor=white)](https://pepy.tech/project/pandoc-latex-admonition)
1717
[![Development Status](https://img.shields.io/pypi/status/pandoc-latex-admonition.svg?llogo=pypi&logoColor=white)](https://pypi.org/project/pandoc-latex-admonition/)
1818
[![Python version](https://img.shields.io/pypi/pyversions/pandoc-latex-admonition.svg?logo=Python&logoColor=white)](https://pypi.org/project/pandoc-latex-admonition/)
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/)
19+
[![Pandoc version](https://img.shields.io/badge/pandoc-3.0%20|%203.1%20|%203.2%20|%203.3%20|%203.4%20|%203.5-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/)
@@ -82,3 +82,34 @@ welcome to [file an issue] on github so that we can help.
8282

8383
[file an issue]: https://github.com/chdemko/pandoc-latex-admonition/issues
8484

85+
Contribute
86+
==========
87+
88+
Instructions
89+
------------
90+
91+
Install `hatch`, then run
92+
93+
~~~shell-session
94+
$ hatch run pip install pre-commit
95+
$ hatch run pre-commit install
96+
~~~
97+
98+
to install `pre-commit` before working on your changes.
99+
100+
Tests
101+
-----
102+
103+
When your changes are ready, run
104+
105+
~~~shell-session
106+
$ hatch test
107+
$ hatch fmt --check
108+
$ hatch run lint:check
109+
$ hatch run docs:build
110+
$ hatch build -t wheel
111+
~~~
112+
113+
for running the tests, checking the style, building the documentation
114+
and building the wheel.
115+

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# -- General configuration ---------------------------------------------------
3838

3939
# If your documentation needs a minimal Sphinx version, state it here.
40-
needs_sphinx = "6.0"
40+
needs_sphinx = "8.1"
4141

4242
# Add any Sphinx extension module names here, as strings. They can be
4343
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

pyproject.toml

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dynamic = ["version"]
77
name = "pandoc-latex-admonition"
88
description = "A pandoc filter for adding admonition in LaTeX"
99
readme = "README.md"
10-
requires-python = ">=3.10,<3.13"
10+
requires-python = ">=3.10,<3.14"
1111
license = {text = "BSD-3-Clause"}
1212
license-files = {paths = ["LICENSE"]}
1313
authors = [{name = "Christophe Demko", email = "[email protected]"}]
@@ -34,6 +34,7 @@ classifiers = [
3434
"Programming Language :: Python :: 3.10",
3535
"Programming Language :: Python :: 3.11",
3636
"Programming Language :: Python :: 3.12",
37+
"Programming Language :: Python :: 3.14",
3738
# Natural language used
3839
"Natural Language :: English"
3940
]
@@ -58,20 +59,20 @@ version_scheme = "no-guess-dev"
5859
local_scheme = "node-and-date"
5960

6061
[tool.hatch.build.targets.wheel]
61-
packages = ["pandoc_latex_admonition"]
62+
packages = ["src/pandoc_latex_admonition"]
6263

6364
[[tool.hatch.envs.hatch-test.matrix]]
64-
python = ["3.10", "3.11", "3.12"]
65+
python = ["3.10", "3.11", "3.12", "3.13"]
6566

6667
[tool.hatch.envs.hatch-static-analysis]
6768
dependencies = [
6869
# Types
6970
"types-PyYAML~=6.0",
7071
# Formatter
71-
"black[jupyter]~=24.8",
72+
"black[jupyter]~=24.10",
7273
# Style checkers
7374
"doc8~=1.1",
74-
"mypy~=1.11",
75+
"mypy~=1.12",
7576
"flake8~=7.1",
7677
"flake8-pyproject~=1.2",
7778
"flake8-annotations-complexity~=0.0",
@@ -87,65 +88,70 @@ dependencies = [
8788
"flake8-functions~=0.0",
8889
"flake8-import-order~=0.18",
8990
"flake8-mypy~=17.8",
90-
"flake8-pyi~=24.6",
91+
"flake8-pyi~=24.9",
9192
"flake8-pydocstyle~=0.2",
9293
"flake8-return~=1.2",
9394
"flake8-simplify~=0.21",
9495
"flake8-spellcheck~=0.28",
9596
"flake8-use-fstring~=1.4",
9697
"flake8-variables-names~=0.0",
97-
"pep8-naming~=0.13",
98+
"pep8-naming~=0.14",
9899
"darglint~=1.8.1",
99100
"pydoclint[flake8]~=0.5",
100101
"teyit~=0.4",
101102
"refurb~=2.0",
102-
"ruff~=0.6"
103+
"ruff~=0.7"
103104
]
104105

105106
[tool.hatch.envs.hatch-static-analysis.scripts]
106107
format-check = [
107-
"black --check --diff {args:pandoc_latex_admonition docs}",
108+
"black --check --diff {args:src docs}",
108109
"doc8 -q {args:docs README.md} -e .rst -e .md"
109110
]
110111
format-fix = [
111-
"black {args:pandoc_latex_admonition docs}"
112+
"black {args:src docs}"
112113
]
113114
lint-check = [
114-
"refurb {args:pandoc_latex_admonition docs}",
115-
"ruff check {args:pandoc_latex_admonition docs}",
115+
"refurb {args:src docs}",
116+
"ruff check {args:src docs}",
116117
"teyit --show-stats --fail-on-change {args:tests}",
117-
"flake8 {args:pandoc_latex_admonition docs}"
118+
"flake8 {args:src docs}"
118119
]
119120
lint-fix = [
120-
"ruff check --fix {args:pandoc_latex_admonition docs}"
121+
"ruff check --fix {args:src docs}"
121122
]
122123

123-
[tool.hatch.envs.dynamic-lint]
124+
[tool.hatch.envs.lint]
124125
dependencies = [
125126
"slotscheck~=0.19",
126-
"pylint~=3.2"
127+
"pylint~=3.3"
127128
]
128129

129-
[tool.hatch.envs.dynamic-lint.scripts]
130+
[tool.hatch.envs.lint.scripts]
130131
check = [
131-
"slotscheck {args:pandoc_latex_admonition}",
132-
"pylint {args:pandoc_latex_admonition}"
132+
"slotscheck {args:src}",
133+
"pylint {args:src}"
133134
]
134135

135136
[tool.hatch.envs.docs]
136137
dependencies = [
137-
"myst-parser~=2.0",
138-
"Sphinx~=7.2",
139-
"sphinx-rtd-theme~=2.0",
138+
"myst-parser~=4.0",
139+
"Sphinx~=8.1",
140+
"sphinx-rtd-theme~=3.0",
140141
"sphinx-copybutton~=0.5"
141142
]
142143

143144
[tool.hatch.envs.docs.scripts]
144145
build = "sphinx-build docs {args:build/sphinx/html}"
145146

147+
[tool.pytest.ini_options]
148+
consider_namespace_packages = true
149+
pythonpath = ["src"]
150+
146151
[tool.ruff]
147152
# Allow lines to be as long as 88.
148153
line-length = 88
154+
target-version = "py310"
149155

150156
[tool.flake8]
151157
# flake8-docstrings
@@ -221,6 +227,7 @@ warn_return_any = true
221227
# equivalent to --strict option
222228
warn_unused_configs = true
223229
warn_unused_ignores = true
230+
mypy_path = "src"
224231

225232
[[tool.mypy.overrides]]
226233
ignore_missing_imports = true
@@ -230,4 +237,4 @@ module = "panflute.*"
230237
convention = "numpy"
231238

232239
[tool.coverage.run]
233-
source = ["pandoc_latex_admonition"]
240+
source = ["src"]

0 commit comments

Comments
 (0)