-
Notifications
You must be signed in to change notification settings - Fork 195
Expand file tree
/
Copy pathpyproject.toml
More file actions
131 lines (119 loc) · 3.63 KB
/
pyproject.toml
File metadata and controls
131 lines (119 loc) · 3.63 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
[project]
name = "neural-lam"
dynamic = ["version"]
description = "LAM-based data-driven forecasting"
authors = [
{ name = "Joel Oskarsson", email = "joel.oskarsson@outlook.com" },
{ name = "Simon Adamov", email = "Simon.Adamov@meteoswiss.ch" },
{ name = "Leif Denby", email = "lcd@dmi.dk" },
{ name = "Simon Kamuk Christiansen", email = "skc@dmi.dk" },
{ name = "Kasper Hintz", email = "kah@dmi.dk" },
{ name = "Erik Larsson", email = "erik.larsson@liu.se" },
{ name = "Hauke Schulz", email = "has@dmi.dk" },
{ name = "Daniel Holmberg", email = "daniel.holmberg@helsinki.fi" },
]
readme = "README.md"
license = { text = "MIT" }
# PEP 621 project metadata
# See https://www.python.org/dev/peps/pep-0621/
dependencies = [
"numpy>=1.24.2",
"wandb>=0.13.10",
"scipy>=1.10.0",
"pytorch-lightning>=2.0.3",
"shapely>=2.0.1",
"networkx>=3.0",
"Cartopy>=0.22.0",
"pyproj>=3.4.1",
"tueplots>=0.0.8",
"matplotlib>=3.7.0",
"plotly>=5.15.0",
"torch>=2.3.0",
"torch-geometric==2.3.1",
"parse>=1.20.2",
"dataclass-wizard<0.31.0",
"mllam-data-prep>=0.5.0",
"mlflow>=2.16.2",
"boto3>=1.35.32",
"nvidia-ml-py>=13.580.82",
]
requires-python = ">=3.10"
[dependency-groups]
dev = ["pre-commit>=3.8.0", "pytest>=8.3.2", "pooch>=1.8.2"]
[tool.black]
line-length = 80
[tool.isort]
default_section = "THIRDPARTY" # codespell:ignore
profile = "black"
# Headings
import_heading_stdlib = "Standard library"
import_heading_thirdparty = "Third-party"
import_heading_firstparty = "First-party"
import_heading_localfolder = "Local"
# Known modules to avoid misclassification
known_standard_library = [
# Add standard library modules that may be misclassified by isort
]
known_third_party = [
# Add third-party modules that may be misclassified by isort
"wandb",
]
known_first_party = [
# Add first-party modules that may be misclassified by isort
"neural_lam",
]
line_length = 80
[tool.flake8]
max-line-length = 80
ignore = [
"E203", # Allow whitespace before ':' (https://github.com/PyCQA/pycodestyle/issues/373)
"I002", # Don't check for isort configuration
"W503", # Allow line break before binary operator (PEP 8-compatible)
]
per-file-ignores = [
"__init__.py: F401", # Allow unused imports
]
[tool.codespell]
skip = "requirements/*"
# Pylint config
[tool.pylint]
ignore = [
"create_mesh.py", # Disable linting for now, as major rework is planned/expected
]
# Temporary fix for import neural_lam statements until set up as proper package
init-hook = 'import sys; sys.path.append(".")'
[tool.pylint.TYPECHECK]
generated-members = ["numpy.*", "torch.*"]
[tool.pylint.'MESSAGES CONTROL']
disable = [
"C0114", # 'missing-module-docstring', Do not require module docstrings
"R0901", # 'too-many-ancestors', Allow many layers of sub-classing
"R0902", # 'too-many-instance-attribtes', Allow many attributes
"R0913", # 'too-many-arguments', Allow many function arguments
"R0914", # 'too-many-locals', Allow many local variables
"W0223", # 'abstract-method', Subclasses do not have to override all abstract methods
]
[tool.pylint.DESIGN]
max-statements = 100 # Allow for some more involved functions
[tool.pylint.IMPORTS]
allow-any-import-level = "neural_lam"
[tool.pylint.SIMILARITIES]
min-similarity-lines = 10
[build-system]
requires = ["hatchling>=1.27.0", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
core-metadata-version = "2.4"
[tool.hatch.version]
source = "vcs"
fallback-version = "0.0.0"
[tool.hatch.build.targets.sdist]
exclude = [
".venv/",
"venv/",
]
[tool.hatch.build.targets.wheel]
exclude = [
".venv/",
"venv/",
]