-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
118 lines (106 loc) · 2.38 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
[project]
name = "syfop"
description = "Syfop Synthetic Fuel Optimizer"
authors = [
{name = "Peter Regner", email = "peter.regner@boku.ac.at"},
]
requires-python = ">=3.8" # not tested with all python versions, no idea what is needed
readme = "README.md"
dynamic = ["version"]
classifiers=[
'License :: OSI Approved :: MIT License',
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3',
]
dependencies = [
"xarray",
"pandas >= 1.5", # no idea which version is really necessary
"linopy == 0.3.8", # might work also with newer versions, but they break APIs often
"pint", # used for units
"pint-xarray", # used for units for xarray objects
"highspy",
"networkx",
"netgraph", # optional dependency for plotting
]
[project.optional-dependencies]
# optional dependencies
extra = [
"graphviz",
"pygraphviz",
]
# for development
dev = [
"pre-commit",
"black == 22.12.0",
"isort",
"flake8",
# "flake8-docstrings", # this is too strict ATM but would be nice to add
]
# for running tests
test = [
"pytest",
"pytest-cov"
]
# for building the documentation
doc = [
"sphinx",
"sphinxawesome_theme",
"myst-parser", # support for markdown
]
[tool.setuptools]
packages = ["syfop"]
[tool.setuptools.dynamic]
version = {attr = "syfop.version.version"}
[tool.pytest.ini_options]
# https://docs.pytest.org/en/stable/customize.html
addopts = '''
-ra
--tb=auto
-k "not gurobi"
-W error
--doctest-modules
'''
# -ra: show extra test summary [...] (a)ll except passed [...]
# --tb=style: traceback print mode (auto/long/short/line/native/no)
# -W: set which warnings to report, "error" turns matching warnings into exceptions
norecursedirs = [
".git",
".github",
".pytest_cache",
".ipynb_checkpoints",
"__pycache__",
]
[tool.coverage.run]
# https://coverage.readthedocs.io/en/latest/config.html
branch = true
omit = [
"tests/test*",
]
[tool.coverage.report]
show_missing = true
[tool.coverage.html]
directory = "htmlcov"
[tool.black]
# https://black.readthedocs.io/en/stable/pyproject_toml.html
line-length = 99
include = '\.pyi?$'
target-version = ['py310']
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| \.history
| \.pytest_cache
| \.ipynb_checkpoints
)/
'''
[tool.isort]
profile = "black"