-
Notifications
You must be signed in to change notification settings - Fork 34
/
pyproject.toml
237 lines (220 loc) · 5.84 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "earth2studio"
authors = [
{ name="NVIDIA Modulus Team"},
]
description = "Open-source deep-learning framework for exploring, building and deploying AI weather/climate workflows."
readme = "README.md"
requires-python = ">=3.10"
license = {text = "Apache 2.0"}
dependencies = [
"cfgrib >= 0.9.10.3",
"cftime",
"fsspec>=2024.2.0",
"gcsfs",
"h5py>=3.2.0",
"h5netcdf>=1.0.0",
"huggingface-hub>=0.4.0",
"importlib_metadata",
"loguru",
"netCDF4>=1.6.4",
"ngcsdk>=3.48.0,<3.55.0",
"numpy>=1.24.0",
"nvidia-modulus@git+https://github.com/NVIDIA/modulus.git",
"omegaconf",
"python-dotenv",
"s3fs>=2023.5.0",
"setuptools>=67.6.0",
"torch>=2.0.0",
"torch_harmonics==0.6.*",
"tqdm>=4.65.0",
"xarray[parallel]>=2023.1.0",
"zarr>=2.14.2",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3 :: Only',
"Intended Audience :: Science/Research",
"Environment :: GPU",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
'Typing :: Typed',
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/NVIDIA/earth2studio"
Documentation = "https://nvidia.github.io/earth2studio"
Issues = "https://github.com/NVIDIA/earth2studio/issues"
Changelog = "https://github.com/NVIDIA/earth2studio/blob/main/CHANGELOG.md"
[project.optional-dependencies]
data = [
"cdsapi >= 0.7.4",
'eccodes>=1.4.0; python_version<"3.12"',
"ecmwflibs>=0.5.2",
"ecmwf-opendata>=0.3.3",
]
fengwu = [
"onnxruntime-gpu",
]
fuxi = [
"onnxruntime-gpu",
]
pangu = [
"onnxruntime-gpu",
]
sfno = [
# makani needs to be installed manually
# "makani[all] @ git+https://github.com/NVIDIA/modulus-makani.git@v0.1.0",
"jsbeautifier", # makani
"numba", # makani
"pynvml", # makani
"ruamel.yaml", # makani
"torch-harmonics", # makani
"tensorly", # makani
"tensorly-torch" # makani
]
corrdiff = [
"einops>=0.7.0",
]
all = [
"cdsapi >= 0.7.4",
"cfgrib >= 0.9.10.3",
'eccodes>=1.4.0; python_version<"3.12"',
"ecmwflibs>=0.5.2",
"ecmwf-opendata>=0.3.3",
"herbie-data",
"onnxruntime-gpu",
"jsbeautifier",
"pynvml",
"numba",
"ruamel.yaml",
"torch-harmonics",
"tensorly",
"tensorly-torch",
"einops>=0.7.0",
]
dev = [
"black==22.10.0",
"coverage>=6.5.0", # TODO: Bump back to 7.2.0 with next version of ngcsdk
"interrogate==1.5.0",
"mypy",
"pre-commit",
"pytest>=6.0.0",
"pytest-timeout>=2.0.1",
"pytest-skip-slow>=0.0.5",
"pyyaml>=6.0",
"types-requests",
"ruff==0.1.5",
]
docs = [
"cartopy",
"matplotlib",
"scipy",
"sphinx-design",
"sphinx>=6.0.0",
"jupytext>=1.15.0",
"sphinx-autodoc-typehints>=1.24.0",
"sphinx-gallery>=0.12.0",
"sphinx-togglebutton>=0.3.0",
"myst-parser>=0.18.0",
"sphinx-favicon>=1.0.1",
"pydata-sphinx-theme==0.15.2",
]
[tool.setuptools.dynamic]
version = {attr = "earth2studio.__version__"}
[tool.setuptools.packages.find]
include = ["earth2studio", "earth2studio.*"]
[tool.ruff]
# Enable flake8/pycodestyle (`E`), Pyflakes (`F`), flake8-bandit (`S`),
# isort (`I`), and performance 'PERF' rules.
select = ["E", "F", "S", "I", "PERF"]
fixable = ["I"]
# Never enforce `E402`, `E501` (line length violations),
# and `S311` (random number generators)
ignore = ["E501", "S311"]
# Exclude the examples and experimental folders
exclude = []
[tool.ruff.per-file-ignores]
# Ignore `F401` (import violations) in all `__init__.py` files, and in `docs/*.py`.
"__init__.py" = ["F401"]
"docs/*.py" = ["F401"]
"examples/*.py" = ["E402"]
# Ignore `S101` (assertions) in all `test` files.
"test/*.py" = ["S101"]
[tool.pytest.ini_options]
testpaths = ["test"]
norecursedirs = [".git", "third_party"]
# show extra info on xfailed, xpassed, and skipped tests
addopts = ["-vv", "-r", "xfXs"]
markers = [
"slow: marks tests as slow (deselect with: -m 'not slow')",
"cli: marks tests which run CLIs"
]
asyncio_mode = "auto"
# ==== Coverage.py configuration (ran using pytest-cov) ====
# See: https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.run]
branch = true
concurrency = ["multiprocessing", "thread"]
source = ["earth2studio"]
omit = [
"third_party/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
]
exclude_also = [
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
# Don't complain about protocols:
"@runtime_checkable",
]
omit = [
# omit anything in a .local directory anywhere
"test/*",
"earth2studio/models/nn/*",
]
show_missing = true
fail_under = 75
[tool.coverage.xml]
output = "e2studio.coverage.xml"
[tool.interrogate]
ignore-init-method = true
ignore-init-module = true
ignore-magic = true
ignore-semiprivate = true
ignore-private = true
ignore-property-decorators = true
ignore-module = true
ignore-nested-functions = true
ignore-nested-classes = true
fail-under = 95
color = true
omit-covered-files = false
verbose = 2
exclude = ["setup.py", "test/*", "docs", "build"]
ignore-regex = ["^get$", "^mock_.*", ".*BaseClass.*"]
# ==== MyPy configuration ====
# See: https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
python_version = "3.10"
packages = ['earth2studio']
exclude = [
'^(examples|test|docs)'
]
disallow_untyped_calls = true
disallow_untyped_defs = true
check_untyped_defs = true
implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = false
follow_imports = 'skip'