11[build-system ]
2- requires = [" setuptools>=77" , " setuptools_scm[toml]>=7 " ]
2+ requires = [" setuptools>=77" , " setuptools_scm[toml]>=8 " ]
33build-backend = " setuptools.build_meta"
44
55
66[project ]
77name = " save-and-restore-api"
8- authors = [
9- {
name =
" My Name" ,
email =
" [email protected] " },
10- ]
118description = " Python package for communication with CS Studio save-and-restore service"
129readme = " README.md"
1310license = " BSD-3-Clause"
@@ -18,9 +15,6 @@ classifiers = [
1815 " Intended Audience :: Science/Research" ,
1916 " Intended Audience :: Developers" ,
2017 " Operating System :: OS Independent" ,
21- " Programming Language :: Python" ,
22- " Programming Language :: Python :: 3" ,
23- " Programming Language :: Python :: 3 :: Only" ,
2418 " Programming Language :: Python :: 3.9" ,
2519 " Programming Language :: Python :: 3.10" ,
2620 " Programming Language :: Python :: 3.11" ,
@@ -30,14 +24,16 @@ classifiers = [
3024 " Typing :: Typed" ,
3125]
3226dynamic = [" version" ]
33- dependencies = []
27+
28+ [project .scripts ]
29+ save-and-restore-upload = " save_and_restore_api.tools.upload:main"
3430
3531[project .urls ]
3632Homepage = " https://github.com/dmgav/save-and-restore-api"
37- "Bug Tracker" = " https://github.com/dmgav/save-and-restore-api/issues"
38- Discussions = " https://github.com/dmgav/save-and-restore-api/discussions"
39- Changelog = " https://github.com/dmgav/save-and-restore-api/releases"
4033
34+ dependencies = [
35+ " httpx" ,
36+ ]
4137
4238[dependency-groups ]
4339test = [
@@ -62,15 +58,20 @@ write_to = "src/save_and_restore_api/_version.py"
6258
6359[tool .pytest .ini_options ]
6460minversion = " 6.0"
65- addopts = [" -ra" , " --showlocals" , " --strict-markers" , " --strict-config" ]
66- xfail_strict = true
61+ # Run pytest with all our checkers, and don't spam us with massive tracebacks on error
62+ # Don't collect the interactive directory which is intended for manual execution
63+ addopts = """
64+ --tb=native -vv --doctest-modules --doctest-glob="*.rst" --ignore src/bluesky/tests/interactive
65+ """
66+ # https://iscinumpy.gitlab.io/post/bound-version-constraints/#watch-for-warnings
6767filterwarnings = [
68- " error" ,
69- ]
70- log_cli_level = " INFO"
71- testpaths = [
72- " tests" ,
68+ " error" ,
69+ " ignore::PendingDeprecationWarning" ,
70+ " ignore::UserWarning" ,
71+ " ignore::DeprecationWarning" ,
7372]
73+ # Doctest python code in docs, python code in src docstrings, test functions in tests
74+ testpaths = " src/save_and_restore_api/tests"
7475
7576
7677[tool .coverage ]
@@ -95,56 +96,31 @@ module = "save_and_restore_api.*"
9596disallow_untyped_defs = true
9697disallow_incomplete_defs = true
9798
98-
9999[tool .ruff ]
100+ src = [" src" , " tests" ]
101+ line-length = 115
102+ exclude = [
103+ " docs/source/conf.py" ,
104+ " docs/source/examples" ,
105+ ]
100106
101107[tool .ruff .lint ]
102108extend-select = [
103- " ARG" , # flake8-unused-arguments
104- " B" , # flake8-bugbear
105- " C4" , # flake8-comprehensions
106- " EM" , # flake8-errmsg
107- " EXE" , # flake8-executable
108- " G" , # flake8-logging-format
109- " I" , # isort
110- " ICN" , # flake8-import-conventions
111- " NPY" , # NumPy specific rules
112- " PD" , # pandas-vet
113- " PGH" , # pygrep-hooks
114- " PIE" , # flake8-pie
115- " PL" , # pylint
116- " PT" , # flake8-pytest-style
117- " PTH" , # flake8-use-pathlib
118- " RET" , # flake8-return
119- " RUF" , # Ruff-specific
120- " SIM" , # flake8-simplify
121- " T20" , # flake8-print
122- " UP" , # pyupgrade
123- " YTT" , # flake8-2020
109+ " B" , # flake8-bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
110+ " C4" , # flake8-comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
111+ " E" , # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
112+ " F" , # pyflakes rules - https://docs.astral.sh/ruff/rules/#pyflakes-f
113+ " W" , # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w
114+ " I" , # isort - https://docs.astral.sh/ruff/rules/#isort-i
115+ " UP" , # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up
124116]
125117ignore = [
126- " PLR09" , # Too many <...>
127- " PLR2004" , # Magic value used in comparison
128118]
129- isort.required-imports = [" from __future__ import annotations" ]
130- # Uncomment if using a _compat.typing backport
131- # typing-modules = ["save_and_restore_api._compat.typing"]
119+ isort.required-imports = [
120+ ]
132121
133122[tool .ruff .lint .per-file-ignores ]
134- "tests/**" = [" T20" ]
135- "noxfile.py" = [" T20" ]
136-
137-
138- [tool .pylint ]
139- py-version = " 3.9"
140- ignore-paths = [" .*/_version.py" ]
141- reports.output-format = " colorized"
142- similarities.ignore-imports = " yes"
143- messages_control.disable = [
144- " design" ,
145- " fixme" ,
146- " line-too-long" ,
147- " missing-module-docstring" ,
148- " missing-function-docstring" ,
149- " wrong-import-position" ,
150- ]
123+ # By default, private member access is allowed in tests
124+ # See https://github.com/DiamondLightSource/python-copier-template/issues/154
125+ # Remove this line to forbid private member access in tests
126+ "tests/**/*" = [" SLF001" ]
0 commit comments