-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
128 lines (116 loc) · 3.37 KB
/
Copy pathpyproject.toml
File metadata and controls
128 lines (116 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Refer to: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
# For pytest: https://docs.pytest.org/en/stable/reference/customize.html
[build-system]
requires = ["setuptools >= 84.0.0"]
build-backend = "setuptools.build_meta"
[project]
dynamic = ["version"]
name = "my_package"
description="My Awesome New Package"
authors = [
{name = "Nathan A. Mahynski", email = "nathan.mahynski@gmail.com"}
]
maintainers = [
{name = "Nathan A. Mahynski", email = "nathan.mahynski@gmail.com"}
]
keywords = []
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
readme = "README.md"
# Replace with an SPDX expression (e.g. license = "MIT") once LICENSE.md
# is populated. See PEP 639.
license = {file = "LICENSE.md"}
requires-python = ">=3.10"
# Intentionally empty: this is a template. Add only what your package actually
# imports at runtime. Heavy science deps live in the `science` extra below so
# users opt in.
dependencies = []
[project.optional-dependencies]
science = [
# Loose floors chosen to match Python 3.13 wheel availability on PyPI.
# Tighten only when your code actually depends on a newer API.
"matplotlib>=3.9",
"numpy>=2.2.6",
"pandas>=2.2",
"scikit-learn>=1.7.2",
"scipy>=1.15.3",
"seaborn>=0.13.2",
]
test = [
"pytest>=9.1.1",
"pytest-cov",
]
docs = [
"sphinx",
"sphinx-book-theme>=1.1.4",
"readthedocs-sphinx-search>=0.3.2",
"nbsphinx>=0.9.2",
"sphinx_gallery>=0.21.0",
]
notebook = [
"IPython",
"ipywidgets",
"ipykernel",
]
dev = [
"my_package[test,docs,notebook]",
"pre-commit>=4.6.2",
"mypy",
]
[tool.pytest.ini_options]
testpaths = [
"tests",
]
[tool.coverage.run]
source = ["my_package"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
]
[tool.mypy]
# Permissive defaults so a fresh template checkout passes. Tighten as your
# code grows: turn on `disallow_untyped_defs = true` once you're ready to
# require type annotations on public APIs.
python_version = "3.10"
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
strict_equality = true
check_untyped_defs = true
[tool.setuptools.packages.find]
where = ["."]
include = ["my_package*"]
[tool.setuptools.package-data]
# Ship the PEP 561 marker so downstream consumers see the package's type hints.
my_package = ["py.typed"]
[tool.setuptools.dynamic]
version = {attr = "my_package.__version__"}
[project.urls]
Repository = "https://github.com/mahynski/my_package.git"
Documentation = "https://my_package.readthedocs.io/"
Issues = "https://github.com/mahynski/my_package/issues"