-
Notifications
You must be signed in to change notification settings - Fork 21
Add climo wrapper #539
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
Add climo wrapper #539
Conversation
- annual and monthly tests - add reverse chdir to combine.py so the tests don't modify the working directory
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.
solid effort again! i still think calling this a wrapper is implying the wrong thing about the code's structure, but aside from the name this is looking great
fre/tests/test_files/climatology/outputs/annual/atmos.1980-1981.alb_sfc.nc
Outdated
Show resolved
Hide resolved
fre/tests/test_files/climatology/outputs/annual/atmos.1980-1981.aliq.nc
Outdated
Show resolved
Hide resolved
…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
|
@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
|
@ilaflott I can't find the |
singhd789
left a comment
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.
My comments were addressed. Great work Ian
…oriented tests of a cli-equivalent command
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