forked from NREL/floris
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
235 lines (211 loc) · 5.78 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
[build-system]
requires = ["setuptools >= 40.6.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "floris"
version = "4.2.2"
description = "A controls-oriented engineering wake model."
readme = "README.md"
requires-python = ">=3.9"
authors = [
{ name = "Rafael Mudafort", email = "[email protected]" },
{ name = "Paul Fleming", email = "[email protected]" },
{ name = "Michael (Misha) Sinner", email = "[email protected]" },
{ name = "Eric Simley", email = "[email protected]" },
{ name = "Christopher Bay", email = "[email protected]" },
]
license = { file = "LICENSE.txt" }
keywords = ["floris"]
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
]
dependencies = [
"attrs",
"pyyaml~=6.0",
"numexpr~=2.0",
"numpy~=1.20",
"scipy~=1.1",
"matplotlib~=3.0",
"pandas~=2.0",
"shapely~=2.0",
"coloredlogs~=15.0",
"pathos~=0.3",
]
[project.optional-dependencies]
docs = [
"jupyter-book~=1.0",
"sphinx-book-theme~=1.0",
"sphinx-autodoc-typehints~=2.0",
"sphinxcontrib-autoyaml~=1.0",
"sphinxcontrib.mermaid~=1.0",
]
develop = [
"pytest~=8.0",
"pre-commit~=4.0",
"ruff~=0.7",
"isort~=5.0"
]
[tool.setuptools.packages.find]
include = ["floris*"]
[tool.setuptools.package-data]
floris = [
"turbine_library/*.yaml",
"core/wake_velocity/turbopark_lookup_table.mat"
]
[project.urls]
Homepage = "https://github.com/NREL/floris"
Documentation = "https://nrel.github.io/floris/"
[coverage.run]
# Coverage.py configuration file
# https://coverage.readthedocs.io/en/latest/config.html
branch = true
source = "floris/*"
omit = [
"setup.py",
"tests/*"
]
[tool.pytest.ini_options]
testpaths = "tests"
filterwarnings = [
"ignore::DeprecationWarning:pandas.*:"
]
## Pyflakes (F)
## pycodestyle (E, W)
# mccabe (C90)
# isort (I) # Use isort directly until more isort features are included in ruff
# pep8-naming (N)
# pydocstyle (D)
# pyupgrade (UP)
# flake8-2020 (YTT)
# flake8-annotations (ANN)
# flake8-bandit (S)
# flake8-blind-except (BLE)
# flake8-boolean-trap (FBT)
# flake8-bugbear (B)
# flake8-builtins (A)
# flake8-commas (COM)
# flake8-comprehensions (C4)
# flake8-datetimez (DTZ)
# flake8-debugger (T10)
# flake8-errmsg (EM)
# flake8-executable (EXE)
# flake8-implicit-str-concat (ISC)
# flake8-import-conventions (ICN)
# flake8-logging-format (G)
# flake8-no-pep420 (INP)
# flake8-pie (PIE)
# flake8-print (T20)
# flake8-pytest-style (PT)
# flake8-quotes (Q)
# flake8-return (RET)
# flake8-simplify (SIM)
# flake8-tidy-imports (TID)
# flake8-type-checking (TCH)
# flake8-unused-arguments (ARG)
# flake8-use-pathlib (PTH)
# eradicate (ERA)
# pandas-vet (PD)
# pygrep-hooks (PGH)
# Pylint (PL)
# - Convention (PLC)
# - Error (PLE)
# - Refactor (PLR)
# - Warning (PLW)
# tryceratops (TRY)
# flake8-raise (RSE)
# flake8-self (SLF)
# Ruff-specific rules (RUF)
[tool.ruff]
src = ["floris", "tests"]
line-length = 100
target-version = "py310"
# See https://github.com/charliermarsh/ruff#supported-rules
# for rules included and matching to prefix.
select = ["F", "E", "W", "C4", ] #"T20", "I"
# I - isort is not fully implemented in ruff so there is not parity. Consider disabling I.
# F401 unused-import: Ignore until all used isort flags are adopted in ruff
ignore = ["F401"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
# fixable = ["A", "B", "C", "D", "E", "F"]
fixable = ["F", "E", "W", "C4"] #"T20", "I"
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
"floris/version.py",
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.per-file-ignores]
# F841 unused-variable: ignore since this file uses numexpr and many variables look unused
"floris/core/wake_deflection/jimenez.py" = ["F841"]
"floris/core/wake_turbulence/crespo_hernandez.py" = ["F841"]
"floris/core/wake_deflection/gauss.py" = ["F841"]
"floris/core/wake_velocity/jensen.py" = ["F841"]
"floris/core/wake_velocity/gauss.py" = ["F841"]
"floris/core/wake_velocity/empirical_gauss.py" = ["F841"]
# Ignore `F401` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
"__init__.py" = ["F401"]
# I001 unsorted-imports: ignore because the import order is meaningful to navigate
# import dependencies
"floris/core/__init__.py" = ["I001"]
[tool.ruff.isort]
combine-as-imports = true
known-first-party = ["floris"]
order-by-type = false
# lines-after-imports = 2
# [tool.ruff.mccabe]
# # Unlike Flake8, default to a complexity level of 10.
# max-complexity = 10
[tool.isort]
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER"
]
known_first_party = [
"floris"
]
multi_line_output = 3
combine_as_imports = true
force_grid_wrap = 3
include_trailing_comma = true
use_parentheses = true
lines_after_imports = 2
line_length = 100
order_by_type = false
split_on_trailing_comma = true
# length_sort = true
# case_sensitive: False
# force_sort_within_sections: True
# reverse_relative: True
# sort_relative_in_force_sorted_sections: True