1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
[project]
name = "gwcs"
description = "Generalized World Coordinate System"
requires-python = ">=3.11"
authors = [{ name = "gwcs developers" }]
dependencies = [
"asdf >= 3.3.0",
"astropy >= 6.0",
"numpy>=1.25",
"scipy>=1.14.1",
"asdf_wcs_schemas >= 0.5.0",
"asdf-astropy >= 0.8.0",
]
license-files = ["licenses/LICENSE.rst"]
dynamic = ["version"]
[project.readme]
file = "README.rst"
content-type = "text/x-rst"
[project.urls]
Homepage = "https://github.com/spacetelescope/gwcs"
Tracker = "https://github.com/spacetelescope/gwcs/issues"
Documentation = "https://gwcs.readthedocs.io/en/stable/"
"Source Code" = "https://github.com/spacetelescope/jwst"
[project.entry-points."asdf.extensions"]
gwcs = "gwcs.extension:get_extensions"
[project.optional-dependencies]
docs = [
"sphinx",
"sphinx-automodapi",
"sphinx-astropy",
"sphinx-copybutton",
"sphinx-asdf",
"furo",
"sphinx-inline-tabs",
"matplotlib",
]
test = ["ci-watson>=0.3.0", "pytest>=9.0", "pytest-astropy>=0.11.0"]
[build-system]
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"
[tool.setuptools.package-data]
"gwcs.tests.data" = ["*"]
"docs.gwcs" = ["*.asdf"]
[tool.setuptools.packages.find]
namespaces = false
[tool.build_sphinx]
source-dir = "docs"
build-dir = "docs/_build"
all_files = "1"
[tool.distutils.upload_docs]
upload-dir = "docs/_build/html"
show-response = 1
[tool.pytest]
minversion = "9.0"
doctest_plus = "enabled"
doctest_rst = "enabled"
text_file_format = "rst"
log_cli_level = "INFO"
xfail_strict = true
testpaths = ["gwcs", "docs"]
addopts = [
"-ra",
"--color=yes",
"--doctest-rst",
"--strict-config",
"--strict-markers",
"-p no:legacypath",
]
norecursedirs = ["build", "docs/_build", ".tox"]
filterwarnings = [
"ignore:Models in math_functions:astropy.utils.exceptions.AstropyUserWarning",
"ignore:numpy.ndarray size changed:RuntimeWarning",
]
[tool.coverage.run]
omit = [
"gwcs/tests/test_*",
"gwcs/tags/tests/test_*",
"*/gwcs/tests/test_*",
"*/gwcs/tags/tests/test_*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"except ImportError",
"raise AssertionError",
"raise NotImplementedError",
"def main\\(.*\\):",
"pragma: py{ignore_python_version}",
]
[tool.setuptools_scm]
version_file = "gwcs/_version.py"
local_scheme = "dirty-tag"
[tool.ruff.lint]
select = [
"F", # Pyflakes (part of default flake8)
"W",
"E", # pycodestyle (part of default flake8)
"I", # isort (import sorting)
"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)
"ISC", # flake8-implicit-str-concat (prevent implicit string concat)
"ICN", # flake8-import-conventions (enforce import conventions)
"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)
"SIM", # flake8-simplify (suggest simplifications to code where possible)
"TID", # flake8-tidy-imports (prevent banned api and best import practices)
"INT", # flake8-gettext (when to use printf style strings)
"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)
"RUF", # ruff specific checks
]
ignore = [
"ISC001", # conflicts with formatter at times
"PLR2004", # magic values (this should be dealt with at some point)
"PLR0912", # Too many branches in function
"PLR0913", # Too many arguments in function
"PLR0915", # Too many statements in function
"PLC0415", # import outside toplevel, this creates issues with circular and delayed imports
"RUF059", # Unpacked variable is never used
"B028", # No explicit stacklevel found
"RUF043", # pytest-raises-ambiguous-pattern
]
[tool.ruff.lint.extend-per-file-ignores]
"gwcs/tests/*" = ["S101"]
"gwcs/converters/tests/*" = ["S101"]
"docs/conf.py" = ["INP001", "ERA001"]
"convert_schemas.py" = ["PTH"]
[tool.mypy]
warn_return_any = true
warn_unused_configs = true
disable_error_code = "import-untyped" # do not check imports
python_version = "3.11"
# Always ignore tests and docs
[[tool.mypy.overrides]]
module = ["gwcs.tests.*", "docs.*"]
ignore_errors = true
[tool.towncrier]
filename = "CHANGES.rst"
directory = "changes"
package = "gwcs"
title_format = "{version} ({project_date})"
ignore = [".gitkeep"]
wrap = true
issue_format = "`#{issue} <https://github.com/spacetelescope/gwcs/issues/{issue}>`_"
[tool.towncrier.fragment.feature]
name = "New Features"
[tool.towncrier.fragment.breaking]
name = "Breaking Changes"
[tool.towncrier.fragment.bugfix]
name = "Bug Fixes"
[tool.towncrier.fragment.doc]
name = "Documentation"
[tool.towncrier.fragment.misc]
|