File size: 2,458 Bytes
a5be142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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="PVNet"
description = "PVNet"
authors = [{name="Peter Dudfield", email="info@openclimatefix.org"}]
dynamic = ["version", "readme"]
license={file="LICENCE"}

dependencies = [
    "ocf-data-sampler>=0.2.10",
    "numpy",
    "pandas",
    "matplotlib",
    "xarray",
    "h5netcdf",
    "torch>=2.0.0",
    "lightning",
    "torchvision",
    "pytest",
    "pytest-cov",
    "typer",
    "sqlalchemy",
    "fsspec[s3]",
    "wandb",
    "huggingface-hub",
    "tqdm",
    "omegaconf",
    "hydra-core",
    "rich",
    "einops",
]

[tool.setuptools.dynamic]
version = {attr = "pvnet.__version__"}
readme = {file = "README.md", content-type = "text/markdown"}

[tool.setuptools.package-dir]
"pvnet" = "pvnet"

[project.optional-dependencies]
dev=[
    "pvlive-api",
    "ruff",
    "mypy",
    "pre-commit",
    "pytest",
    "pytest-cov",
]
all_models=[
    "pytorch-tabnet",
    "efficientnet_pytorch"
]
all=["PVNet[dev,all_models]"]

[tool.mypy]
exclude = [
    "^tests/",
]
disallow_untyped_defs = true
disallow_any_unimported = true
no_implicit_optional = true
check_untyped_defs = true
warn_return_any = true
warn_unused_ignores = true
show_error_codes = true
warn_unreachable = true

[[tool.mypy.overrides]]
module = [
]
ignore_missing_imports = true

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
    "tests",
]

[tool.ruff]
line-length = 100
exclude = [
    ".ipynb_checkpoints",
    "configs.example",
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".hg",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".pytype",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "venv",
    "tests",
]

# Assume Python 3.10.
target-version = "py310"
fix = false

[tool.ruff.lint]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "I"]
unfixable = []
select = ["E", "F", "D", "I"]
ignore-init-module-imports = true
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
ignore = ["D200","D202","D210","D212","D415","D105",]

[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10

[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "E402"]