forked from ecmwf/anemoi-training
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
185 lines (168 loc) · 5.06 KB
/
pyproject.toml
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# (C) Copyright 2024 Anemoi contributors.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
[build-system]
requires = [ "setuptools>=60", "setuptools-scm>=8" ]
[project]
name = "anemoi-training"
description = "A package to hold various functions to support training of ML models."
keywords = [ "ai", "tools", "training" ]
license = { file = "LICENSE" }
authors = [
{ name = "European Centre for Medium-Range Weather Forecasts (ECMWF)", email = "[email protected]" },
]
requires-python = ">=3.9,<3.13" # Unable to use 3.13 until pyshtools updates
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dynamic = [ "version" ]
dependencies = [
"anemoi-datasets>=0.5.2",
"anemoi-graphs>=0.4.1",
"anemoi-models>=0.3",
"anemoi-utils[provenance]>=0.4.4",
"datashader>=0.16.3",
"einops>=0.6.1",
"hydra-core>=1.3",
"matplotlib>=3.7.1",
"mlflow>=2.11.1",
"numpy<2", # Pinned until we can confirm it works with anemoi graphs
"pynvml>=11.5",
"pyshtools>=4.10.4",
"pytorch-lightning>=2.1",
"timm>=0.9.2",
"torch>=2.2",
"torch-geometric>=2.3.1,<2.5",
"torchinfo>=1.8",
"tqdm>=4.65",
"zarr>=2.14.2",
]
optional-dependencies.all = [ ]
optional-dependencies.dev = [
"anemoi-training[docs,tests,all]",
"pre-commit>=3.3.3",
]
optional-dependencies.docs = [
"nbsphinx",
"pandoc",
"sphinx",
"sphinx-argparse",
"sphinx-rtd-theme",
]
optional-dependencies.profile = [
"holistictraceanalysis>=0.2",
"pandas>=1.3.2",
"rich>=13.6",
"tabulate>=0.9",
]
optional-dependencies.tests = [ "hypothesis", "pytest", "pytest-mock" ]
urls.Changelog = "https://github.com/ecmwf/anemoi-training/CHANGELOG.md"
urls.Documentation = "https://anemoi-training.readthedocs.io/"
urls.Homepage = "https://github.com/ecmwf/anemoi-training/"
urls.Issues = "https://github.com/ecmwf/anemoi-training/issues"
urls.Repository = "https://github.com/ecmwf/anemoi-training/"
# command for interactive DDP (not supposed to be used directly)
# the dot is intentional, so it doesn't trigger autocomplete
# Files need to be named profiler due to A005 Module `profile` is shadowing a Python builtin module
scripts.".anemoi-training-profile" = "anemoi.training.commands.profiler:main"
scripts.".anemoi-training-train" = "anemoi.training.commands.train:main"
# Add subcommand in the `commands` directory
scripts.anemoi-training = "anemoi.training.__main__:main"
[tool.setuptools_scm]
version_file = "src/anemoi/training/_version.py"
[tool.ruff]
target-version = "py39"
line-length = 120
src = [ "src" ]
exclude = [ "docs/" ]
preview = true
lint.flake8-import-conventions.extend-aliases."pytorch_lightning" = "pl"
lint.pydocstyle.convention = "numpy"
select = [
"A", # flake8 builtins
# "ANN", # flake8-annotations
"ANN001", # Type annotation
"ANN201", # Return type public
"ANN202", # Return type private
"ANN205", # Return type static method
"ANN206", # Return type class method
"ARG", # Unused arguments
"B", # flake8-bugbear
"BLE", # Non-specific exceptions
"C4", # Comprehensions
"C90", # Mccabe complexity
"COM", # Commas
"CPY", # Copyright
# "C", # pylint convention
"D", # pydocstyle
# "DOC", # pydoclint
"DTZ", # Datetimes
"E", # pycodestyle error
"EM", # Error messages
"ERA", # Found unused code
"F", # flake8 error
"FA", # Future annotations
# "EXE", # Executable
# "FBT", # Boolean traps
"FLY", # Fstrings
"FURB", # Modernising code
"G", # flake8 logging format
"ICN", # Import conventions
"ISC", # Implicit string concatenation
"LOG", # Logging
# "I", # isort
"N", # pep8 naming
"NPY", # Numpys
"PERF", # Perfomance linting
"PGH", # Pygrep hooks
"PIE", # Misc lints
# "PL", # Pylint (superset of C, E, R, W)
"PT", # Pytest
"PTH", # Use Pathlib
"Q", # Quotes
"R", # Refactor
"RET", # Return statements
"RSE", # Raises
"RUF", # Ruff specific
"S", # bandit !IMPORTANT
"SIM", # flake8-simplify
"T10", # Debug statements
"T20", # Print statements
"TCH", # Type checking blocks
"TD", # Todos
"TID", # Tidy imports
"TRY", # Exception handling antipatterns
"UP", # Pyupgrade
"W", # pycodestyle warning
"YTT", # flake8-2020
]
ignore = [
"B018",
"B028",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D401",
"E203",
"PT018",
"S101",
"TD003",
]