fitscube-rs 1.2.2

Combine single-frequency/single-time FITS images into a FITS cube (Rust port of fitscube)
Documentation
[build-system]
requires = ["maturin>=1.7,<2"]
build-backend = "maturin"

[project]
name = "fitscube-rs"
requires-python = ">=3.10"
dependencies = ["numpy"]
dynamic = ["version"]
authors = [{ name = "Alec Thomson" }]
license = "BSD-3-Clause"
license-files = ["LICENSE", "NOTICE.md"]
description = "Combine single-frequency/single-time FITS images into a FITS cube (Rust port of fitscube)"
readme = "README.md"

[project.urls]
Homepage = "https://github.com/AlecThomson/fitscube-rs"
Documentation = "https://fitscube-rs.readthedocs.io"
Repository = "https://github.com/AlecThomson/fitscube-rs"

[project.optional-dependencies]
# Parity tests run both implementations on the same inputs and compare; the
# reference `fitscube` must be >=2.3.1 (the release with the lossless
# bounding-box fix that fitscube-rs implements).
test = ["pytest", "numpy", "astropy", "radio-beam", "fitscube>=2.3.1"]
dev = ["prek", "ty"]

[dependency-groups]
# Docs build: `uv sync --group docs` then `uv run sphinx-build docs docs/_build`.
docs = [
  "sphinx<9",
  "myst-nb>=1.1",
  "furo>=2024.8.6",
  "sphinx-autoapi>=3.8.0",
  "sphinx-autodoc-typehints",
  "sphinx-copybutton",
  "sphinxcontrib-programoutput",
  "astropy>=6",
]

[tool.pytest.ini_options]
testpaths = ["tests", "fitscube_rs"]
addopts = "--doctest-modules"

[tool.ruff]
target-version = "py310"
# The .pyi stub is generated by pyo3-stub-gen; don't lint generated output.
extend-exclude = ["fitscube_rs/_fitscube_rs/__init__.pyi"]

[tool.ruff.lint]
extend-select = [
  "ARG",  # flake8-unused-arguments
  "B",    # flake8-bugbear
  "BLE",  # flake8-blind-except
  "C4",   # flake8-comprehensions
  "DTZ",  # flake8-datetimez
  "EM",   # flake8-errmsg
  "EXE",  # flake8-executable
  "FA",   # flake8-future-annotations
  "FLY",  # flynt
  "FURB", # refurb
  "G",    # flake8-logging-format
  "I",    # isort
  "ICN",  # flake8-import-conventions
  "ISC",  # flake8-implicit-str-concat
  "LOG",  # flake8-logging
  "NPY",  # NumPy specific rules
  "PD",   # pandas-vet
  "PERF", # perflint
  "PGH",  # pygrep-hooks
  "PIE",  # flake8-pie
  "PL",   # pylint
  "PT",   # flake8-pytest-style
  "PTH",  # flake8-use-pathlib
  "PYI",  # flake8-pyi
  "Q",    # flake8-quotes
  "RET",  # flake8-return
  "RSE",  # flake8-raise
  "RUF",  # Ruff-specific
  "SIM",  # flake8-simplify
  "SLOT", # flake8-slots
  "T10",  # flake8-debugger
  "T20",  # flake8-print
  "TC",   # flake8-type-checking
  "TRY",  # tryceratops
  "UP",   # pyupgrade
  "YTT",  # flake8-2020
]
ignore = [
  "PLR09",   # Too many <...>
  "PLR2004", # Magic value used in comparison
  "G004",
]

[tool.ruff.lint.per-file-ignores]
# Tests deliberately assert on broad ValueError raised from the Rust layer.
"tests/**" = ["PT011"]
# The benchmark is a standalone CLI script; printing its report is the point.
"scripts/**" = ["T201"]

[tool.maturin]
features = ["python"]
module-name = "fitscube_rs._fitscube_rs"
python-source = "."