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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646
|
[project]
name = "astropy"
dynamic = [
"version"
]
description = "Astronomy and astrophysics core library"
readme = "README.rst"
authors = [
{ name = "The Astropy Developers", email = "astropy.team@gmail.com" }
]
license = "BSD-3-Clause"
license-files = ["LICENSE.rst", "licenses/*.rst"]
requires-python = ">=3.11"
classifiers = [
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: C",
"Programming Language :: Cython",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
]
keywords = [
"astronomy",
"astrophysics",
"cosmology",
"space",
"science",
"units",
"table",
"wcs",
"samp",
"coordinate",
"fits",
"modeling",
"models",
"fitting",
"ascii",
]
dependencies = [
"numpy>=1.23.2",
"pyerfa>=2.0.1.1",
"astropy-iers-data>=0.2025.4.28.0.37.27",
"PyYAML>=6.0.0",
"packaging>=22.0.0",
]
[project.optional-dependencies]
# Recommended run-time dependencies to enable a lot of functionality within Astropy.
recommended = [
"scipy>=1.9.2",
"matplotlib>=3.6.0",
]
# Optional IPython-related behavior is in many places in Astropy. IPython is a complex
# dependency that occasionally requires pinning one of it's upstream dependencies. If
# you are using Astropy from an IPython-dependent IDE, like Jupyter, this should enforce
# the minimum supported version of IPython.
ipython = [
"ipython>=8.0.0",
]
jupyter = [ # these are optional dependencies for utils.console and table
"astropy[ipython]",
"ipywidgets>=7.7.3",
"ipykernel>=6.16.0",
"ipydatagrid>=1.1.13",
# jupyter-core is a transitive dependency via ipykernel, we declare it as
# a direct dependency in order to set a lower bound for oldest-deps testing
"jupyter-core>=4.11.2",
"pandas>=1.5.0",
]
# This is ALL the run-time optional dependencies.
all = [
# Install grouped optional dependencies
"astropy[recommended]",
"astropy[ipython]",
"astropy[jupyter]",
# Install all remaining optional dependencies
"certifi>=2022.6.15.1",
"dask[array]>=2022.5.1",
"h5py>=3.8.0",
"pyarrow>=10.0.1",
"beautifulsoup4>=4.9.3", # imposed by pandas==2.0
"html5lib>=1.1",
"bleach>=3.2.1",
"pandas>=2.0",
"sortedcontainers>=1.5.7", # (older versions may work)
"pytz>=2016.10", # (older versions may work)
"jplephem>=2.6", # (older versions may work)
"mpmath>=1.2.1",
"asdf>=2.8.3", # via asdf-astropy==0.3.*
"asdf-astropy>=0.3",
"bottleneck>=1.3.3",
"fsspec[http]>=2023.4.0",
"s3fs>=2023.4.0",
"uncompresspy>=0.4.0"
]
# The base set of test-time dependencies.
test = [
"coverage>=6.4.4",
"pre-commit>=2.9.3", # lower bound is not tested beyond installation
"pytest>=8.0.0",
"pytest-doctestplus>=1.4.0",
"pytest-astropy-header>=0.2.1",
"pytest-astropy>=0.10.0",
"pytest-xdist>=2.5.0",
"threadpoolctl>=3.0.0",
]
test_all = [
# Install grouped optional dependencies
"astropy[all]", # installs all optional run-time dependencies
"astropy[test]",
# Install all remaining dependencies
"objgraph>=1.6.0",
"skyfield>=1.20",
"sgp4>=2.3",
"array-api-strict>=1.0",
]
typing = [
"pandas-stubs>=2.0",
]
docs = [
"astropy[recommended]", # installs the [recommended] dependencies
"sphinx",
"sphinx-astropy[confv2]>=1.9.1",
"pytest>=8.0.0",
"sphinx_design",
"Jinja2>=3.1.3",
"matplotlib", # https://github.com/matplotlib/matplotlib/issues/28234
]
# These group together all the dependencies needed for developing in Astropy.
dev = [
"astropy[recommended]", # installs the most common optional dependencies
"astropy[test]",
"astropy[docs]",
"astropy[typing]",
]
dev_all = [
"tox",
"astropy[dev]",
"astropy[test_all]",
]
[project.urls]
homepage = "https://www.astropy.org/"
documentation = "https://docs.astropy.org"
repository = "https://github.com/astropy/astropy"
[project.scripts]
fits2bitmap = "astropy.visualization.scripts.fits2bitmap:main"
fitscheck = "astropy.io.fits.scripts.fitscheck:main"
fitsdiff = "astropy.io.fits.scripts.fitsdiff:main"
fitsheader = "astropy.io.fits.scripts.fitsheader:main"
fitsinfo = "astropy.io.fits.scripts.fitsinfo:main"
samp_hub = "astropy.samp.hub_script:hub_script"
volint = "astropy.io.votable.volint:main"
wcslint = "astropy.wcs.wcslint:main"
[build-system]
requires = ["setuptools>=77.0.0",
"setuptools_scm>=8.0.0",
"cython>=3.0.0, <4",
"numpy>=2.0.0, <3",
"extension-helpers>=1,<2"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["astropy*"]
exclude = ["astropy._dev*"]
namespaces = true
[tool.setuptools.package-data]
"*" = [
"data/*",
"data/*/*",
"data/*/*/*",
"data/*/*/*/*",
"data/*/*/*/*/*",
"data/*/*/*/*/*/*",
]
"astropy" = ["astropy.cfg", "CITATION"]
"astropy.cosmology" = ["*.ecsv"]
"astropy.tests.figures" = ["*.json"]
"astropy.wcs" = ["include/*/*.h"]
"astropy.wcs.tests" = ["extension/*.c"]
# Delete with deprecated astropy.utils.misc.walk_skip_hidden()
"astropy.utils.tests" = ["data/.hidden_file.txt"]
[tool.setuptools_scm]
version_file = "astropy/_version.py"
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = [
"astropy",
"docs",
]
norecursedirs = [
".*",
"docs[\\/]_build",
"docs[\\/]generated",
"astropy[\\/]extern",
"astropy[\\/]_dev",
]
astropy_header = true
doctest_plus = "enabled"
text_file_format = "rst"
remote_data_strict = true
addopts = [
"--color=yes",
"--doctest-rst",
"--strict-config",
"--strict-markers",
"-p no:legacypath",
]
log_cli_level = "info"
xfail_strict = false
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore::astropy.utils.iers.iers.IERSStaleWarning",
"ignore::erfa.core.ErfaWarning",
"ignore:invalid value encountered*:RuntimeWarning",
]
doctest_norecursedirs = [
"*/setup_package.py",
"*/tests/command.py",
]
doctest_subpackage_requires = [
"astropy/cosmology/_src/io/builtin/mapping.py = python>=3.12", # not PYTHON_LT_3_12 (PR 17277)
"astropy/cosmology/_src/io/builtin/row.py = python>=3.12", # not PYTHON_LT_3_12 (PR 17277)
"astropy/cosmology/_src/io/builtin/table.py = python>=3.12", # not PYTHON_LT_3_12 (PR 17277)
"astropy/table/table.py = python>=3.12", # not PYTHON_LT_3_12 (PR 17277)
"astropy/table/mixins/dask.py = dask",
"docs/* = numpy>=2", # not NUMPY_LT_2_0 (PR 15065)
"docs/units/type_hints.rst = python<=3.13", # PYTHON_LT_3_14 (PR 18140)
"docs/timeseries/index.rst = numpy<2.2.0.dev0", # NUMPY_LT_2_2 (PR 17364)
"astropy/stats/info_theory.py = numpy>=2", # not NUMPY_LT_2_0 (PR 15065)
"astropy/stats/jackknife.py = numpy>=2", # not NUMPY_LT_2_0 (PR 15065)
"astropy/table/row.py = numpy>=2", # not NUMPY_LT_2_0 (PR 15065)
"astropy/time/formats.py = numpy>=2", # not NUMPY_LT_2_0 (PR 15065)
"astropy/timeseries/periodograms/bls/core.py = numpy>=2", # not NUMPY_LT_2_0 (PR 15065)
"astropy/timeseries/periodograms/lombscargle/core.py = numpy>=2", # not NUMPY_LT_2_0 (PR 15065)
"astropy/units/structured.py = numpy>=2", # not NUMPY_LT_2_0 (PR 15065)
"astropy/modeling/_fitting_parallel.py = dask",
"docs/modeling/parallel-fitting.rst = dask",
"docs/coordinates/example_gallery_plot_galactocentric_frame.rst = matplotlib",
"docs/coordinates/example_gallery_plot_mars_coordinate_frame.rst = matplotlib",
"docs/coordinates/example_gallery_plot_obs_planning.rst = matplotlib",
"docs/coordinates/example_gallery_plot_sgr_coordinate_frame.rst = matplotlib",
]
markers = [
"mpl_image_compare",
]
[tool.cibuildwheel]
# We disable testing for the following wheels:
# - MuslLinux (tests hang non-deterministically)
test-skip = "*-musllinux_x86_64"
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
[tool.cibuildwheel.linux]
archs = ["auto", "aarch64"]
[tool.docformatter]
# The ``summaries`` are not (yet) 75 characters because the summary lines can't be
# automatically wrapped and must be re-written, which should be done at some point.
recursive = true
wrap-summaries = 1000
wrap-descriptions = 75
black = true
syntax = "numpy"
[tool.coverage]
[tool.coverage.run]
omit = [
"astropy/__init__*",
"astropy/**/conftest.py",
"astropy/**/setup*",
"astropy/**/tests/*",
"astropy/extern/*",
"astropy/utils/compat/*",
"astropy/version*",
"astropy/wcs/docstrings*",
"*/astropy/__init__*",
"*/astropy/**/conftest.py",
"*/astropy/**/setup*",
"*/astropy/**/tests/*",
"*/astropy/extern/*",
"*/astropy/utils/compat/*",
"*/astropy/version*",
"*/astropy/wcs/docstrings*",
]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about packages we have installed
"except ImportError",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain about script hooks
"'def main(.*):'",
# Ignore branches that don't pertain to this version of Python
"pragma: py{ignore_python_version}",
# Don't complain about IPython completion helper
"def _ipython_key_completions_",
# typing.TYPE_CHECKING is False at runtime
"if TYPE_CHECKING:",
# Ignore typing overloads
"@overload",
]
[tool.ruff]
lint.select = ["ALL"]
exclude=[
"astropy/extern/*",
"*_parsetab.py",
"*_lextab.py"
]
lint.ignore = [ # NOTE: non-permanent exclusions should be added to `.ruff.toml` instead.
# flake8-builtins (A) : shadowing a Python built-in.
# New ones should be avoided and is up to maintainers to enforce.
"A00",
# flake8-bugbear (B)
"B008", # FunctionCallArgumentDefault
# flake8-commas (COM)
"COM812", # TrailingCommaMissing
"COM819", # TrailingCommaProhibited
# pydocstyle (D)
# Missing Docstrings
"D102", # Missing docstring in public method. Don't check b/c docstring inheritance.
"D105", # Missing docstring in magic method. Don't check b/c class docstring.
# Whitespace Issues
"D200", # FitsOnOneLine
# Docstring Content Issues
"D410", # BlankLineAfterSection. Using D412 instead.
"D400", # EndsInPeriod. NOTE: might want to revisit this.
# pycodestyle (E, W)
"E711", # NoneComparison (see unfixable)
"E741", # AmbiguousVariableName. Physics variables are often poor code variables
# flake8-fixme (FIX)
"FIX002", # Line contains TODO | notes for improvements are OK iff the code works
# pep8-naming (N)
"N803", # invalid-argument-name. Physics variables are often poor code variables
"N806", # non-lowercase-variable-in-function. Physics variables are often poor code variables
# pandas-vet (PD)
"PD",
# pylint (PLR and PLW)
"PLR1730", # if-stmt-min-max (not always clearer, and sometimes slower)
"PLW0642", # self-or-cls-assignment (occasionally desirable, very rarely a mistake)
# flake8-use-pathlib (PTH)
"PTH123", # builtin-open (not worth creating a Path object, builtin open is fine)
# flake8-simplify (SIM)
"SIM103", # needless-bool (cannot be safely applied in all contexts (np.True_ is not True))
# flake8-self (SLF)
"SLF001", # private member access
# flake8-todos (TD)
"TD002", # Missing author in TODO
# flake8-return (RET)
# RET can sometimes help find places where refactoring is very helpful,
# but enforcing it everywhere might create undesirable churn
"RET505", # superfluous-else-return
"RET506", # superfluous-else-raise
# Ruff-specific rules (RUF)
"RUF005", # unpack-instead-of-concatenating-to-collection-literal -- it's not clearly faster.
]
[tool.ruff.lint.extend-per-file-ignores]
"setup.py" = ["INP001"] # Part of configuration, not a package.
".github/workflows/*.py" = ["INP001"]
"astropy/modeling/models/__init__.py" = ["F405"]
"astropy/utils/decorators.py" = [
"D214", "D215", # keep Examples section indented.
"D411", # sphinx treats spaced example sections as real sections
]
"test_*.py" = [
"ANN201", # Public function without return type annotation
"B018", # UselessExpression
"D", # pydocstyle
"S101", # Use of assert detected
]
".pyinstaller/*.py" = ["INP001"] # Not a package.
"conftest.py" = ["INP001"] # Part of configuration, not a package.
"docs/*.py" = [
"INP001", # implicit-namespace-package. The examples are not a package.
]
"__init__.py" = [
"E402", # module level import not at top of file
"F403", # Wildcard imports
]
[tool.ruff.lint.flake8-annotations]
ignore-fully-untyped = true
mypy-init-return = true
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.flake8-type-checking]
exempt-modules = []
[tool.ruff.lint.isort]
known-first-party = ["astropy", "extension_helpers"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.repo-review]
ignore = [
"MY", # ignore MyPy setting checks
"PC111", # ignore using `blacken-docs` in pre-commit
"PC140", # ignore using `mypy` in pre-commit
"PC180", # ignore using `prettier` in pre-commit
"PC901", # ignore using custom update message (we have many of the default ones in our history already)
"PP308", # ignore requiring `-ra` flag for pytest, astropy's test suite is too large for this to be useful
"PY005", # ignore requiring a root level "test*" directory
]
[tool.towncrier]
package = "astropy"
filename = "CHANGES.rst"
directory = "docs/changes"
underlines = "=-^"
template = "docs/changes/template.rst"
title_format = "Version {version} ({project_date})"
[[tool.towncrier.type]]
directory = "feature"
name = "New Features"
showcontent = true
[[tool.towncrier.type]]
directory = "api"
name = "API Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "perf"
name = "Performance Improvements"
showcontent = true
[[tool.towncrier.type]]
directory = "other"
name = "Other Changes and Additions"
showcontent = true
[[tool.towncrier.section]]
name = ""
path = ""
[[tool.towncrier.section]]
name = "astropy.config"
path = "config"
[[tool.towncrier.section]]
name = "astropy.constants"
path = "constants"
[[tool.towncrier.section]]
name = "astropy.convolution"
path = "convolution"
[[tool.towncrier.section]]
name = "astropy.coordinates"
path = "coordinates"
[[tool.towncrier.section]]
name = "astropy.cosmology"
path = "cosmology"
[[tool.towncrier.section]]
name = "astropy.extern"
path = "extern"
[[tool.towncrier.section]]
name = "astropy.io.ascii"
path = "io.ascii"
[[tool.towncrier.section]]
name = "astropy.io.fits"
path = "io.fits"
[[tool.towncrier.section]]
name = "astropy.io.misc"
path = "io.misc"
[[tool.towncrier.section]]
name = "astropy.io.registry"
path = "io.registry"
[[tool.towncrier.section]]
name = "astropy.io.votable"
path = "io.votable"
[[tool.towncrier.section]]
name = "astropy.modeling"
path = "modeling"
[[tool.towncrier.section]]
name = "astropy.nddata"
path = "nddata"
[[tool.towncrier.section]]
name = "astropy.samp"
path = "samp"
[[tool.towncrier.section]]
name = "astropy.stats"
path = "stats"
[[tool.towncrier.section]]
name = "astropy.table"
path = "table"
[[tool.towncrier.section]]
name = "astropy.tests"
path = "tests"
[[tool.towncrier.section]]
name = "astropy.time"
path = "time"
[[tool.towncrier.section]]
name = "astropy.timeseries"
path = "timeseries"
[[tool.towncrier.section]]
name = "astropy.uncertainty"
path = "uncertainty"
[[tool.towncrier.section]]
name = "astropy.units"
path = "units"
[[tool.towncrier.section]]
name = "astropy.utils"
path = "utils"
[[tool.towncrier.section]]
name = "astropy.visualization"
path = "visualization"
[[tool.towncrier.section]]
name = "astropy.wcs"
path = "wcs"
[tool.gilesbot]
[tool.gilesbot.circleci_artifacts]
enabled = true
[tool.gilesbot.pull_requests]
enabled = true
[tool.gilesbot.towncrier_changelog]
enabled = true
verify_pr_number = true
changelog_skip_label = "no-changelog-entry-needed"
help_url = "https://github.com/astropy/astropy/blob/main/docs/changes/README.rst"
changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/astropy/astropy/blob/main/docs/changes/README.rst)."
type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/astropy/astropy/blob/main/docs/changes/README.rst)"
number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file."
[tool.gilesbot.circleci_artifacts.py311-test-image-mpl360]
url = ".tmp/py311-test-image-mpl360/results/fig_comparison.html"
message = "Click details to see the figure test comparisons, for py311-test-image-mpl360."
report_on_fail = true
[tool.gilesbot.circleci_artifacts.py311-test-image-mpldev]
url = ".tmp/py311-test-image-mpldev/results/fig_comparison.html"
message = "Click details to see the figure test comparisons for py311-test-image-mpldev."
report_on_fail = true
[tool.codespell]
skip = """
*.cff,
*/data/*,
*extern/*,
astropy/CITATION,
docs/credits.rst,
*_lextab.py,
*_parsetab.py,
"""
# The following list of words for codespell to ignore may contain some
# misspellings that should be revisited and fixed in the future.
ignore-words-list = """
aas,
ans,
clen,
coo,
datas,
ded,
dum,
fo,
hel,
lightyear,
lond,
nax,
nd,
ned,
nin,
numer,
precess,
precessed,
precesses,
precessing,
pres,
som,
splitted,
stil,
te,
wirth,
"""
|