Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
132 lines (116 loc) · 3.99 KB
/
Copy pathpyproject.toml
File metadata and controls
132 lines (116 loc) · 3.99 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
[build-system]
requires = ["setuptools>=80", "setuptools-scm[simple]>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
tag.prefix = "v"
[tool.setuptools.package-data]
"tctrack.machine_learning" = ["data/*.nc"]
[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.11"
classifiers = [
"Development Status :: 4 - Beta",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
'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; platform_system != 'Windows'",
"cf-python>=3.19.0,<=3.20.1; platform_system == 'Windows'",
"cftime",
"torch",
"huggingface_hub",
"scipy",
]
[project.optional-dependencies]
test = [
"pytest",
"pytest-mock",
"xarray",
]
lint = [
"ruff==0.15.17", # match .pre-commit-config.yaml
"blackdoc>=0.4.2", # Pin versions for black-blackdoc compatibilty.
"black>=25.9.0", # See https://blackdoc.readthedocs.io/en/latest/changelog.html
"mypy==2.4.0", # match .pre-commit-config.yaml
"pytest",
"xarray",
]
doc = [
"sphinx<8.2.0", # Pin version due to autodoc type hints incompatibilities
"sphinx_rtd_theme",
"sphinx_autodoc_typehints",
"nbsphinx",
"nbsphinx_link",
]
tutorial = [
"jupyter",
"matplotlib",
"huracanpy",
]
dev = [
"tctrack[test,lint,doc,tutorial]",
"pre-commit",
]
[project.urls]
"Homepage" = "https://github.com/Cambridge-ICCS/TCTrack"
"Repository" = "https://github.com/Cambridge-ICCS/TCTrack"
"Issues" = "https://github.com/Cambridge-ICCS/TCTrack/issues"
[project.scripts]
build-db = "tctrack.build_db.build_db:main"
tctrack-convert = "tctrack.build_db.tctrack_convert:main"
[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 PLR0913 (too many arguments) PLR0917 still restricts non-keyword-only args.
ignore = ["SIM108", "RUF002", "PLR0913"]
[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 SLF001 (private member access) in tests
# Ignore PLR2004 (magic values) in tests as we regularly compare to a numerical value
"**/tests/*" = ["S101", "SLF001", "PLR2004"]
[[tool.mypy.overrides]]
module = ["cftime.*", "cf.*"]
follow_untyped_imports = true
[[tool.mypy.overrides]]
# No type stubs are available for these.
module = ["h5py.*", "scipy.*"]
ignore_missing_imports = true