Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support spack by adding UW Tools as a module #708

Open
WeirAE opened this issue Mar 3, 2025 · 3 comments
Open

Support spack by adding UW Tools as a module #708

WeirAE opened this issue Mar 3, 2025 · 3 comments

Comments

@WeirAE
Copy link
Contributor

WeirAE commented Mar 3, 2025

Description
Compiling several ongoing discussions, several individuals and groups have requested that UW Tools be added to spack as a package, which can then be added to the HPC stack. This will especially benefit Land DA but others as well.

Requirements
From discussions, this appears to be the process:

  • run spack create on a chosen version of UW Tools to create a package.py
  • edit the package.py to add the necessary description/homepage/dependencies/etc
  • open a PR at the spack repo to add the package

Acceptance Criteria (Definition of Done)
Completed package is added to the authoratative spack repo and the JCSDA spack-stack

@WeirAE
Copy link
Contributor Author

WeirAE commented Mar 3, 2025

Issue spack/spack#49265 has been added to the spack repo to track progress there as well. I would like to work with the UW team to help create the appropriate packages. If there's a way to automate mirroring the conda package or otherwise ensure consistency, that would be best.

@WeirAE
Copy link
Contributor Author

WeirAE commented Mar 5, 2025

I have a test going on Hera at /scratch2/NCEPDEV/stmp/Brian.Weir/spack/var/spack/repos/builtin/packages/uwtools/package.py . it looks like spack should automatically pull new versions from conda forge as long as thats where its pointing, which is quite convenient! However, it doesn't appear to handle conda files, only tarballs, so I only have the 2.5.1 hash. Most of the requirements are already in spack, except for iotaa. I also need to get the install written, but please take a look and let me know what you think. I'll do one for iotaa as well.

@maddenp-noaa
Copy link
Collaborator

iotaa is published on PyPI so I think that'll be easy when you get to it.

For uwtools, and just from a quick look at the Spack docs, it seems to me like source (sdist) download from GitHub (e.g. https://github.com/ufs-community/uwtools/archive/refs/tags/v2.5.1.tar.gz) followed by a setuptools build backend install using src/setup.py might be a way forward. Probably it should be instructed not to install dependencies via setup.py as Spack will presumably be handling that. (There's a pip --no-deps flag for this purpose; not sure how Spack handles it -- maybe this?)

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

No branches or pull requests

2 participants