-
Notifications
You must be signed in to change notification settings - Fork 15
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
Remove deprecated parameters #654
base: main
Are you sure you want to change the base?
Conversation
Possible text for v3.0.0 release notes:
Most importantly, the
As part of the update to v3.0.0, we also removed several deprecated parameters unrelated to
|
Ok, it looks like nothing broke according to my testing Testing stepscd ~/ez/zppy-interfaces
git status
git log
# Last commit, from 12/18: Remove deprecated parameters
conda clean --all --y
conda env create -f conda/dev.yml -n zi_dev_pr11
conda activate zi_dev_pr11
pip install .
pytest tests/unit/global_time_series/test_*.py
# 7 passed in 22.20s
# Skip e3sm_diags setup
cd ~/ez/zppy
conda env create -f conda/dev.yml -n zppy_dev_pr654
conda activate zppy_dev_pt654
pip install .
pytest tests/test_*.py
# 1 failed, 22 passed in 0.48s
# Needed to remove plot_names and atmosphere_only from tests...
pytest tests/test_*.py
# 23 passed in 0.55s
# Edit tests/integration/utils.py:
# UNIQUE_ID = "test_zppy_pr654_20241218"
# For get_chyrsalis_expansions:
# "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zi_dev_pr11",
# Keep this as is: generate_cfgs(unified_testing=False, dry_run=False)
python tests/integration/utils.py
# Update tests/integration/test_weekly.py:
# subdirs_to_check = ["mpas_analysis", "global_time_series"]
# Skip the bundles tests
# Also set non-required tasks in v2 and v3 cfgs to `active = False`
python tests/integration/utils.py
zppy -c tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg
zppy -c tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test_zppy_pr654_20241218/v3.LR.historical_0051/post/scripts/
grep -v "OK" *status
# No errors
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test_zppy_pr654_20241218/v2.LR.historical_0201/post/scripts
grep -v "OK" *status
# No errors
# Run integration tests
cd ~/ez/zppy
pytest tests/integration/test_weekly.py
# 2 passed, 3 skipped in 179.14s (0:02:59) |
c2e3198
to
9e075a1
Compare
@chengzhuzhang What are your thoughts on my comment above? In particular:
I tested these changes and it looks like everything works out alright without these parameters. If you want to review yourself, it's this PR & E3SM-Project/zppy-interfaces#11. |
@xylar @tomvothecoder Do either of you have thoughts on the decision I described above? I.e., should a major version change 1) modernize the codebase, removing all deprecated things or 2) only remove things completely incompatible with the new approach/feature? |
# TODO for v3.0.0: Remove this parameter | ||
# DEPRECATED. No longer used. | ||
# The scratch directory | ||
scratch = string(default="") |
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 a little unsure to remove this parameter, before the test tc_analysis tests can pass on Perlmutter, let's keep your change now, and can decide latter if removing this parameter is okay, after Perlmutter change.
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.
This is just the default value for scratch
. The actual use of scratch
was removed in the result_dir={{ scratch }}/tc-analysis_${Y1}_${Y2}/
-> result_dir={{ output }}/post/atm/tc-analysis_${Y1}_${Y2}/
change (see https://github.com/E3SM-Project/zppy/pull/632/files#r1878679038).
Are you saying 1) undo that change or 2) just hold off on removing scratch
as a parameter completely until we make sure that change works on Perlmutter?
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 wondering if we can test tc_analysis on Perl-mutter to make sure, it works without needing to including intermediate output underscratch
file system? If so, we are free to remove scratch
parameter and the codes what supports this.
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.
Yes, we can do this. I was holding off until the rc
testing period, because I need to copy over all the test data, etc. to Perlmutter (and Compy). But I can try to do that earlier.
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.
This would be great, thank you!
@forsyth2 I was nervous to make the change more abrupt, but after reviewing the code, I can see the parameter space is much cleaner. I think it is good to have this PR for v3. Does the parameter changes for |
Correct. |
By searching through the zppy .cfg files in https://github.com/E3SM-Project/SimulationScripts, It looks like |
I think it makes sense to modernize the code by removing all deprecated elements. Since removing deprecated code is a breaking change, it can be bundled with other breaking changes in the same release. This will help reduce technical debt in the long run. The downside in the short term is the upfront effort required to remove the deprecated code, but I believe it's well worth the investment. |
Sorry @forsyth2, I missed the question. I completely agree with @tomvothecoder. |
@tomvothecoder @xylar Thanks! That sounds good to me; we just need to make sure we alert users of the breaking changes relevant to them. |
Issue resolution
Select one: This pull request is...
1. Does this do what we want it to do?
Objectives:
Required:
If applicable:
2. Are the implementation details accurate & efficient?
Required:
If applicable:
zppy/conda
, not just animport
statement.3. Is this well documented?
Required:
4. Is this code clean?
Required:
If applicable: