Skip to content

Commit a0e7922

Browse files
committed
📝 🔧 Check and format pyproject.toml
* Add pyproject-fmt and validate-pyproject
1 parent bdd381e commit a0e7922

File tree

3 files changed

+51
-36
lines changed

3 files changed

+51
-36
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,18 @@ repos:
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer
13+
- id: check-toml
1314
- id: check-yaml
1415
- id: check-added-large-files
1516
args: ['--maxkb=1024']
17+
- repo: https://github.com/tox-dev/pyproject-fmt
18+
rev: v2.7.0
19+
hooks:
20+
- id: pyproject-fmt
21+
- repo: https://github.com/abravalheri/validate-pyproject
22+
rev: v0.24.1
23+
hooks:
24+
- id: validate-pyproject
1625
- repo: https://github.com/sphinx-contrib/sphinx-lint
1726
rev: v1.0.0
1827
hooks:

docs/packs/distribution.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ like this, for example:
8888
* `pypackaging-native <https://pypackaging-native.github.io>`_
8989

9090
.. note::
91-
With `validate-pyproject
92-
<https://validate-pyproject.readthedocs.io/en/latest/>`_ you can check your
93-
:file:`pyproject.toml` file.
91+
With `check-toml
92+
<https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#check-toml>`_,
93+
`pyproject-fmt
94+
<https://pyproject-fmt.readthedocs.io/en/latest/>`_ and `validate-pyproject
95+
<https://validate-pyproject.readthedocs.io/en/latest/>`_ you can format and
96+
check your :file:`pyproject.toml` file.
9497

9598
.. seealso::
9699
If you want to look at alternatives to ``hatchling``:

pyproject.toml

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,51 @@
11
[project]
22
name = "python-basics-tutorial"
33
version = "24.2.0"
4-
authors = [
5-
{ name="Veit Schiele", email="veit@cusy.io" },
6-
]
74
description = "Training materials for our Python basics course: https://cusy.io/en/seminars"
85
readme = "README.rst"
9-
License-Expression = "BSD-3-Clause"
10-
License-File = [ "LICENSE" ]
6+
license = "BSD-3-Clause"
7+
license-files = [ "LICENSE" ]
8+
authors = [
9+
{ name = "Veit Schiele", email = "veit@cusy.io" },
10+
]
1111
requires-python = ">=3.9"
1212
classifiers = [
13-
"Programming Language :: Python :: 3",
14-
"Operating System :: OS Independent",
13+
"Operating System :: OS Independent",
14+
"Programming Language :: Python :: 3 :: Only",
15+
"Programming Language :: Python :: 3.9",
16+
"Programming Language :: Python :: 3.10",
17+
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13",
1520
]
16-
dependencies = []
21+
dependencies = [ ]
1722

18-
[dependency-groups]
19-
docs = [
20-
"furo",
21-
"ipython",
22-
"ipywidgets",
23-
"matplotlib", # matplotlib is required for social cards
24-
"nbsphinx",
25-
"pygments-pytest",
26-
"sphinx-inline-tabs",
27-
"sphinx-lint",
28-
"sphinx-notfound-page",
29-
"sphinx-sitemap",
30-
"sphinx_copybutton",
31-
"sphinxcontrib-svg2pdfconverter",
32-
"sphinxcontrib.plantuml",
33-
"sphinxext.opengraph",
34-
]
23+
urls."Bug Tracker" = "https://github.com/veit/python-basics-tutorial/issues"
24+
urls."Homepage" = "https://github.com/veit/python-basics-tutorial/"
3525

26+
[dependency-groups]
3627
dev = [
37-
{ include-group = "docs" },
38-
"pre-commit",
39-
"codespell",
40-
"vale"
28+
"codespell",
29+
"pre-commit",
30+
"vale",
31+
{ include-group = "docs" },
32+
]
33+
docs = [
34+
"furo",
35+
"ipython",
36+
"ipywidgets",
37+
"matplotlib", # matplotlib is required for social cards
38+
"nbsphinx",
39+
"pygments-pytest",
40+
"sphinx-copybutton",
41+
"sphinx-inline-tabs",
42+
"sphinx-lint",
43+
"sphinx-notfound-page",
44+
"sphinx-sitemap",
45+
"sphinxcontrib-plantuml",
46+
"sphinxcontrib-svg2pdfconverter",
47+
"sphinxext-opengraph",
4148
]
42-
43-
[project.urls]
44-
"Homepage" = "https://github.com/veit/python-basics-tutorial/"
45-
"Bug Tracker" = "https://github.com/veit/python-basics-tutorial/issues"
4649

4750
[tool.codespell]
4851
ignore-words-list = "ist, symbl, allo"

0 commit comments

Comments
 (0)