-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SCSB-145] require Python 3.10 #250
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, isn't it of some use to maintainers to retain these comments? |
||
"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", | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the comments that got deleted here are obviously not necessary for the functioning of the file, but aren't they kind of useful to keep around for documentation purposes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize, I overlooked your comments on Friday when merging. These were stripped by the auto-formatter and I didn't get to restore them; fixed in 92be82d