-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathpyproject.toml
158 lines (145 loc) · 3.31 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "src/r2x/__version__.py"
[tool.hatch.metadata]
allow-direct-references=true
[project]
name = "r2x"
dynamic = ["version"]
authors = [
{ name = "Pedro Sanchez", email = "psanchez@nrel.gov" },
{ name = "Obika Kodi", email = "kodi.obika@nrel.gov" },
{ name = "Vivienne Liu", email = "vivienne.liu@nrel.gov"},
]
description = "ReEDS to X parser"
requires-python = ">=3.11,<3.13"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
]
dependencies = [
"jsonschema~=4.23",
"loguru~=0.7.2",
"pandas>=2.2",
"plexosdb~=0.1.0",
"polars~=1.1.0",
"pyyaml~=6.0.1",
"rich~=13.7.1",
"tables~=3.10.1",
"h5py",
"cvxpy~=1.5.3",
"infrasys~=0.2",
]
[project.scripts]
r2x = "r2x.__main__:cli"
[dependency-groups]
dev = [
"ipython>=8.28.0",
"mypy~=1.11.0",
"pre-commit>=4.0.1",
"pytest>=8.3.3",
"pytest-cov>=5.0.0",
"ruff~=0.9",
"types-pyyaml>=6.0.12.20240917",
"bump2version>=1.0.1",
]
docs = [
"autodoc-pydantic>=2.2.0",
"ghp-import>=2.1.0",
"myst-parser>=4.0.0",
"sphinx-book-theme>=1.1.3",
"sphinx-copybutton>=0.5.2",
"sphinx-tabs>=3.4.7",
"sphinxcontrib-mermaid>=1.0.0",
]
[tool.mypy]
exclude = [
'plugins',
]
ignore_missing_imports=true
# mypy gets a false positive due to having pandas
[[tool.mypy.overrides]]
module = "polars"
follow_imports = "skip"
[tool.ruff]
line-length = 110
target-version = "py311"
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"site-packages",
"venv",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"TD", # flake-8 todos
"PD", # pandas vet
"RUF", # Ruff rules
"N", # pep8
"F", # pyflakes
"UP", # pyupgrade
"D", # pydocstyle
"C90", # Complex code
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
extend-ignore = ['D105', 'D107', 'D205', 'D415']
pydocstyle.convention = "numpy"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "D104"]
"__main__.py" = ["E402", "F401", "D104"]
"**/{tests,docs,tools}/*" = ["D100", "D103", "E402"]
"src/r2x/models/*" = ["D"]
[tool.pytest.ini_options]
addopts = "-vvv"
testpaths = "tests"
pythonpath = [
"src"
]
markers = [
"exporters: Tests related to exporters",
"exporter_utils: Tests related to exporters utils",
"plexos: Tests related to plexos",
"sienna: Tests related to sienna",
"utils: Util functions"
]
[tool.coverage.run]
omit = [
"tests/*",
]