From b7029ad35491f163c5233dc5ab7ffc58ed800029 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Tue, 13 Oct 2026 10:01:28 +0000 Subject: [PATCH] List sunpy as an ordinary package and move test_deps and dev_index_urls to the top level for the new integration-dashboard config format --- README.md | 23 ++++++++++++--------- packages.yaml | 53 ++++++++++++++++++++++++------------------------ sunpy_pytest.ini | 32 +++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 36 deletions(-) create mode 100644 sunpy_pytest.ini diff --git a/README.md b/README.md index 40d95d3..3c2052d 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,10 @@ integration-dashboard reusable workflow at `@main`, which: 1. reads `columns:` from `packages.yaml` and expands it into a job matrix, one job per (Python version, variant) column; 2. in each job, installs the system packages listed in the workflow's - `libraries` input, builds a shared venv with sunpy plus every - package that can be installed alongside it, and runs `pytest --pyargs - ` for each one; + `libraries` input, builds a shared venv with every listed package + that can be installed without dragging a shared dependency down for + the others (the rest are reported as held back), and runs `pytest + --pyargs ` for each one; 3. collects the results and publishes the dashboard to `gh-pages`. Running locally @@ -43,7 +44,8 @@ pip install git+https://github.com/OpenAstronomy/integration-dashboard # Some packages also need FFTW and ffmpeg, e.g. on Debian/Ubuntu: # sudo apt-get install libfftw3-dev ffmpeg -# Run from the root of this repo so conftest.py is picked up. +# Run from the root of this repo so conftest.py and sunpy_pytest.ini +# are picked up. integration-dashboard run --variant stable --python 3.12 # Or a single package, to iterate faster: @@ -67,14 +69,13 @@ Configuration Everything is configured in `packages.yaml`: -- `core_package` is sunpy, installed into every venv first, together - with the pytest plugins listed in its `test_deps` (pytest-remotedata, - so `remote_data` tests are skipped). For the `dev` variant it comes - from the nightly wheel indexes in `dev_index_urls`. +- `test_deps` lists pytest plugins installed in every venv alongside + pytest (pytest-remotedata, so `remote_data` tests are skipped). +- `dev_index_urls` lists the nightly wheel indexes used by `dev` columns. - `columns` lists the (Python version, variant) pairs to test, each one a dashboard column. Use uv notation for Python, so `"3.14t"` is the free-threaded 3.14 build. The CI matrix is generated from this list. -- `packages` lists the packages to test. +- `packages` lists the packages to install and test, sunpy included. To add or disable a package, edit its entry in `packages.yaml`. Each entry takes: @@ -110,7 +111,9 @@ check to the commit that opens the rendered page directly. To keep PR feedback fast, each package is capped at the first 10 collected tests by the repo-root `conftest.py` (which has to live here -because `pytest --pyargs` collects from site-packages). The preview is a +because `pytest --pyargs` collects from site-packages). For the same +reason sunpy's own tests are run with `sunpy_pytest.ini`, since sunpy's +pytest config requires plugins that are not installed here. The preview is a smoke check of layout, install resolution and the workflow itself, not a full regression signal. A new push to a PR cancels its in-progress run. diff --git a/packages.yaml b/packages.yaml index 3d78fa0..50b6ea2 100644 --- a/packages.yaml +++ b/packages.yaml @@ -1,22 +1,20 @@ # Configuration for `integration-dashboard run` # (https://github.com/OpenAstronomy/integration-dashboard). # -# `core_package` is the ecosystem's core package. The runner builds a -# shared venv, installs the core package first, then installs each -# entry under `packages` in turn (skipping any the resolver can't -# satisfy alongside the existing set), then runs `pytest --pyargs -# ` for each one that installed. Point this file at a -# different core package to test a different ecosystem. +# Every entry under `packages` is installed into one shared venv per +# column and tested with `pytest --pyargs `. A package that would +# need an older version of a dependency than another listed package gets +# is reported as held back instead of being installed. # # `columns` is the flat list of test configurations to run; each is a # (python, variant) pair and becomes one dashboard column. Python # version and variant are independent -- list whatever combinations # you want. Use uv's notation for Python, so e.g. "3.14t" for the # free-threaded build. Variants: -# stable -- core package + each package at their latest non-pre-release on PyPI -# pre -- same, but latest including pre-releases -# dev -- core package from its nightly wheels (or git HEAD if -# `dev_index_urls` is unset); each package from git HEAD +# stable -- each package at its latest release +# pre -- same, but including pre-releases +# dev -- each package from a nightly wheel in `dev_index_urls` if +# one exists, otherwise from git HEAD # # `tier` (on each package) is purely a category label used for # ordering and the optional `--tiers` CLI filter. Tiers are installed @@ -24,22 +22,17 @@ # each tier's packages together. This file uses `coordinated`, # `affiliated` and `provisional`. -core_package: - pypi_name: sunpy - module: sunpy - repo_url: https://github.com/sunpy/sunpy.git - # pytest plugins added to every venv alongside pytest itself. - # pytest-remotedata registers the `remote_data` marker that many - # packages use; with the plugin installed but `--remote-data` not - # passed, those tests are skipped instead of running and timing out - # on network calls. - test_deps: [pytest-remotedata] - # For the `dev` variant the core package is installed from these - # nightly wheel indexes (liberfa hosts pyerfa's dev wheels). Omit - # `dev_index_urls` to install the dev version from `git+repo_url`. - dev_index_urls: - - https://pypi.anaconda.org/sunpy/simple - - https://pypi.anaconda.org/liberfa/simple +# pytest plugins added to every venv alongside pytest itself. +# pytest-remotedata registers the `remote_data` marker that many packages +# use; with the plugin installed but `--remote-data` not passed, those +# tests are skipped instead of running and timing out on network calls. +test_deps: [pytest-remotedata] + +# Nightly wheel indexes used by `dev` columns, for any package they host +# (liberfa hosts pyerfa's dev wheels). +dev_index_urls: + - https://pypi.anaconda.org/sunpy/simple + - https://pypi.anaconda.org/liberfa/simple dashboard_title: Sunpy ecosystem integration matrix @@ -52,6 +45,14 @@ columns: - {python: "3.14", variant: dev} packages: + - pypi_name: sunpy + tier: coordinated + module: sunpy + repo_url: https://github.com/sunpy/sunpy.git + install_extras: [tests, all] + # sunpy's own pytest config requires plugins that are not installed here. + pytest_args: ["-c", "sunpy_pytest.ini"] + - pypi_name: ndcube tier: coordinated module: ndcube diff --git a/sunpy_pytest.ini b/sunpy_pytest.ini new file mode 100644 index 0000000..e79ca22 --- /dev/null +++ b/sunpy_pytest.ini @@ -0,0 +1,32 @@ +# This is a reduced config to run in this specific CI +[pytest] +minversion = 7.0 +testpaths = + sunpy + docs +norecursedirs = + .tox + build + docs/_build + docs/generated + *.egg-info + examples + sunpy/_dev + .history + tools + sunpy/extern + benchmarks +doctest_plus = enabled +doctest_optionflags = NORMALIZE_WHITESPACE FLOAT_CMP ELLIPSIS +addopts = --arraydiff --doctest-rst --doctest-ignore-import-errors -p no:unraisableexception -p no:threadexception -m "not mpl_image_compare" +asdf_schema_tests_enabled = true +asdf_schema_root = sunpy/io/special/asdf/resources/ +markers = + remote_data: marks this test function as needing remote data. + online: marks this test function as needing online connectivity. + mpl_image_compare: marks this test function as using hash-based Matplotlib figure verification. This mark is not meant to be directly applied, but is instead automatically applied when a test function uses the @sunpy.tests.helpers.figure_test decorator. + flaky + array_compare +remote_data_strict = true +filterwarnings = + ignore