-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (116 loc) · 4.03 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (116 loc) · 4.03 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
[project]
name = "gsffile"
description = "Read and write Gwyddion Simple Field files"
authors = [{ name = "Carlo Dri" }, { name = "Angelo Peronio" }]
license = "MIT"
keywords = ["Gwyddion", "Gwyddion Simple Field", "gsf"]
dynamic = ["version"]
readme = "README.md"
# Test will run against the Python versions listed in the Trove classifiers.
# Support the next release-candidate Python version only after NumPy has published
# binary wheels for it, otherwise the CI would take too long.
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"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",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: File Formats",
"Topic :: Scientific/Engineering :: Image Processing",
"Typing :: Typed",
]
# Status of Python versions
# <https://devguide.python.org/versions/>
# Scientific Python recommendation on Python and NumPy versions to support.
# <https://scientific-python.org/specs/spec-0000/>
requires-python = ">= 3.10"
# Before attempting stunts here, consider the fragile logic
# for oldest_deps in noxfile.py.
dependencies = ["numpy >= 1.24"]
[dependency-groups]
dev = [
"bump-my-version",
"cffconvert",
"mypy",
"prek",
"ruff",
"zizmor",
{ include-group = "test" },
]
test = ["nox >= 2026.08.10", "pytest > 9", "pytest-cov"]
[project.urls]
Repository = "https://github.com/angelo-peronio/gsffile"
Issues = "https://github.com/angelo-peronio/gsffile/issues"
"GSF format" = "http://gwyddion.net/documentation/user-guide-en/gsf.html"
[build-system]
requires = ["hatchling >= 1.26", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch]
build.targets.sdist.exclude = ["/.**", "/scripts", "development.md", "uv.lock"]
version.source = "vcs"
[tool.hatch.version.raw-options]
# Version tag pattern: v[major].[minor].[patch]
# https://setuptools-scm.readthedocs.io/en/latest/config/#setuptools_scm._config.DEFAULT_TAG_REGEX
# Single quote --> literal string, https://toml.io/en/v1.0.0#string
tag_regex = '^(?P<version>v?\d+\.\d+\.\d+)$'
# To be able to publish dev versions to TestPyPI.
# https://github.com/ofek/hatch-vcs/discussions/12
local_scheme = "no-local-version"
[tool.pytest]
addopts = ["-ra", "--doctest-glob=README.md", "--showlocals"]
filterwarnings = ["error"]
log_level = "DEBUG"
minversion = "9"
testpaths = ["README.md", "tests"]
strict = true
[tool.ruff.lint]
extend-select = ["ALL"]
ignore = [
"COM812", # Trailing comma missing
"CPY001", # Missing copyright notice
]
extend-per-file-ignores."tests/*.py" = [
"S101", # Assert used
]
pydocstyle.convention = "numpy"
[tool.mypy]
files = ["src", "tests", "noxfile.py"]
strict = true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
[tool.bumpversion]
tag = true
tag_name = "v{new_version}"
tag_message = "Version v{new_version}"
commit = true
[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = 'version: {current_version}'
replace = 'version: {new_version}'
[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = 'date-released: "\d{{4}}-\d{{2}}-\d{{2}}"'
replace = 'date-released: "{utcnow:%Y-%m-%d}"'
regex = true
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = '''
## Unreleased
'''
replace = '''
## Unreleased
## gsffile {new_version} - {utcnow:%Y-%m-%d}
[PyPI](https://pypi.org/project/gsffile/{new_version}/)
· [conda-forge](https://anaconda.org/conda-forge/gsffile)
· [GitHub release](https://github.com/angelo-peronio/gsffile/releases/tag/v{new_version})
· [source](https://github.com/angelo-peronio/gsffile/tree/v{new_version})
'''