Skip to content

Commit a9c7c9b

Browse files
test with latest supported Python version
1 parent e5b3114 commit a9c7c9b

File tree

2 files changed

+86
-102
lines changed

2 files changed

+86
-102
lines changed

.github/workflows/ci.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ jobs:
2828
with:
2929
envs: |
3030
- linux: py310-oldestdeps
31-
- linux: py311-cov
31+
- linux: py311
32+
- linux: py312
33+
# `tox` does not currently respect `requires-python` versions when creating testing environments;
34+
# if this breaks, add an upper pin to `requires-python` and revert this py3 to the latest working version
35+
- linux: py3-cov
3236
coverage: codecov
3337
pytest-results-summary: true
34-
- macos: py311
38+
- macos: py3
3539
pytest-results-summary: true
36-
- linux: py312
3740
- linux: py3-dev

pyproject.toml

+80-99
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@
22
name = "gwcs"
33
description = "Generalized World Coordinate System"
44
requires-python = ">=3.10"
5-
authors = [
6-
{ name = "gwcs developers", email = "help@stsci.edu" },
7-
]
5+
authors = [{ name = "gwcs developers", email = "help@stsci.edu" }]
86
dependencies = [
9-
"asdf >= 3.3.0",
10-
"astropy >= 6.0",
11-
"numpy>=1.24",
12-
"scipy>=1.14.1",
13-
"asdf_wcs_schemas >= 0.4.0",
14-
"asdf-astropy >= 0.5.0",
15-
]
16-
dynamic = [
17-
"version",
7+
"asdf >= 3.3.0",
8+
"astropy >= 6.0",
9+
"numpy>=1.24",
10+
"scipy>=1.14.1",
11+
"asdf_wcs_schemas >= 0.4.0",
12+
"asdf-astropy >= 0.5.0",
1813
]
14+
dynamic = ["version"]
1915

2016
[project.readme]
2117
file = "README.rst"
@@ -36,33 +32,24 @@ gwcs = "gwcs.extension:get_extensions"
3632

3733
[project.optional-dependencies]
3834
docs = [
39-
"sphinx",
40-
"sphinx-automodapi",
41-
"sphinx-rtd-theme",
42-
"stsci-rtd-theme",
43-
"sphinx-astropy",
44-
"sphinx-copybutton",
45-
"pydata-sphinx-theme",
46-
"sphinx-asdf",
47-
"tomli; python_version <'3.11'",
48-
]
49-
test = [
50-
"ci-watson>=0.3.0",
51-
"pytest>=8.0.0",
52-
"pytest-astropy>=0.11.0",
35+
"sphinx",
36+
"sphinx-automodapi",
37+
"sphinx-rtd-theme",
38+
"stsci-rtd-theme",
39+
"sphinx-astropy",
40+
"sphinx-copybutton",
41+
"pydata-sphinx-theme",
42+
"sphinx-asdf",
43+
"tomli; python_version <'3.11'",
5344
]
45+
test = ["ci-watson>=0.3.0", "pytest>=8.0.0", "pytest-astropy>=0.11.0"]
5446

5547
[build-system]
56-
requires = [
57-
"setuptools>=61.2",
58-
"setuptools_scm[toml]>=3.4",
59-
]
48+
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4"]
6049
build-backend = "setuptools.build_meta"
6150

6251
[tool.setuptools.package-data]
63-
"gwcs.tests.data" = [
64-
"*",
65-
]
52+
"gwcs.tests.data" = ["*"]
6653

6754
[tool.setuptools.packages.find]
6855
namespaces = false
@@ -83,91 +70,85 @@ doctest_rst = true
8370
text_file_format = "rst"
8471
log_cli_level = "INFO"
8572
xfail_strict = true
86-
testpaths = [
87-
"gwcs",
88-
"docs",
89-
]
73+
testpaths = ["gwcs", "docs"]
9074
addopts = [
91-
"-ra",
92-
"--color=yes",
93-
"--doctest-rst",
94-
"--strict-config",
95-
"--strict-markers",
96-
"-p no:legacypath",
97-
]
98-
norecursedirs = [
99-
"build",
100-
"docs/_build",
101-
".tox",
75+
"-ra",
76+
"--color=yes",
77+
"--doctest-rst",
78+
"--strict-config",
79+
"--strict-markers",
80+
"-p no:legacypath",
10281
]
82+
norecursedirs = ["build", "docs/_build", ".tox"]
10383
filterwarnings = [
104-
"ignore:Models in math_functions:astropy.utils.exceptions.AstropyUserWarning",
105-
"ignore:numpy.ndarray size changed:RuntimeWarning",
84+
"ignore:Models in math_functions:astropy.utils.exceptions.AstropyUserWarning",
85+
"ignore:numpy.ndarray size changed:RuntimeWarning",
10686
]
10787

10888
[tool.coverage.run]
10989
omit = [
110-
"gwcs/tests/test_*",
111-
"gwcs/tags/tests/test_*",
112-
"*/gwcs/tests/test_*",
113-
"*/gwcs/tags/tests/test_*",
90+
"gwcs/tests/test_*",
91+
"gwcs/tags/tests/test_*",
92+
"*/gwcs/tests/test_*",
93+
"*/gwcs/tags/tests/test_*",
11494
]
11595

11696
[tool.coverage.report]
11797
exclude_lines = [
118-
"pragma: no cover",
119-
"except ImportError",
120-
"raise AssertionError",
121-
"raise NotImplementedError",
122-
"def main\\(.*\\):",
123-
"pragma: py{ignore_python_version}",
98+
"pragma: no cover",
99+
"except ImportError",
100+
"raise AssertionError",
101+
"raise NotImplementedError",
102+
"def main\\(.*\\):",
103+
"pragma: py{ignore_python_version}",
124104
]
125105

126106
[tool.setuptools_scm]
127107

128108
[tool.ruff.lint]
129109
select = [
130-
"F", # Pyflakes (part of default flake8)
131-
"W", "E", # pycodestyle (part of default flake8)
132-
"I", # isort (import sorting)
133-
"UP", # pyupgrade (upgrade code to modern python)
134-
"YTT", # flake8-2020 (system version info)
135-
#"ANN", # flake8-annotations (best practices for type annotations)
136-
"S", # flake8-bandit (security checks)
137-
"BLE", # flake8-blind-except (prevent blind except statements)
138-
"B", # flake8-bugbear (prevent common gotcha bugs)
139-
"A", # flake8-builtins (prevent shadowing of builtins)
140-
"C4", # flake8-comprehensions (best practices for comprehensions)
141-
"T10", # flake8-debugger (prevent debugger statements in code)
142-
"EM", # flake8-errormessages (best practices for error messages)
143-
"ISC", # flake8-implicit-str-concat (prevent implicit string concat)
144-
"ICN", # flake8-import-conventions (enforce import conventions)
145-
"INP", # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces)
146-
"PIE", # flake8-pie (misc suggested improvement linting)
147-
"T20", # flake8-print (prevent print statements in code)
148-
"PT", # flake8-pytest-style (best practices for pytest)
149-
"Q", # flake8-quotes (best practices for quotes)
150-
"RSE", # flake8-raise (best practices for raising exceptions)
151-
"RET", # flake8-return (best practices for return statements)
152-
"SIM", # flake8-simplify (suggest simplifications to code where possible)
153-
"TID", # flake8-tidy-imports (prevent banned api and best import practices)
154-
"INT", # flake8-gettext (when to use printf style strings)
155-
"PTH", # flake8-use-pathlib (prefer pathlib over os.path)
156-
"ERA", # eradicate (remove commented out code)
157-
"PGH", # pygrep (simple grep checks)
158-
"PL", # pylint (general linting, flake8 alternative)
159-
"TRY", # tryceratops (linting for try/except blocks)
160-
"FLY", # flynt (f-string conversion where possible)
161-
"NPY", # NumPy-specific checks (recommendations from NumPy)
162-
"PERF", # Perflint (performance linting)
163-
"RUF", # ruff specific checks
110+
"F", # Pyflakes (part of default flake8)
111+
"W",
112+
"E", # pycodestyle (part of default flake8)
113+
"I", # isort (import sorting)
114+
"UP", # pyupgrade (upgrade code to modern python)
115+
"YTT", # flake8-2020 (system version info)
116+
#"ANN", # flake8-annotations (best practices for type annotations)
117+
"S", # flake8-bandit (security checks)
118+
"BLE", # flake8-blind-except (prevent blind except statements)
119+
"B", # flake8-bugbear (prevent common gotcha bugs)
120+
"A", # flake8-builtins (prevent shadowing of builtins)
121+
"C4", # flake8-comprehensions (best practices for comprehensions)
122+
"T10", # flake8-debugger (prevent debugger statements in code)
123+
"EM", # flake8-errormessages (best practices for error messages)
124+
"ISC", # flake8-implicit-str-concat (prevent implicit string concat)
125+
"ICN", # flake8-import-conventions (enforce import conventions)
126+
"INP", # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces)
127+
"PIE", # flake8-pie (misc suggested improvement linting)
128+
"T20", # flake8-print (prevent print statements in code)
129+
"PT", # flake8-pytest-style (best practices for pytest)
130+
"Q", # flake8-quotes (best practices for quotes)
131+
"RSE", # flake8-raise (best practices for raising exceptions)
132+
"RET", # flake8-return (best practices for return statements)
133+
"SIM", # flake8-simplify (suggest simplifications to code where possible)
134+
"TID", # flake8-tidy-imports (prevent banned api and best import practices)
135+
"INT", # flake8-gettext (when to use printf style strings)
136+
"PTH", # flake8-use-pathlib (prefer pathlib over os.path)
137+
"ERA", # eradicate (remove commented out code)
138+
"PGH", # pygrep (simple grep checks)
139+
"PL", # pylint (general linting, flake8 alternative)
140+
"TRY", # tryceratops (linting for try/except blocks)
141+
"FLY", # flynt (f-string conversion where possible)
142+
"NPY", # NumPy-specific checks (recommendations from NumPy)
143+
"PERF", # Perflint (performance linting)
144+
"RUF", # ruff specific checks
164145
]
165146
ignore = [
166-
"ISC001", # conflicts with formatter at times
167-
"PLR2004", # magic values (this should be dealt with at some point)
168-
"PLR0912", # Too many branches in function
169-
"PLR0913", # Too many arguments in function
170-
"PLR0915", # Too many statements in function
147+
"ISC001", # conflicts with formatter at times
148+
"PLR2004", # magic values (this should be dealt with at some point)
149+
"PLR0912", # Too many branches in function
150+
"PLR0913", # Too many arguments in function
151+
"PLR0915", # Too many statements in function
171152
]
172153

173154
[tool.ruff.lint.extend-per-file-ignores]

0 commit comments

Comments
 (0)