-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (93 loc) · 2.81 KB
/
pyproject.toml
File metadata and controls
126 lines (93 loc) · 2.81 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
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=67.0", "setuptools_scm[toml]>=7.1"]
[project]
name = "example_python_project"
dynamic = ["version"]
dependencies = [
"numpy",
]
requires-python =">=3.11"
authors = [
{name = "Some Body", email = "somebody@example.com"},
# {name = "Another person"}, {email = "different.person@example.com"},
]
maintainers = [
# {name = "Another person"}, {email = "different.person@example.com"},
]
description = "A short description of this example project"
readme = "README.md"
license = {file = "LICENSE"}
keywords = []
classifiers = [
# Full List: https://pypi.org/classifiers/
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 4 - Beta",
# Indicate who your project is intended for
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
# Pick your license as you wish (see also "license" above)
# "License :: OSI Approved :: MIT License",
# "License :: OSI Approved :: Apache Software License",
]
[project.urls]
Homepage = "https://github.com/somebody/example_python_project/"
# Documentation = "https://readthedocs.org"
# Repository = "https://github.com/me/spam.git"
# Issues = "https://github.com/me/spam/issues"
# Changelog = "https://github.com/me/spam/blob/master/CHANGELOG.md"
[project.optional-dependencies]
dev = [
"setuptools_scm",
"pytest",
"pytest-cov",
"mypy",
"sphinx",
"pre-commit",
"ruff",
]
[tool.setuptools]
packages = ["example_python_project"]
[tool.setuptools_scm]
fallback_version = "0.0.0-dev"
# write_to = "example_python_project/_version.py"
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
line-length = 88
indent-width = 4
[tool.ruff.lint]
ignore = []
[tool.ruff.lint.per-file-ignores]
# Don't complaine about unused imports in __init__.py
"__init__.py" = ["F401", "F403"]
# pytest configuration
# https://docs.pytest.org/en/7.2.x/reference/customize.html
[tool.pytest.ini_options]
testpaths = "example_python_project"
[tool.coverage.run]
branch = true
source = ["example_python_project"]
parallel = true
[tool.coverage.report]
omit = ['*_test.py']
exclude_lines = [
'\#\s*pragma: no cover',
'^\s*raise AssertionError\b',
'^\s*raise NotImplementedError\b',
'^\s*return NotImplemented\b',
'^\s*raise$',
'^assert False\b',
'''^if __name__ == ['"]__main__['"]:$''',
]
# mypy typecheck configuration
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "example_python_project"
# Suppresses error about unresolved imports (i.e. from numpy)
ignore_missing_imports = true
# Disallows functions without type annotations
disallow_untyped_defs = true