Skip to content

Commit 01cc792

Browse files
committed
📝 🔧 Check and format pyproject.toml
* Add pyproject-fmt and validate-pyproject
1 parent 6a190b5 commit 01cc792

File tree

2 files changed

+74
-49
lines changed

2 files changed

+74
-49
lines changed

.pre-commit-config.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,25 @@ repos:
1212
- repo: https://github.com/pre-commit/pre-commit-hooks
1313
rev: v6.0.0
1414
hooks:
15-
- id: trailing-whitespace
16-
- id: end-of-file-fixer
15+
- id: check-json
16+
types: [file] # override `types: [json]`
17+
files: \.(json|ipynb)$
18+
- id: check-toml
1719
- id: check-yaml
1820
types: [file]
1921
files: \.(yml|yaml|cff)$
2022
- id: check-added-large-files
2123
args: ['--maxkb=2048']
22-
- id: check-json
23-
types: [file] # override `types: [json]`
24-
files: \.(json|ipynb)$
24+
- id: end-of-file-fixer
25+
- id: trailing-whitespace
26+
- repo: https://github.com/tox-dev/pyproject-fmt
27+
rev: v2.7.0
28+
hooks:
29+
- id: pyproject-fmt
30+
- repo: https://github.com/abravalheri/validate-pyproject
31+
rev: v0.24.1
32+
hooks:
33+
- id: validate-pyproject
2534
- repo: https://github.com/sphinx-contrib/sphinx-lint
2635
rev: v1.0.0
2736
hooks:

pyproject.toml

Lines changed: 60 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,68 +3,84 @@
33
# SPDX-License-Identifier: BSD-3-Clause
44

55
[project]
6-
name = "Python4DataScience"
6+
name = "python4datascience"
77
version = "24.2.0"
8-
authors = [
9-
{ name="Veit Schiele", email="veit@cusy.io" },
10-
]
118
description = "Teaching materials for the cusy training courses on Python-based data science workflows: https://cusy.io/en/seminars"
129
readme = "README.rst"
10+
authors = [
11+
{ name = "Veit Schiele", email = "veit@cusy.io" },
12+
]
1313
requires-python = ">=3.9"
1414
classifiers = [
15-
"Programming Language :: Python :: 3",
16-
"License :: OSI Approved :: BSD License",
17-
"Operating System :: OS Independent",
15+
"License :: OSI Approved :: BSD License",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python :: 3 :: Only",
18+
"Programming Language :: Python :: 3.9",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
1823
]
19-
dependencies = []
24+
dependencies = [ ]
2025

21-
[dependency-groups]
22-
docs = [
23-
"furo",
24-
"ipython",
25-
"ipywidgets",
26-
"matplotlib",
27-
"nbsphinx",
28-
"notebook",
29-
"sphinx<8.2",
30-
"sphinx-copybutton",
31-
"sphinx-lint",
32-
"sphinx-notfound-page",
33-
"sphinx-sitemap",
34-
"sphinx_inline_tabs",
35-
"sphinxcontrib-svg2pdfconverter",
36-
"sphinxext.opengraph", # matplotlib is required for social cards
37-
]
26+
urls."Bug Tracker" = "https://github.com/cusyio/Python4DataScience/issues"
27+
urls."Homepage" = "https://github.com/cusyio/Python4DataScience/"
3828

29+
[dependency-groups]
3930
dev = [
40-
{ include-group = "docs" },
41-
"pre-commit",
42-
"codespell",
43-
"vale",
31+
"codespell",
32+
"pre-commit",
33+
"vale",
34+
{ include-group = "docs" },
35+
]
36+
docs = [
37+
"furo",
38+
"ipython",
39+
"ipywidgets",
40+
"matplotlib",
41+
"nbsphinx",
42+
"notebook",
43+
"sphinx<8.2",
44+
"sphinx-copybutton",
45+
"sphinx-inline-tabs",
46+
"sphinx-lint",
47+
"sphinx-notfound-page",
48+
"sphinx-sitemap",
49+
"sphinxcontrib-svg2pdfconverter",
50+
"sphinxext-opengraph", # matplotlib is required for social cards
4451
]
45-
46-
[project.urls]
47-
"Homepage" = "https://github.com/cusyio/Python4DataScience/"
48-
"Bug Tracker" = "https://github.com/cusyio/Python4DataScience/issues"
4952

5053
[tool.setuptools]
51-
packages = []
54+
packages = [ ]
5255

5356
[tool.black]
5457
line-length = 79
5558

5659
[tool.isort]
57-
atomic=true
58-
force_grid_wrap=0
59-
include_trailing_comma=true
60-
lines_after_imports=2
61-
lines_between_types=1
62-
multi_line_output=3
63-
not_skip="__init__.py"
64-
use_parentheses=true
60+
atomic = true
61+
force_grid_wrap = 0
62+
include_trailing_comma = true
63+
lines_after_imports = 2
64+
lines_between_types = 1
65+
multi_line_output = 3
66+
not_skip = "__init__.py"
67+
use_parentheses = true
6568

66-
known_first_party="Python4DataScience"
67-
known_third_party=["Cython", "accounts_pb2", "accounts_pb2_grpc", "dataprep", "grpc", "mpi4py", "numpy", "pandas", "pydantic", "pytest", "requests", "setuptools"]
69+
known_first_party = "Python4DataScience"
70+
known_third_party = [
71+
"Cython",
72+
"accounts_pb2",
73+
"accounts_pb2_grpc",
74+
"dataprep",
75+
"grpc",
76+
"mpi4py",
77+
"numpy",
78+
"pandas",
79+
"pydantic",
80+
"pytest",
81+
"requests",
82+
"setuptools",
83+
]
6884

6985
[tool.codespell]
7086
skip = "*.csv, *.html, *.pdf, *.rst, *.ipynb, ./docs/_build/*, */books.json, */books.txt, ./styles/*, ./Python4DataScience.egg-info/*"

0 commit comments

Comments
 (0)