Add climo wrapper#539
Merged
Merged
Conversation
1 task
1 task
singhd789
reviewed
Aug 25, 2025
- annual and monthly tests - add reverse chdir to combine.py so the tests don't modify the working directory
ilaflott
requested changes
Aug 26, 2025
ilaflott
requested changes
Oct 10, 2025
…e flag to pipeline calls and remove the long thing. add pylintrc to list of files in test section of metayaml
…_averages module file instead
… to be responsible anymore. make some formatting slightly nicer to read. catch the right exception, should fix the pipeline bug
…ked in the beginning of the routine now. also add a test for the exception raised with the cdoTimeAverager
Member
|
@singhd789 @mlee03 i didn't quite get to all the feedback, but i got to a bunch of it and some of it i don't want to resolve without yee eyez |
… in both combine and wrapper, and remove later redundant checks. add test for raising the exception
…d tests checking for value error raising
Contributor
|
@ilaflott I can't find the |
ilaflott
approved these changes
Oct 15, 2025
mlee03
approved these changes
Oct 15, 2025
singhd789
approved these changes
Oct 15, 2025
Contributor
singhd789
left a comment
There was a problem hiding this comment.
My comments were addressed. Great work Ian
…oriented tests of a cli-equivalent command
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ian: @ceblanton and @ilaflott collab, i'll be summarizing what's up here soon
the main mission- climatology calculations
fre app gen-time-averages-wrapper/generate_time_averages.generate_wrapper, which generates an output climatologyfre app combine-time-averages/generate_time_averages.combine, combines files holding individual monthly averages into one for the climatology generationgenerate_time_averages/tests/test_wrapper.py,generate_time_averages/tests/test_combine.pycdlover 34cdlfiles containing test datasmall side quests, tweaks
do_timeavgsas option, superceded byclimatology), tweaks to testingyamlconfigs in this repo removing thedo_timeavgskeyfre/app/tests/test_mask_atmost_plevel.pytofre/app/mask_atmos_plevel/tests, and gave it an__init__.pyfor coverage/lintingbigger side quests, efforts
general
fre/app/generate_time_averagesimprovementstypingadditionspylintoriented edits for all files based on current repo standardtests/test_generate_time_averagesfrom the ground-up, heavily leveragingpytest.parameterize, increased clarity into testing approach, etc.printstatements in non-testing code still remained, this was fully removed and replaced entirely withfre_loggerusage.github/workflowsrevamped:create_test_conda_env,build_conda,publish_condaworkflows,set_channel_priorityis nowstrictconda-forge::conda-verifyandconda-forge::anaconda-clientdon't really do anything since they're really for uploading to conda channelsrandmain, and so are removed frompublish_condaspell_checkworkflow to redundantly run twice each pushcreate_test_conda_envnow explicitly activates thefre-clienvironment afterconda init, which is enabled by sourcingconda/etc/profile.d/conda.shghcr.io/noaa-gfdl/fre-cli:miniconda24.7.1_gcc14.2.0, and instead now useghcr.io/noaa-gfdl/fre-cli:miniconda24_gcc14_v2packaging changes:
pyproject.tomllist of deps changed to includeanalysis_scripts,cftime,netCDF4,numpyandpyyaml, all of which are explicitly called in the body of the code and arepip/pythonpackages. also removespylintandpytestunder this section and puts them under thetest-specific reqsmeta.yamlnow defaults to conda-package versiondevelopwhen there's nogittag, certain version reqs added to help with environment resolution,noaa-gfdlpackages are all pinned to specific versions. we now explicitly ask fornetCDF4=1.7.*andxarray>=2024.*to avoid certain behaviors assoc. with earlier versions calling test failures.Jinja2no longer needs to be specifically version3.0.*, just greater than3.numpyset to1.26.*,pylint,pytestandpytest-covare added to thetest: requires:section insteadenvironment.yamltweaked similarly to above dependency lists, but still contains the testing requirements.pylintrcnow included in repo and is used for configuring thepylintstandards,fail-underset to7.5,max-positional-argumentsincreased to 6 from 5, workflow calls topylintnow use the config file insteadChecklist before requesting a review