@@ -17,7 +17,16 @@ dependencies = []
1717file = " LICENSE"
1818
1919[project .optional-dependencies ]
20- SSH = [" numpy" , " scipy" , " matplotlib" ]
20+ demo = [
21+ " matplotlib>=3.7.5" ,
22+ " numpy>=1.24.4" ,
23+ " scipy>=1.10.1" ,
24+ ]
25+ documentation = [
26+ " myst-parser>=3.0.1" ,
27+ " sphinx>=7.1.2" ,
28+ " sphinx-autodoc-typehints>=2.0.1" ,
29+ ]
2130
2231[project .urls ]
2332"Homepage" = " https://github.com/drunsinn/pyXSteam"
@@ -27,6 +36,15 @@ SSH = ["numpy", "scipy", "matplotlib"]
2736pyXSteamDemo = " pyXSteam.scripts.pyXSteamDemo:main"
2837pyXSteamRankineDemo = " pyXSteam.scripts.pyXSteamRankineDemo:main"
2938
39+ [dependency-groups ]
40+ dev = [
41+ " black>=24.8.0" ,
42+ " codespell>=2.4.1" ,
43+ " numpy>=1.24.4" ,
44+ " pytest>=8.3.5" ,
45+ " ruff>=0.14.0" ,
46+ ]
47+
3048[tool .setuptools ]
3149packages = [" pyXSteam" ]
3250
@@ -47,173 +65,92 @@ log_format = "%(asctime)s %(levelname)s %(message)s"
4765log_date_format = " %Y-%m-%d %H:%M:%S"
4866
4967[tool .codespell ]
50- skip = " *.po,*.ts,./docs/build/*,./build/*,./dist/*,./.git,./.venv,*.pdf,*.m"
68+ skip = " *.po,*.ts,./docs/build/*,./build/*,./dist/*,./.git,./.venv,*.pdf,*.m,./*.egg-info/* "
5169count = " "
5270quiet-level = 3
5371
54- [tool .pylint .main ]
55- fail-under = 9
56- ignore = [" CVS" ]
57- ignore-patterns = [" ^\\ .#" ]
58- jobs = 0
59- limit-inference-results = 100
60- persistent = true
61- py-version = " 3.8"
62- suggestion-mode = true
63-
64- [tool .pylint .basic ]
65- argument-naming-style = " any"
66- attr-naming-style = " snake_case"
67- bad-names = [" foo" , " bar" , " baz" , " toto" , " tutu" , " tata" ]
68- class-attribute-naming-style = " any"
69- class-const-naming-style = " any"
70- class-naming-style = " PascalCase"
71- const-naming-style = " UPPER_CASE"
72- docstring-min-length = -1
73- function-naming-style = " any"
74- good-names = [" i" , " j" , " k" , " ex" , " Run" , " _" , " pyXSteam" ]
75- inlinevar-naming-style = " any"
76- method-naming-style = " any"
77- module-naming-style = " any"
78- no-docstring-rgx = " ^_"
79- property-classes = [" abc.abstractproperty" ]
80- variable-naming-style = " any"
81-
82- [tool .pylint .classes ]
83- defining-attr-methods = [
84- " __init__" ,
85- " __new__" ,
86- " setUp" ,
87- " asyncSetUp" ,
88- " __post_init__" ,
89- ]
90- exclude-protected = [
91- " _asdict" ,
92- " _fields" ,
93- " _replace" ,
94- " _source" ,
95- " _make" ,
96- " os._exit" ,
97- ]
98- valid-classmethod-first-arg = [" cls" ]
99- valid-metaclass-classmethod-first-arg = [" mcs" ]
100-
101- [tool .pylint .design ]
102- max-args = 5
103- max-attributes = 7
104- max-bool-expr = 5
105- max-branches = 12
106- max-locals = 15
107- max-parents = 7
108- max-public-methods = 20
109- max-returns = 6
110- max-statements = 50
111- min-public-methods = 2
112-
113- [tool .pylint .exceptions ]
114- overgeneral-exceptions = [" builtins.BaseException" , " builtins.Exception" ]
115-
116- [tool .pylint .format ]
117- ignore-long-lines = " ^\\ s*(# )?<?https?://\\ S+>?$"
118- indent-after-paren = 4
119- indent-string = " "
120- max-line-length = 140
121- max-module-lines = 1000
122-
123- [tool .pylint .imports ]
124- known-third-party = [" enchant" ]
125-
126- [tool .pylint .logging ]
127- logging-format-style = " old"
128- logging-modules = [" logging" ]
129-
130- [tool .pylint ."messages control" ]
131- confidence = [
132- " HIGH" ,
133- " CONTROL_FLOW" ,
134- " INFERENCE" ,
135- " INFERENCE_FAILURE" ,
136- " UNDEFINED" ,
137- ]
138- disable = [
139- # "raw-checker-failed",
140- # "bad-inline-option",
141- # "locally-disabled",
142- # "file-ignored",
143- # "suppressed-message",
144- # "useless-suppression",
145- # "deprecated-pragma",
146- # "use-symbolic-message-instead",
147- # "use-implicit-booleaness-not-comparison-to-string",
148- # "use-implicit-booleaness-not-comparison-to-zero",
149- # "consider-using-f-string",
72+ [tool .ruff ]
73+ # Exclude a variety of commonly ignored directories.
74+ exclude = [
75+ " .bzr" ,
76+ " .direnv" ,
77+ " .eggs" ,
78+ " .git" ,
79+ " .git-rewrite" ,
80+ " .hg" ,
81+ " .ipynb_checkpoints" ,
82+ " .mypy_cache" ,
83+ " .nox" ,
84+ " .pants.d" ,
85+ " .pyenv" ,
86+ " .pytest_cache" ,
87+ " .pytype" ,
88+ " .ruff_cache" ,
89+ " .svn" ,
90+ " .tox" ,
91+ " .venv" ,
92+ " .vscode" ,
93+ " __pypackages__" ,
94+ " _build" ,
95+ " buck-out" ,
96+ " build" ,
97+ " dist" ,
98+ " node_modules" ,
99+ " site-packages" ,
100+ " venv" ,
150101]
151102
152- [tool .pylint .method_args ]
153-
154- timeout-methods = [
155- " requests.api.delete" ,
156- " requests.api.get" ,
157- " requests.api.head" ,
158- " requests.api.options" ,
159- " requests.api.patch" ,
160- " requests.api.post" ,
161- " requests.api.put" ,
162- " requests.api.request" ,
163- ]
164-
165- [tool .pylint .miscellaneous ]
166- notes = [" FIXME" , " XXX" , " TODO" , " ToDo" ]
167-
168- [tool .pylint .refactoring ]
169- max-nested-blocks = 5
170- never-returning-functions = [" sys.exit" , " argparse.parse_error" ]
171-
172- [tool .pylint .reports ]
173- evaluation = " max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))"
174- score = true
175-
176- [tool .pylint .similarities ]
177- ignore-comments = true
178- ignore-docstrings = true
179- ignore-imports = true
180- ignore-signatures = true
181- min-similarity-lines = 4
182-
183- [tool .pylint .spelling ]
184- max-spelling-suggestions = 4
185- spelling-ignore-comment-directives = " fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:"
186-
187- [tool .pylint .typecheck ]
188- contextmanager-decorators = [" contextlib.contextmanager" ]
189- ignore-none = true
190- ignore-on-opaque-inference = true
191- ignored-checks-for-mixins = [
192- " no-member" ,
193- " not-async-context-manager" ,
194- " not-context-manager" ,
195- " attribute-defined-outside-init" ,
196- ]
197- ignored-classes = [
198- " optparse.Values" ,
199- " thread._local" ,
200- " _thread._local" ,
201- " argparse.Namespace" ,
202- ]
203- missing-member-hint = true
204- missing-member-hint-distance = 1
205- missing-member-max-choices = 1
206- mixin-class-rgx = " .*[Mm]ixin"
207-
208- [tool .pylint .variables ]
209- allow-global-unused-variables = true
210- callbacks = [" cb_" , " _cb" ]
211- dummy-variables-rgx = " _+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_"
212- ignored-argument-names = " _.*|^ignored_|^unused_"
213- redefining-builtins-modules = [
214- " six.moves" ,
215- " past.builtins" ,
216- " future.builtins" ,
217- " builtins" ,
218- " io" ,
219- ]
103+ # Same as Black.
104+ line-length = 140
105+ indent-width = 4
106+
107+ # Assume Python 3.11
108+ target-version = " py311"
109+
110+ [tool .ruff .lint ]
111+ # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
112+ # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
113+ # McCabe complexity (`C901`) by default.
114+ select = [" E4" , " E7" , " E9" , " F" ]
115+ ignore = []
116+
117+ # Allow fix for all enabled rules (when `--fix`) is provided.
118+ fixable = [" ALL" ]
119+ unfixable = []
120+
121+ # Allow unused variables when underscore-prefixed.
122+ dummy-variable-rgx = " ^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
123+
124+ [tool .ruff .lint .per-file-ignores ]
125+ # Allow unused imports in `__init__.py` files.
126+ "__init__.py" = [" F401" ]
127+ "pyXSteam/TransportProperties_HW.py" = [" F401" ]
128+ "pyXSteam/Regions.py" = [" E741" ]
129+ "pyXSteam/RegionBorders.py" = [" E741" ]
130+
131+ [tool .ruff .format ]
132+ # Like Black, use double quotes for strings.
133+ quote-style = " double"
134+
135+ # Like Black, indent with spaces, rather than tabs.
136+ indent-style = " space"
137+
138+ # Like Black, respect magic trailing commas.
139+ skip-magic-trailing-comma = false
140+
141+ # Like Black, automatically detect the appropriate line ending.
142+ line-ending = " auto"
143+
144+ # Enable auto-formatting of code examples in docstrings. Markdown,
145+ # reStructuredText code/literal blocks and doctests are all supported.
146+ #
147+ # This is currently disabled by default, but it is planned for this
148+ # to be opt-out in the future.
149+ docstring-code-format = false
150+
151+ # Set the line length limit used when formatting code snippets in
152+ # docstrings.
153+ #
154+ # This only has an effect when the `docstring-code-format` setting is
155+ # enabled.
156+ docstring-code-line-length = " dynamic"
0 commit comments