-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml.jinja
More file actions
159 lines (144 loc) · 4.36 KB
/
pyproject.toml.jinja
File metadata and controls
159 lines (144 loc) · 4.36 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
[project]
name = "{{ project_slug }}"
version = "{{ version }}"
description = "{{ project_short_description }}"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">={{ minimum_python_version }}"
authors = [
{ name = "The pyfar developers", email = "info@pyfar.org" }
]
keywords = [
{%- for key in keywords.split(',') %}
"{{ key.strip() }}",
{%- endfor %}
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"{{ pypi_license_classifier }}",
"Natural Language :: English",
"Programming Language :: Python :: 3",
{%- for version in valid_python_versions %}
"Programming Language :: Python :: {{ version }}",
{%- endfor %}
]
dependencies = [
{%- for key in dependencies.split(',') %}
"{{ key.strip() }}",
{%- endfor %}
]
[project.optional-dependencies]
deploy = [
"twine",
"wheel",
"build",
"setuptools",
"bump-my-version",
]
tests = [
"pytest",
"pytest-cov",
"watchdog",
"ruff==0.8.3",
"coverage",
]
docs = [
"sphinx",
"autodocsumm>=0.2.14",
"pydata-sphinx-theme",
"sphinx_mdinclude",
"sphinx-design",
"sphinx-favicon",
"sphinx-reredirects",
]
dev = ["{{ project_slug }}[deploy,tests,docs]"]
[project.urls]
Tracker = "https://github.com/{{ git_username }}/{{ project_slug }}/issues"
Documentation = "https://{{ project_slug }}.readthedocs.io/"
Download = "https://pypi.org/project/{{ project_slug }}/"
Homepage = "https://pyfar.org/"
Source = "https://github.com/{{ git_username }}/{{ project_slug }}"
Changelog = "https://github.com/{{ git_username }}/{{ project_slug }}/blob/main/HISTORY.rst"
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages]
find = {} # Scan the project directory with the default parameters
[tool.ruff]
exclude = [
".git",
"docs",
{%- for key in ruff_ignore.split(',') %}
"{{ key.strip() }}",
{%- endfor %}
]
line-length = 79
lint.ignore = [
"D200", # One-line docstring should fit on one line with quotes
"D202", # No blank lines allowed after function docstring
"D205", # 1 blank line required between summary line and description
"D401", # First line should be in imperative mood
"D404", # First word of the docstring should not be "This"
"B006", # Do not use mutable data structures for argument defaults
"B008", # Do not perform calls in argument defaults
"PT018", # Assertion should be broken down into multiple parts
"PT019", # Fixture `_` without value is injected as parameter
]
lint.select = [
"B", # bugbear extension
"ARG", # Remove unused function/method arguments
"C4", # Check for common security issues
"E", # PEP8 errors
"F", # Pyflakes
"W", # PEP8 warnings
"D", # Docstring guidelines
"NPY", # Check all numpy related deprecations
"D417", # Missing argument descriptions in the docstring
"PT", # Pytest style
"A", # Avoid builtin function and type shadowing
"ERA", # No commented out code
"NPY", # Check all numpy related deprecations
"COM", # trailing comma rules
"I002", # missing required import
"TID252", # Use absolute over relative imports
"FIX", # Code should not contain FIXME, TODO, etc
]
# Ignore missing docstrings in tests
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D100",
"D101",
"D103",
"D104",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.bumpversion]
current_version = "{{ version }}"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = true
ignore_missing_version = false
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = '\nversion = "{current_version}"'
replace = '\nversion = "{new_version}"'
[[tool.bumpversion.files]]
filename = "{{ project_slug }}/__init__.py"
search = "__version__ = '{current_version}'"
replace = "__version__ = '{new_version}'"