-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SCSB-145] require Python 3.10 (#250)
* require Python 3.10 * update references to Python 3.9 * oldest Numpy possible * bump Scipy
- Loading branch information
1 parent
cc054eb
commit c43b9ef
Showing
5 changed files
with
142 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,100 @@ | ||
[project] | ||
name = 'stcal' | ||
description = 'STScI tools and algorithms used in calibration pipelines' | ||
readme = 'README.md' | ||
requires-python = '>=3.9' | ||
license = { file = 'LICENSE' } | ||
authors = [{ name = 'STScI', email = '[email protected]' }] | ||
name = "stcal" | ||
description = "STScI tools and algorithms used in calibration pipelines" | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
authors = [ | ||
{ name = "STScI", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
'Intended Audience :: Science/Research', | ||
'Topic :: Scientific/Engineering :: Astronomy', | ||
'License :: OSI Approved :: BSD License', | ||
'Programming Language :: Python :: 3', | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Astronomy", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3", | ||
] | ||
dependencies = [ | ||
'astropy >=5.0.4', | ||
'scipy >=1.6.0', | ||
'numpy >=1.20', | ||
'opencv-python-headless >=4.6.0.66', | ||
'asdf >=2.15.0', | ||
'gwcs >= 0.18.1', | ||
"astropy >=5.0.4", | ||
"scipy >=1.7.2", | ||
"numpy >=1.21.2", | ||
"opencv-python-headless >=4.6.0.66", | ||
"asdf >=2.15.0", | ||
"gwcs >= 0.18.1", | ||
] | ||
dynamic = [ | ||
"version", | ||
] | ||
dynamic = ['version'] | ||
|
||
[project.license] | ||
file = "LICENSE" | ||
|
||
[project.optional-dependencies] | ||
docs = [ | ||
'numpydoc', | ||
'packaging >=17', | ||
'sphinx<7.0.0', | ||
'sphinx-asdf', | ||
'sphinx-astropy', | ||
'sphinx-rtd-theme', | ||
'stsci-rtd-theme', | ||
'tomli; python_version <="3.11"', | ||
"numpydoc", | ||
"packaging >=17", | ||
"sphinx<7.0.0", | ||
"sphinx-asdf", | ||
"sphinx-astropy", | ||
"sphinx-rtd-theme", | ||
"stsci-rtd-theme", | ||
"tomli; python_version <=\"3.11\"", | ||
] | ||
test = [ | ||
'psutil', | ||
'pytest >=6', | ||
'pytest-cov', | ||
'pytest-doctestplus', | ||
"psutil", | ||
"pytest >=6", | ||
"pytest-cov", | ||
"pytest-doctestplus", | ||
] | ||
|
||
[project.urls] | ||
'repository' = 'https://github.com/spacetelescope/stcal' | ||
'tracker' = 'https://github.com/spacetelescope/stcal/issues' | ||
repository = "https://github.com/spacetelescope/stcal" | ||
tracker = "https://github.com/spacetelescope/stcal/issues" | ||
|
||
[build-system] | ||
requires = [ | ||
'setuptools >=61', | ||
'setuptools_scm[toml] >=3.4', | ||
'Cython >=0.29.21', | ||
'numpy >=1.18', | ||
"setuptools >=61", | ||
"setuptools_scm[toml] >=3.4", | ||
"Cython >=0.29.21", | ||
"numpy >=1.18", | ||
] | ||
build-backend = 'setuptools.build_meta' | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = 'src/stcal/_version.py' | ||
write_to = "src/stcal/_version.py" | ||
|
||
[tool.setuptools] | ||
zip-safe = true | ||
|
||
[tool.setuptools.packages.find] | ||
where = ['src'] | ||
where = [ | ||
"src", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
minversion = 6 | ||
log_cli_level = "INFO" | ||
xfail_strict = true | ||
doctest_plus = true | ||
doctest_rst = true | ||
text_file_format = 'rst' | ||
text_file_format = "rst" | ||
addopts = [ | ||
'--color=yes', | ||
'--doctest-rst', | ||
'-ra', | ||
'--strict-config', | ||
'--strict-markers', | ||
"--color=yes", | ||
"--doctest-rst", | ||
"-ra", | ||
"--strict-config", | ||
"--strict-markers", | ||
] | ||
testpaths = [ | ||
"tests", | ||
"src/stcal", | ||
"docs", | ||
] | ||
norecursedirs = [ | ||
'benchmarks', | ||
'.asv', | ||
'.eggs', | ||
'.tox', | ||
'build', | ||
'venv', | ||
"benchmarks", | ||
".asv", | ||
".eggs", | ||
".tox", | ||
"build", | ||
"venv", | ||
] | ||
filterwarnings = [ | ||
"error::ResourceWarning", | ||
|
@@ -98,80 +106,75 @@ markers = [ | |
[tool.ruff] | ||
line-length = 110 | ||
src = [ | ||
'src', | ||
'tests', | ||
'docs', | ||
"src", | ||
"tests", | ||
"docs", | ||
] | ||
|
||
[tool.ruff.lint] | ||
extend-select = [ | ||
'F', # Pyflakes (part of default flake8) | ||
'W', 'E', # pycodestyle (part of default flake8) | ||
'I', # isort (import sorting) | ||
# 'N', # pep8-naming | ||
'D', # pydocstyle (docstring style guide) | ||
'UP', # pyupgrade (upgrade code to modern python) | ||
'YTT', # flake8-2020 (system version info) | ||
'ANN', # flake8-annotations (best practices for type annotations) | ||
'S', # flake8-bandit (security checks) | ||
'BLE', # flake8-blind-except (prevent blind except statements) | ||
'B', # flake8-bugbear (prevent common gotcha bugs) | ||
'A', # flake8-builtins (prevent shadowing of builtins) | ||
'C4', # flake8-comprehensions (best practices for comprehensions) | ||
'T10', # flake8-debugger (prevent debugger statements in code) | ||
'EM', # flake8-errormessages (best practices for error messages) | ||
'FA', # flake8-future-annotations (correct usage future annotations) | ||
'ISC', # flake8-implicit-str-concat (prevent implicit string concat) | ||
'ICN', # flake8-import-conventions (enforce import conventions) | ||
'G', # flake8-logging-format (best practices for logging) | ||
'INP', # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces) | ||
'PIE', # flake8-pie (misc suggested improvement linting) | ||
# 'T20', # flake8-print (prevent print statements in code) | ||
'PT', # flake8-pytest-style (best practices for pytest) | ||
'Q', # flake8-quotes (best practices for quotes) | ||
'RSE', # flake8-raise (best practices for raising exceptions) | ||
'RET', # flake8-return (best practices for return statements) | ||
'SLF', # flake8-self (prevent private member access) | ||
'SLOT', # flake8-slots (require __slots__ for immutable classes) | ||
'SIM', # flake8-simplify (suggest simplifications to code where possible) | ||
'TID', # flake8-tidy-imports (prevent banned api and best import practices) | ||
'TCH', # flake8-type-checking (move type checking imports into type checking blocks) | ||
'INT', # flake8-gettext (when to use printf style strings) | ||
# 'ARG', # flake8-unused-arguments (prevent unused arguments) | ||
'PTH', # flake8-use-pathlib (prefer pathlib over os.path) | ||
# 'ERA', # eradicate (remove commented out code) | ||
'PGH', # pygrep (simple grep checks) | ||
'PL', # pylint (general linting, flake8 alternative) | ||
'TRY', # tryceratops (linting for try/except blocks) | ||
'FLY', # flynt (f-string conversion where possible) | ||
'NPY', # NumPy-specific checks (recommendations from NumPy) | ||
'PERF', # Perflint (performance linting) | ||
'LOG', | ||
'RUF', # ruff specific checks | ||
"F", | ||
"W", | ||
"E", | ||
"I", | ||
"D", | ||
"UP", | ||
"YTT", | ||
"ANN", | ||
"S", | ||
"BLE", | ||
"B", | ||
"A", | ||
"C4", | ||
"T10", | ||
"EM", | ||
"FA", | ||
"ISC", | ||
"ICN", | ||
"G", | ||
"INP", | ||
"PIE", | ||
"PT", | ||
"Q", | ||
"RSE", | ||
"RET", | ||
"SLF", | ||
"SLOT", | ||
"SIM", | ||
"TID", | ||
"TCH", | ||
"INT", | ||
"PTH", | ||
"PGH", | ||
"PL", | ||
"TRY", | ||
"FLY", | ||
"NPY", | ||
"PERF", | ||
"LOG", | ||
"RUF", | ||
] | ||
ignore = [ | ||
'ISC001', # interferes with formatter | ||
'PLR0912', # Too many branches | ||
'PLR0913', # Too many arguments | ||
'PLR0915', # Too many statements | ||
'PLR2004', # Magic value used in comparison | ||
|
||
# Pydocstyle (to fix over time | ||
'D100', # Undocumented public module | ||
'D101', # Undocumented public class | ||
'D102', # Undocumented public method | ||
'D103', # Undocumented public function | ||
'D104', # Undocumented public package | ||
'D205', # 1 blank line required between summary line and description | ||
'D401', # First line of docstring should be in imperative mood | ||
'D404', # First word of docstring should not be This | ||
"ISC001", | ||
"PLR0912", | ||
"PLR0913", | ||
"PLR0915", | ||
"PLR2004", | ||
"D100", | ||
"D101", | ||
"D102", | ||
"D103", | ||
"D104", | ||
"D205", | ||
"D401", | ||
"D404", | ||
] | ||
exclude = [ | ||
'docs', | ||
'build', | ||
'dist', | ||
'.tox', | ||
'.eggs', | ||
"docs", | ||
"build", | ||
"dist", | ||
".tox", | ||
".eggs", | ||
] | ||
|
||
[tool.ruff.lint.extend-per-file-ignores] | ||
|
@@ -184,7 +187,7 @@ exclude = [ | |
convention = "numpy" | ||
|
||
[tool.ruff.lint.flake8-annotations] | ||
ignore-fully-untyped = true # Turn of annotation checking for fully untyped code | ||
ignore-fully-untyped = true | ||
|
||
[tool.cython-lint] | ||
max-line-length = 110 | ||
|
@@ -195,20 +198,24 @@ filter_files = true | |
line_length = 110 | ||
|
||
[tool.codespell] | ||
skip="*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build" | ||
# ignore-words-list=""" | ||
# """ | ||
skip = "*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build" | ||
|
||
[tool.repo-review] | ||
ignore = [ | ||
"GH200", # Use dependabot | ||
"PC140", # add MyPy to pre-commit | ||
"PC901", # custom pre-comit.ci message | ||
"MY100", # Use MyPy | ||
"GH200", | ||
"PC140", | ||
"PC901", | ||
"MY100", | ||
] | ||
|
||
[tool.cibuildwheel.macos] | ||
archs = ["x86_64", "arm64"] | ||
archs = [ | ||
"x86_64", | ||
"arm64", | ||
] | ||
|
||
[tool.cibuildwheel.linux] | ||
archs = ["auto", "aarch64"] | ||
archs = [ | ||
"auto", | ||
"aarch64", | ||
] |