-
Notifications
You must be signed in to change notification settings - Fork 4
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
7.improve CIworkflow #8
Conversation
`environment.yml` had different package reqs than whats in `setup.py` or `meta.yaml`. changed to be consistent. `setup-python` github action gives us accesss to a python with conda in it, remove conda reqs for now. change name.
Ian Laflotte cannot spell.
…te-pip-install-pytest not convinced this will work. lets see.
…da-conda-env-create-pip-install-pytest.yml ian still can't type.
…l to conda-env-create-and-pytest.yml shorter name
remove what seems to be redundant workflow
remove unused workflow
separate steps of docs job by new line for readability
remove unused docker build workflow
remove unused workflow file
create a conda build workflow that doesn't upload anything for PR/MR. change the conda publish workflow to run only upon push to main.
update checkout action to v4, remove conda config line that i'm not sure works and is redundant anyways.
remove branch from meta.yaml
remove gir url from source field in catalogbuilder. messes with conda build call. thank you bennet
include explicit `catalogbuilder.scripts.gen_intake_gfdl` import test in `meta.yaml` for conda package
trying to absorb what create-gfdl-catalog does into conda-env-create-and-pytest to start. if i'm understanding the pipelines correctly, these steps should work with the conda env create approach, and we can re-define them in terms of the pytest suite. lets see if my first attempt here works..
ahhhhh the pytest, conda installations brought in with the python environment pointed to by github actions "setup-python" take precedence over the conda env python etc. not my favorite thing- but it does seem at least to work consistently. i hope to see most steps work after this commit.
`which pytest` upsets github ci/cd... kind of suprising
so, almost entirely focused on changing the workflow files here. deletes the following, as they are unused/old/redundant
|
put publish-conda.yml name field back to old value, to avoid polluting the workflows menu of this repo more than i already did...
that later pytest call isnt redundant, it uses the downloaded artifacts from earlier in the workflow. also, pretty sure the `python` call points to the right one, even if `pytest` doesn't without the path to the executable in the conda env.
remove now-redundant create-gfdl-catalog.yml. we can test all the same things in the pipeline testing the conda env create step. for the future: absorb the test script calls into the pytest suite.
I'm happy with the current tweaks. Note that all of this is changes regarding the workflow and/or environment files. There are no changes to the code of the package itself. |
@@ -0,0 +1,70 @@ | |||
name: conda-env-create-and-pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: conda-env-create-and-pytest | |
name: catalog-build-pytests-in-conda-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the workflow file could also be renamed to catalog-build-pytests-in-conda-env? (or anything that is a bit descriptive as this is an important dynamic catalog building test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm OK with finding a new name, but let's avoid "build" in this context. build is very overloaded here. we have catalogbuilder building catalogs, a pipeline building an environment, a pipeline building a package using conda build...
ideally, some day, this dynamic catalog creation test exists within a pytest suite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about conda-env-create-run-tests
?
- catalogbuilder.cats | ||
- catalogbuilder.scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ciheim will be curious to see if fre-cli can still take the --config option because I had not moved configs during this restructuring. We can move it if fre-cli requires it, though it shouldn't be required. Please open a separate issue if fre-cli needs catalogbuilder.config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @ilaflott! Minor changes and suggestions made.
For a later time- This change makes me wonder if a similar, but minimal test to use the catalogbuilder conda package and run the catalog builder might add value as well, upon push. But, I can also see how the analysis-scripts repo might help with this post PR (push) tests.
@ilaflott not sure if its tied to this PR, but the json and csv files in here https://github.com/NOAA-GFDL/CatalogBuilder/tree/main/catalogbuilder/cats do not show up in the conda package we install/download from the noaa-gfdl channel. Do you see the same behavior? Descending into catalogbuilder and looking at cats/ reveals that there is only the init file in there within the published conda pkg. It may have to do something with this file that may need a tweak or could be removed given the settings have changed? |
Co-authored-by: Aparna Radhakrishnan <aparna.radhakrishnan@noaa.gov>
thanks for the excellent feedback @aradhakrishnanGFDL, let me take a peek at what you're pointing out RE json files being absent. as for the conda env building + running test... there is merit to the idea IMO. what makes |
implementing conda env tricks for github ci/cd i figured out here: NOAA-GFDL/fre-cli#127
now includes files other than `__init__.py` in `catalogbuilder/cats`
OK, aside from the workflow file name, i've implemented the suggested changes and added another improvement to handling calls to the |
…getting put in a conda env's "site-packages" directory. adjust respective workflow file add pytest.ini file for assist pytest calls with finding the tests
… change, and `<root>/intakebuilder/` --> `<root>/catalogbuilder/intakebuilder` change
OK great news! I managed to work the packaging structure out... initially i just wanted to move |
…-run-pytest.yml change file name / workflow name. change `pip install --prefix` path- shouldn't target `bin/`, but the directory containing it and e.g. `lib` and i.e. other top-level things for the env.
This tries to straighten out the workflow files for githubs CI/CD pipeline. Part of testing these changes is... opening this PR and watching the correct workflows run.