-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
107 lines (94 loc) · 3.32 KB
/
pyproject.toml
File metadata and controls
107 lines (94 loc) · 3.32 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
[build-system]
requires = ["setuptools>=80", "setuptools-scm[simple]>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[project]
name = "tctrack"
dynamic = ["version"]
description = "A Python package for generating tropical cyclone tracks."
keywords = ["meteorology", "weather", "tropical cyclone", "tracking"]
authors = [
{ name="Jack Atkinson", email="jwa34@cam.ac.uk" },
{ name="Sam Avis", email="sa2329@cam.ac.uk" },
]
readme = "README.md"
license = "GPL-3.0-or-later"
license-files = ["LICENSE"]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"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',
'Programming Language :: Python :: 3.14',
'Typing :: Typed',
"Operating System :: Unix",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Intended Audience :: Science/Research",
]
dependencies = [
"h5py>=3.16.0",
"cf-python>=3.19.0; python_version > '3.10'",
"cf-python<3.19.0; python_version <= '3.10'",
"cftime",
]
[project.optional-dependencies]
test = [
"pytest",
"pytest-mock",
]
lint = [
"ruff",
"blackdoc<=0.4.2",
"black<=25.1.0", # Pin version due to blackdoc incompatibility. Remove once resolved
"mypy",
"pytest",
]
doc = [
"sphinx<8.2.0", # Pin version due to autodoc type hints incompatibilities
"sphinx_rtd_theme",
"sphinx_autodoc_typehints",
"blackdoc<=0.4.2",
"black<=25.1.0", # Pin version due to blackdoc incompatibility. Remove once resolved
]
dev = [
"tctrack[test,lint,doc]",
]
[project.urls]
"Homepage" = "https://github.com/Cambridge-ICCS/TCTrack"
"Repository" = "https://github.com/Cambridge-ICCS/TCTrack"
"Issues" = "https://github.com/Cambridge-ICCS/TCTrack/issues"
[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`, F: `pyflakes`, 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", "F", "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"]
[[tool.mypy.overrides]]
module = ["cftime.*", "cf.*"]
follow_untyped_imports = true