forked from ecmwf/WeatherGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
103 lines (87 loc) · 2.06 KB
/
pyproject.toml
File metadata and controls
103 lines (87 loc) · 2.06 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
[project]
name = "weathergen-common"
version = "0.1.0"
description = "The WeatherGenerator Machine Learning Earth System Model"
readme = "../../README.md"
requires-python = ">=3.12,<3.13"
dependencies = [
"xarray>=2025.6.1",
"dask>=2024.9.1",
"zarr~=3.1.3",
"numcodecs<0.16.0",
"astropy_healpix~=1.1.2",
"omegaconf~=2.3.0",
"pyyaml",
]
[dependency-groups]
dev = [
"pytest~=8.3.5",
"pytest-mock>=3.14.1",
"ruff==0.9.7",
"pyrefly==0.36.0",
]
[tool.pyrefly]
project-includes = ["src/"]
project-excludes = [
]
[tool.pyrefly.errors]
bad-argument-type = false
unsupported-operation = false
missing-attribute = false
no-matching-overload = false
bad-context-manager = false
[tool.pyrefly.ignores]
import-error = [
"torch",
]
# The linting configuration
[tool.ruff]
# Wide rows
line-length = 100
[tool.ruff.lint]
# All disabled until the code is formatted.
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
# Banned imports
"TID",
# Naming conventions
"N",
# print
"T201"
]
# These rules are sensible and should be enabled at a later stage.
ignore = [
# "B006",
"B011",
"UP008",
"SIM117",
"SIM118",
"SIM102",
"SIM401",
# To ignore, not relevant for us
"SIM108", # in case additional norm layer supports are added in future
"N817", # we use heavy acronyms, e.g., allowing 'import LongModuleName as LMN' (LMN is accepted)
"E731", # overly restrictive and less readable code
"N812", # prevents us following the convention for importing torch.nn.functional as F
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"numpy.ndarray".msg = "Do not use 'ndarray' to describe a numpy array type, it is a function. Use numpy.typing.NDArray or numpy.typing.NDArray[np.float32] for example"
[tool.ruff.format]
# Use Unix `\n` line endings for all files
line-ending = "lf"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/weathergen"]