-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
112 lines (97 loc) · 3.49 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools >= 61"]
build-backend = "setuptools.build_meta"
[project]
name = "archeryutils"
version = "1.1.1"
description = "A collection of archery utilities in python."
authors = [
{ name="Jack Atkinson", email="[email protected]" },
]
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.10"
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Typing :: Typed',
"Operating System :: OS Independent",
]
dependencies = [
"numpy>=1.20.0",
]
[project.optional-dependencies]
test = [
"pytest>=7.2.0",
"pytest-mock",
]
lint = [
"mypy>=1.0.0",
"coverage",
"pytest>=7.2.0",
"pytest-mock",
"ruff>=0.7.3",
"blackdoc",
]
docs = [
"sphinx",
"sphinx_rtd_theme",
"sphinx-toolbox",
"nbsphinx",
"ipython",
"pickleshare", # https://github.com/ipython/ipython/issues/14237
"ruff>=0.7.3",
"blackdoc",
]
[project.urls]
"Homepage" = "https://github.com/jatkinson1000/archeryutils"
"Bug Tracker" = "https://github.com/jatkinson1000/archeryutils/issues"
"Documentation" = "https://archeryutils.readthedocs.io/"
"Repository" = "https://github.com/jatkinson1000/archeryutils"
[tool.setuptools]
# By default, include-package-data is true in pyproject.toml, so you do
# NOT have to specify this line.
include-package-data = true
[tool.setuptools.packages.find]
where = ["."] # list of folders that contain the packages (["."] by default)
include = ["archeryutils", "archeryutils.*"] # package names should match these glob patterns (["*"] by default)
exclude = ["archeryutils.tests*", "examples.py"] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
[tool.setuptools.package-data]
archeryutils = ["*.json", "round_data_files/*.json", "classifications/*.json"]
[tool.mypy]
warn_unused_configs = true
plugins = ["numpy.typing.mypy_plugin"]
[tool.ruff]
# Run linting and formatting on notebooks
extend-include = ["*.ipynb"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules for full details of each ruleset.
# Enable: D: `pydocstyle`, PL: `pylint`, I: `isort`, W: `pycodestyle whitespace`
# NPY: `numpy`, FLY: `flynt`, RUF: `ruff`
# From flake8: "ARG", "SLF", "S", "BLE", "B", "A", "C4", "EM", "ICN",
# "PIE", "Q", "RSE", "SIM", "TID"
select = ["D", "PL", "I", "E", "W", "NPY", "FLY", "RUF",
"ARG", "SLF", "S", "BLE","B", "A", "C4", "EM", "ICN", "PIE", "Q", "RSE",
"SIM", "TID"]
# Enable D417 (Missing argument description) on top of the NumPy convention.
extend-select = ["D417"]
# Ignore SIM108 (use ternary instead of if-else) as I think it can obscure intent.
# Ignore RUF002 (ambiguous characters) as it does not allow apostrophes in strings.
ignore = ["SIM108", "RUF002"]
[tool.ruff.lint.pydocstyle]
# Use NumPy convention for checking docstrings
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
# Ignore S101 (use of assert) in tests
# Ignore PLR2004 (magic values) in tests as we regularly compare to a numerical value
"**/tests/*" = ["S101", "PLR2004"]