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

pace container CI #68

Merged
merged 92 commits into from
Apr 12, 2024
Merged

pace container CI #68

merged 92 commits into from
Apr 12, 2024

Conversation

mlee03
Copy link
Collaborator

@mlee03 mlee03 commented Feb 13, 2024

Purpose

This PR containerizes the current pace CI. Therefore, this PR resolves the issue of where to store the CI input files since all CI input files can be stored or generated in the container during Github Action.

Code changes:

Requirements changes:

N/A

Infrastructure changes:

Changes have been made to main_unit_tests.yaml to reflect the changes to CI. Main_unit_tests.yaml has been changed to main_unit_tests_mpich.yaml and main_unit_tests_openmpi.yaml where each workflow pulls the appropriate version of image stored in the noaa-gfdl registry and runs the test with either MPICH or OpenMPI installation of MPI. Both runs the script build_and_test.sh that is found in the container. Build_and_test.sh will build the conda environment using the requirements_dev.txt and constraints.txt files, generate input files, and run pytest -x /tests/main

Checklist

  • You have followed the coding standards guidelines established at Code Review Checklist.
  • Docstrings and type hints are added to new and updated routines, as appropriate
  • All relevant documentation has been updated or added (e.g. README, CONTRIBUTING docs)
  • For each public change and fix in pace-util, HISTORY has been updated
  • Unit tests are added or updated for non-stencil code changes

Additionally, if this PR contains code authored by new contributors:

  • The names of all the new contributors have been added to CONTRIBUTORS.md

Comment on lines 120 to 123
if str(error) == "eta file not specified":
pytest.xfail("testing eta file not specified")
else:
pytest.fail(f"ERROR {error}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming this is just to have finer-grained test results?

@mlee03
Copy link
Collaborator Author

mlee03 commented Mar 19, 2024

@FlorianDeconinck, @oelbert @xyuan @fmalatino, it's been a while but the PR is ready for a final review

Copy link
Contributor

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

Happy to get CI here

README.md Outdated Show resolved Hide resolved
README.md Outdated
docker run -it pace_mpich:3.8
```

In the container, the `pace` conda environment using python version 3.8 is already activated.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shall move off python 3.8. The new sanctioned python is 3.11.7. Can be logged and done afterward to no block refactor

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@FlorianDeconinck horrible of me, this is incorrect. The testing/original version of the Docker containers had the pace conda environment all set up, but the current versions do not. The users have to go through the steps themselves or execute a script in the container to set up the conda environment. This sentence has been fixed with no reference to the python version being used. That could be added if wished :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

But the script setups python3.8 correct?

Copy link
Collaborator

Choose a reason for hiding this comment

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

My overall advice would be to deliver a fully installed system via the image and in that case make it a python 3.11.x. Or tech stack is fragile to the version of Python because we use the language AST capacities themselves and those are heavily tied to the version of Python used.

Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

Can be merged as-is. I would advise to make the container very strict on what is installed, especially on the python version. The dependency tree of our stack is large and can quickly become unwieldy and I'd advise for a strict control upon it, leaving no room to the users to alter sensible versions of packages.

@fmalatino
Copy link
Contributor

@mlee03 would you like me to merge this as is, or do you plan on pushing again with commits regarding @FlorianDeconinck's latest comment?

@fmalatino fmalatino merged commit 67277dc into NOAA-GFDL:develop Apr 12, 2024
3 checks passed
@mlee03 mlee03 deleted the pace-ci branch May 6, 2024 18:45
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