-
Notifications
You must be signed in to change notification settings - Fork 48
/
pyproject.toml
107 lines (97 loc) · 2.97 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
[project]
name = "neural-lam"
version = "0.2.0"
description = "LAM-based data-driven forecasting"
authors = [
{ name = "Joel Oskarsson", email = "joel.oskarsson@liu.se" },
{ name = "Simon Adamov", email = "Simon.Adamov@meteoswiss.ch" },
{ name = "Leif Denby", email = "lcd@dmi.dk" },
]
# 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.22.3",
"mllam-data-prep>=0.5.0",
]
requires-python = ">=3.9"
[project.optional-dependencies]
dev = ["pre-commit>=3.8.0", "pytest>=8.3.2", "pooch>=1.8.2"]
[tool.setuptools]
py-modules = ["neural_lam"]
[tool.black]
line-length = 80
[tool.isort]
default_section = "THIRDPARTY"
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
[tool.pdm]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"