forked from cfs-energy/cfspopcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
127 lines (117 loc) · 3.39 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
[tool.poetry]
name = "cfspopcon"
version = "7.0.0dev"
description = "Empirically-derived scoping of tokamak operational space."
authors = ["Commonwealth Fusion Systems"]
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"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 :: Only",
"Topic :: Scientific/Engineering :: Physics",
"License :: OSI Approved :: MIT License",
]
[tool.poetry.scripts]
popcon = 'cfspopcon.cli:run_popcon_cli'
popcon_algorithms = 'cfspopcon.cli:write_algorithms_yaml'
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
numpy = "^2.0"
pandas = "^2.2"
scipy = "^1.8"
seaborn = "^0.12"
pyyaml = "^6.0"
toml = "^0.10.2"
typing-extensions = "^4.12"
pint = "^0.24"
xarray = "^2024"
pint-xarray = "^0.4"
click = "^8.1.0"
netcdf4 = "^1.7"
radas = ">=2024.7.1"
contourpy = "^1.2.1"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.7"
pytest = "^8.2"
coverage = "^7.6"
pytest-cov = "^5.0"
types-pyyaml = "^6.0.12.2"
pandas-stubs = "^2.0"
mypy = "^1.10"
sphinx = "^7.3.7"
sphinx-rtd-theme = "^2.0.0"
sphinxcontrib-bibtex = "^2.6.1"
sphinx-copybutton = "^0.5.2"
ruff = "^0.5"
pickleshare = "^0.7.5"
nbmake = "^1.5"
nbsphinx = "^0.9"
ipdb = "^0.13.13"
# Added as workaround for shhinx bibtex issue https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/345
setuptools = "^71.0.3"
[tool.coverage.report]
fail_under = 82
[tool.pytest.ini_options]
addopts = "--cov=cfspopcon --cov-report term-missing --cov-report xml:coverage.xml --verbose -s --nbmake"
testpaths = [
"tests",
"docs/doc_sources"
]
markers = [
"docs: marks tests as testing the documentation (deselect with '-m \"not docs\"')",
"cli: marks tests as testing the command-line-interface (deselect with '-m \"not cli\"')",
"regression: marks tests as checking the regression result (deselect with '-m \"not regression\"')",
]
filterwarnings = [
"error",
"ignore:numpy.ndarray size changed, may indicate binary incompatibility. Expected 16 from C header, got 96 from PyObject"
]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
plugins = "numpy.typing.mypy_plugin"
strict = true
disallow_any_generics=false
exclude = [
'^cfspopcon/plotting/.*\.py$', # these need to fixed
]
[tool.ruff]
lint.select = [
"A", # avoid shadowing
"B", # flake8-bugbear
"C4", # comprehensions
"D", #docstrings
"E", # pycodestyle Errors
"ERA", # no commented out code
"F", # pyflakes
"FLY", # flynt
"I001", # isort
"ISC", # implicit string concatenation
"PERF", # Perflint
"PIE", # flake8-pie
"PGH", # pygrep-hooks
"PL", # pylint
"Q", # flake8-quotes
"RUF", # ruff builtins e.g. noqa checking
"T10", # flake8-debugger (no breakpoint etc)
"TCH",# type-checking imports
"UP", # pyupgrade
"W", # pycodestyle warnings
]
lint.ignore = [
"E501", # Never enforce line length violations, we have black for that.
"PLR0913", #ignore limit on number of args
"PLR2004", #ignore magic values warning, at least for now
"C408", # use {} instead of dict(), but we use dict heavily, for now leave it
"ISC001",
]
lint.pyupgrade.keep-runtime-typing=true
lint.pydocstyle.convention = "google"
target-version = "py39"
line-length = 140