Skip to content

Split casa/pipeline optional dependency groups, and matching CI/tox envs - #401

Open
e-koch wants to merge 6 commits into
PhangsTeam:masterfrom
e-koch:split_optional_requirements
Open

e-koch wants to merge 6 commits into
PhangsTeam:masterfrom
e-koch:split_optional_requirements

Conversation

@e-koch

@e-koch e-koch commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Split the monolithic casa optional-dependency group into casa (core CASA tools), pipeline (plotms + the ALMA SD pipeline package, which now pulls in all casa deps via self-reference), and viewer (casaviewer), plus an all convenience extra.
  • plotms and viewer imports in casaStuff.py are now always optional/guarded.
  • Updated tox.ini and .github/workflows/build.yml to mirror the new groups: separate py312-casa/py312-pipeline tox envs and a casa/pipeline build matrix, each installing only its own extras.
  • Added a pipeline pytest marker for tests needing plotms/the pipeline package specifically, so the casa-only CI leg doesn't require it installed. Dropped the casaviewer import test since viewer is no longer installed in any CI leg.

Test plan

  • tox -e py312-casa and tox -e py312-pipeline pass in a CASA-enabled environment
  • CI build matrix (casa, pipeline extras) succeeds
  • pytest -m "not casa" still passes without any CASA install

🤖 Generated with Claude Code

e-koch and others added 4 commits September 23, 2026 17:05
- tox: separate py312-casa/py312-pipeline envs; gate CASA setup on
  either factor; select pytest markers accordingly
- build.yml: matrix over casa/pipeline extras
- register pipeline pytest marker for plotms; drop casaviewer test
  since viewer is no longer installed in CI

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@e-koch

e-koch commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

@thomaswilliamsastro here's my proposed split of casa vs pipeline dependencies.

pip install phangsPipeline[casa] is only the base casa modular packages.
pip install phangsPipeline[pipeline] add plotms and the pipeline install.

I also split the viewer off into its own group separate of the other two. It's being deprecated so we'll want to remove it altogether at some point.

To install all the optional casa dependencies: pip install phangsPipeline[all]

@e-koch

e-koch commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

I also think we can drop the <3.13 python dependency. I've built the pipeline and base casa stack in 3.13.

@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
104 1 103 20
View the full list of 1 ❄️ flaky test(s)
tests/test_casa_imports.py::tests.test_casa_imports

Flake rate in main: 100.00% (Passed 0 times, Failed 4 times)

Stack Traces | 0s run time
ImportError while importing test module '.../phangs_imaging_scripts/tests/test_casa_imports.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
..../py312-casa-cov/analysis_scripts/readscans.py:87: in <module>
    from taskinit import *
E   ModuleNotFoundError: No module named 'taskinit'

During handling of the above exception, another exception occurred:
.../usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_casa_imports.py:5: in <module>
    import analysisUtils as au
..../py312-casa-cov/analysis_scripts/analysisUtils.py:74: in <module>
    import readscans as rs
..../py312-casa-cov/analysis_scripts/readscans.py:90: in <module>
    from casatools import quanta as qatool
......./py312-casa-cov/lib/python3.12.../site-packages/casatools/__init__.py:44: in <module>
    from .image import image
......./py312-casa-cov/lib/python3.12.../site-packages/casatools/image.py:4: in <module>
    from .__casac__.image import image as _image
......./py312-casa-cov/lib/python3.12.../casatools/__casac__/image.py:10: in <module>
    from . import _image
E   ImportError: /home/runner/work/phangs_imaging_scripts/phangs_imaging_scripts/......./py312-casa-cov/lib/python3.12.../__casac__/lib/libldap.so.2: undefined symbol: EVP_md2, version OPENSSL_3.0.0

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@e-koch

e-koch commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

Tried removing the upper limit on casa version. This is to check whether analysisUtils is now passing with the latest 6.7 release.

@thomaswilliamsastro

thomaswilliamsastro commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

This looks fine, though the test failing was the reason I pinned the CASA versions (check the tox matrix runs locally though, if it passes there then it might be some weird OS configuration thing). Could you also update the installation docs to make it clear how users should be installing this all?

@e-koch

e-koch commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Wait for #402 to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants