-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
180 lines (166 loc) · 4.83 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
[build-system]
requires = [
"setuptools >= 61.0",
"setuptools_scm[toml] >= 8",
]
build-backend = "setuptools.build_meta"
[project]
name = "NREL-nsrdb"
dynamic = ["version"]
description = "National Solar Radiation Database (NSRDB) Software"
keywords = ["nsrdb", "NREL"]
readme = "README.rst"
authors = [
{name = "Brandon Benton", email = "[email protected]"},
]
license = {text = "BSD-3-Clause"}
requires-python = ">= 3.9"
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"netCDF4>=1.6,<1.7",
"matplotlib>=3.1",
"NREL-gaps>=0.6.0",
"NREL-cloud_fs>=0.0.8",
"NREL-farms>=1.0.6",
"scikit-learn>=1.0",
"NREL-rest2>=1.0.2",
"NREL-mlclouds>=0.0.5",
"dask>=2024.8.0"
]
[project.optional-dependencies]
dev = [
"build>=0.5",
"pre-commit",
"ruff>=0.5.0"
]
doc = [
"sphinx>=7.0",
"sphinx_rtd_theme>=2.0",
"sphinx-click>=4.0",
]
test = [
"pytest>=5.2",
"pytest-env>=1.1.3",
"pytest-cov>=5.0.0"
]
[project.urls]
homepage = "https://github.com/NREL/nsrdb"
documentation = "https://nrel.github.io/nsrdb/"
repository = "https://github.com/NREL/nsrdb"
[tool.ruff]
line-length = 79
indent-width = 4
target-version = "py39"
[tool.ruff.lint]
fixable = []
# preview = true
# logger-objects = []
task-tags = ["TODO", "FIXME", "XXX"]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"C",
"C4", # flake8-comprehensions
"C90", # mccabe
"COM", # flake8-commas
"D", # pydocstyle
"E", # pycodestyle
"F", # Pyflakes
"G", # flake8-logging-format
"I", # isort
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # numpy-specific
"PERF", # Perflint
"PL", # Pylint
"Q", # flake8-quotes
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # Warning
]
ignore = [
# Currently don't conform but we might want to reconsider
"A001", # builtin-variable-shadowing
"A002", # builtin-argument-shadowing
# Currently don't conform but we might want to reconsider
"ARG005", # unused-lambda-argument
"C408", # unnecessary-collection-call
"C414", # unnecessary-double-cast-or-process
"COM812", # missing-trailing-comma
"D105", # undocumented-magic-method
"D200", # fits-on-one-line
"D202", # no-blank-line-after-function
"D204", # one-blank-line-after-class
"D205", # blank-line-after-summary
"D207", # under-indentation
"D209", # new-line-after-last-paragraph
"D400", # ends-in-period
"D401", # non-imperative-mood
"D404", # docstring-starts-with-this
"E402", # import not at top of file
"FIX001", # line-contains-fixme
"G004", # f-string logging
"G001", # str.format logging
"N802", # invalid-function-name
"N803", # invalid-argument-name
"N806", # non-lowercase-variable-in-function
"N811", # constant imported as non constant
"N817", # imported as acronym
"PERF102", # incorrect-dict-iterator
"PERF203", # try-except-in-loop
"PERF401", # manual-list-comprehension
"PLC0415", # import not at top of file
"PLR0904", # too-many-public-methods
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0914", # too-many-locals
"PLR0915", # too-many-statements
"PLR1702", # too-many-nested-blocks
"PLR1704", # redefined-argument-from-local
"PLR2004", # magic-value-comparison
"PLW1514", # unspecified-encoding
"PLW2901", # redefined-loop-name
"Q000", # bad-quotes-inline-string
"Q004", # unnecessary-escaped-quote
"SIM108", # if-else-block-instead-of-if-exp
"SIM117", #multiple-with-statements
"SIM118", # in-dict-keys
"SIM211", # if-expr-with-false-true
"UP009", # utf8-encoding-declaration
"UP015", # redundant-open-modes
"UP032", # f-string
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # unused imports
[tool.ruff.lint.pylint]
max-args = 5 # (PLR0913) Maximum number of arguments for function / method
max-bool-expr = 5 # ( PLR0916) Boolean in a single if statement
max-branches=12 # (PLR0912) branches allowed for a function or method body
max-locals=15 # (PLR0912) local variables allowed for a function or method body
max-nested-blocks = 5 # (PLR1702) nested blocks within a function or method body
max-public-methods=20 # (R0904) public methods allowed for a class
max-returns=6 # (PLR0911) return statements for a function or method body
max-statements=50 # (PLR0915) statements allowed for a function or method body
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
# Consider adopting "lf" instead
line-ending = "auto"
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.setuptools]
include-package-data = true
packages = ["nsrdb"]
[tool.setuptools_scm]
version_file = "nsrdb/_version.py"
[tool.pytest_env]
CUDA_VISIBLE_DEVICES = "-1"
TF_ENABLE_ONEDNN_OPTS = "0"