FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

replace `conda:` parameter with `conda_packages:` by zacharyburnett · Pull Request #391 · OpenAstronomy/github-actions-workflows · GitHub

replace conda: parameter with conda_packages: - #391

Open
zacharyburnett wants to merge 10 commits into
OpenAstronomy:mainfrom
zacharyburnett:install_conda_packages_directly
Open

replace conda: parameter with conda_packages:#391
zacharyburnett wants to merge 10 commits into
OpenAstronomy:mainfrom
zacharyburnett:install_conda_packages_directly

Conversation

zacharyburnett commented May 5, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

alternative to #361

replace the conda: parameter (which invoked the now-archived tox-conda) with conda_packages:.

If the user populates conda_packages then the workflow sets up a Mamba environment that tox runs within.

To migrate from tox-conda, copy conda_deps from tox.ini to conda_packages in the test workflow, and then also remember to list any non-Python Conda packages in allowlist_externals:

allowlist_externals =
    hstcal

this will require a major version bump

zacharyburnett force-pushed the install_conda_packages_directly branch 2 times, most recently from c0c196b to e374ea0 Compare May 5, 2026 13:25
zacharyburnett changed the title instead of using tox-conda, install Conda packages directly with micromamba replace conda: parameter with conda_packages: May 5, 2026
zacharyburnett marked this pull request as ready for review May 5, 2026 13:25
zacharyburnett force-pushed the install_conda_packages_directly branch from e374ea0 to 44ac21e Compare May 5, 2026 13:49
zacharyburnett force-pushed the install_conda_packages_directly branch 4 times, most recently from 9c26605 to a90895a Compare June 3, 2026 18:17

Copy link
Copy Markdown
Contributor Author

@pllim this should hopefully be a good way forward instead of using tox-conda; please let me know your thoughts. I don't think this should go into 3.0.0 at the moment, probably 4.0.0 eventually

pllim commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Ooo thanks! Is there a way to test with this branch over at https://github.com/spacetelescope/wfc3tools ?

Copy link
Copy Markdown
Contributor Author

Yes! Just make a PR that changes this line:
https://github.com/spacetelescope/wfc3tools/blob/f0eaea52a6f233c9238d45b2dcfc42a1f326a395/.github/workflows/tests.yml#L25

-    uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@2835f0cacddf3f8de198db9afdb5354a5cebe0ef  # v2.6.3
+    uses: zacharyburnett/github-actions-workflows/.github/workflows/tox.yml@install_conda_packages_directly

Copy link
Copy Markdown
Contributor Author

here: spacetelescope/wfc3tools#119

zacharyburnett force-pushed the install_conda_packages_directly branch 3 times, most recently from f811cdf to 33c1c36 Compare June 3, 2026 18:39

Copy link
Copy Markdown
Contributor Author

actually @Cadair if we can squeeze another PR into the 3.0.0 release, this one seems to be working well

zacharyburnett marked this pull request as draft June 3, 2026 18:49

Copy link
Copy Markdown
Contributor Author

wait no never mind, I still need to use matrix.conda_packages instead of inputs.conda_packages

zacharyburnett force-pushed the install_conda_packages_directly branch 4 times, most recently from b9211da to 76f3014 Compare June 3, 2026 19:05

Copy link
Copy Markdown
Contributor Author

ok, fixed

zacharyburnett marked this pull request as ready for review June 3, 2026 19:09
zacharyburnett requested a review from Cadair June 3, 2026 19:09

Copy link
Copy Markdown
Contributor Author

Cadair commented Jun 3, 2026

Copy link
Copy Markdown
Member

This let's you install binaries for use in tox but not libraries right? You couldn't import a package installed like this?

Comment thread .github/workflows/tox.yml
type: string
conda:
description: Whether to test with conda (deprecated)
conda_packages:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Given how this is separate from tox, I wonder if it would be best folded into libraries like the system package managers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Oh that's a good idea!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

actually on second thought, maybe we should keep them separate; the conda environment is distinct from the runner and platform, and you can install both

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm still not entirely sure what the limits of this functionality are so hard to judge. Can you use this to install C libraries and have them picked up inside tox?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

yes, anything in the conda environment is exposed to tox via allowlist_externals

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

allowlist_externals is for command line tools only no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

oh yes you're right. The only usage of it I've seen is for testing wfc3tools with hstcal

I'm not sure if C libraries will be exposed, but I assume they should be since Conda modifies that path

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'll have to experiment. I still think that this is still a good match for libraries? There's not any meaningful difference between using conda like this and homebrew?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I guess I don't really understand how the libraries installer works, so I'm fine with pushing this PR off to 4.0 if you think it can be better

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I've completely failed to write a test which checks to see if you can load a c library installed with conda or apt inside the tox env. Feel free to have a play if you want.

I think this functionality should be in libraries, I think it's the sensible place for it to be. Note, that with your current implementation I haven't been able to install a conda package on a per-env basis, you can see this in my broken test commit.

Cadair commented Jun 3, 2026

Copy link
Copy Markdown
Member

I'm in no mad rush for 3.0 fwiw, so happy to get this in.

zacharyburnett force-pushed the install_conda_packages_directly branch from f659f25 to 7747782 Compare June 3, 2026 19:53

Copy link
Copy Markdown

⚠️ Please install the to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.66%. Comparing base (e113052) to head (7747782).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #391   +/-   ##
=======================================
  Coverage   66.66%   66.66%           
=======================================
  Files           2        2           
  Lines           6        6           
=======================================
  Hits            4        4           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Cadair added this to the 3.0 milestone Jun 8, 2026
Cadair force-pushed the install_conda_packages_directly branch 9 times, most recently from 679fd0f to a8d11d4 Compare June 8, 2026 14:31

Cadair commented Jun 8, 2026

Copy link
Copy Markdown
Member

muffled screaming

Cadair force-pushed the install_conda_packages_directly branch from a8d11d4 to 3f3a3d0 Compare June 8, 2026 14:33

Copy link
Copy Markdown
Contributor Author

for some reason the clib test with conda_packages: specified

  - linux: libraries-clibrary
    conda_packages: libffcall

isn't actually picking up the conda packages and is just setting up Python with setup-python instead:
https://github.com/OpenAstronomy/github-actions-workflows/actions/runs/27213866684/job/80350042102?pr=391

Cadair commented Jun 11, 2026

Copy link
Copy Markdown
Member

Would you mind if we bumped this to a future release while we get on top of it? I'd like to release 3.0 before I go on parental leave?

Copy link
Copy Markdown
Contributor Author

sure thing, lets bump it to 4.0

zacharyburnett force-pushed the install_conda_packages_directly branch from 9529d60 to ba8741a Compare July 20, 2026 12:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL