-
Notifications
You must be signed in to change notification settings - Fork 15
Add Python 3.14 support #757
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
Conversation
|
Xylar had noted:
So, for the Spring release (tentatively planned as: testing period beginning April 1, release on May 1), we'd want to support four versions of Python: 3.11, 3.12, 3.13, 3.14. |
|
Tom also noted:
|
7ac2efe to
ed56120
Compare
|
Re |
|
All the GitHub Actions are passing, including the 3.14 test. |
|
Unlike Before merging:
|
Testing stepscd ~/ez/zppy
git status
# On branch fix-mpas-analysis-cache
# nothing to commit, working tree clean
git checkout add-python3.14
git log
# Add Python 3.14 support
# Multithread image tests (#752)
# Fixes for rc4 (#755)
# Bump to 3.1.0rc3 (#754)
# Let's do some rebasing
git fetch upstream main
git rebase upstream/main
git log
# Add Python 3.14 support
# Add NCO version parameter (#761)
# Bump to 3.1.0 (#759)
# Edit tests/integration/utils.py
# This should actually be a permanent change:
# get_chyrsalis_expansions:
# "path_pcmdi_diags_obs_ts": "/lcrc/group/e3sm/diagnostics/observations/Atm/time-series",
# TEST_SPECIFICS:
# TEST_SPECIFICS: Dict[str, Any] = {
# # These are custom environment_commands for specific tasks.
# # Never set these to "", because they will print the line
# # `environment_commands = ""` for the corresponding task,
# # thus overriding the value set higher up in the cfg.
# # That is, there will be no environment set.
# # (`environment_commands = ""` only redirects to Unified
# # if specified under the [default] task)
# "diags_environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
# "global_time_series_environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
# "pcmdi_diags_environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
# # This is the environment setup for other tasks.
# # Leave as "" to use the latest Unified environment.
# "environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
# "cfgs_to_run": [
# "weekly_bundles",
# "weekly_comprehensive_v2",
# "weekly_comprehensive_v3",
# "weekly_legacy_3.0.0_bundles",
# "weekly_legacy_3.0.0_comprehensive_v2",
# "weekly_legacy_3.0.0_comprehensive_v3",
# ],
# "tasks_to_run": [
# "e3sm_diags",
# "mpas_analysis",
# "global_time_series",
# "ilamb",
# "pcmdi_diags",
# ],
# "unique_id": "test_zppy_py3.14",
# }
git diff
# Diff looks good
# Set up conda
lcrc_conda # Activate conda
rm -rf build
conda clean --all --y
conda env create -f conda/dev.yml -n test-py3.14
conda activate test-py3.14
pre-commit run --all-files
python -m pip install .
conda list | grep python
# python 3.14.0 h32b2ec7_102_cp314 conda-forge
# Good, python is at 3.14
pytest tests/test_*.py
# 35 passed in 0.44s
python tests/integration/utils.py
git status
# Good, only generated files changed
sq
# Good, no currently queued jobs.
zppy -c tests/integration/generated/test_weekly_bundles_chrysalis.cfg
zppy -c tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg
zppy -c tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg
zppy -c tests/integration/generated/test_weekly_legacy_3.0.0_bundles_chrysalis.cfg
zppy -c tests/integration/generated/test_weekly_legacy_3.0.0_comprehensive_v2_chrysalis.cfg
zppy -c tests/integration/generated/test_weekly_legacy_3.0.0_comprehensive_v3_chrysalis.cfg
# Count the number of jobs
sq | wc -l # Tue 12/02 13:16 => 144 - header row = 143 jobs
# For reference:
alias sq
# alias sq='sqa -u ac.forsyth2'
alias sqa
# alias sqa='squeue -o "%8u %.7a %.4D %.9P %7i %.2t %.10r %.10M %.10l %j" --sort=P,-t,-p'
sq | wc -l # Tue 12/02 13:54 => 30 - header row = 29 jobs
sq | wc -l # Tue 12/02 14:55 => 1 - header row = 0 jobs
# Check on bundles status
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test_zppy_py3.14/v3.LR.historical_0051/post/scripts
grep -v "OK" *status
# Good, no errors
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_legacy_3.0.0_bundles_output/test_zppy_py3.14/v3.LR.historical_0051/post/scripts
grep -v "OK" *status
# Good, no errors
# Now, run bundles part 2
cd ~/ez/zppy
git status
# On branch add-python3.14
# Good, correct branch
# Current conda env: test-py3.14
# Good, correct environment
zppy -c tests/integration/generated/test_weekly_bundles_chrysalis.cfg
zppy -c tests/integration/generated/test_weekly_legacy_3.0.0_bundles_chrysalis.cfg
sq | wc -l # Tue 12/02 14:56 => 5 - header row = 4 jobsHit disk space limit while testing E3SM-Project/zstash#407: sq
# USER ACCOUNT NODE PARTITION JOBID ST REASON TIME TIME_LIMIT NAME
# ac.forsy e3sm 1 compute 1029464 CG NonZeroExi 4:33 7:00:00 bundle3
# ac.forsy e3sm 1 compute 1029461 CG NonZeroExi 5:27 7:00:00 ilamb_1985-1986
# ac.forsy e3sm 1 compute 1029462 CG NonZeroExi 5:02 7:00:00 bundle3
# ac.forsy e3sm 1 compute 1029463 CG NonZeroExi 5:24 7:00:00 ilamb_1985-1986
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test_zppy_py3.14/v3.LR.historical_0051/post/scripts
grep -v "OK" *status
# bundle3.status:ERROR
# e3sm_diags_atm_monthly_180x360_aave_mvm_model_vs_model_1987-1988_vs_1985-1986.status:ERROR (11)
# ilamb_1985-1986.status:ERROR (3)
emacs bundle3.o1029462
# OSError: [Errno 28] No space left on device
lcrc-quota
# ----------------------------------------------------------------------------------------
# Home Current Usage Space Avail Quota Limit Grace Time
# ----------------------------------------------------------------------------------------
# ac.forsyth2 61 GB 38 GB 100 GB
# ----------------------------------------------------------------------------------------
# Project Current Usage Space Avail Quota Limit Grace Time
# ----------------------------------------------------------------------------------------
/usr/lpp/mmfs/bin/mmlsquota -u ac.forsyth2 --block-size T fs2
# /usr/lpp/mmfs/bin/mmlsquota -u ac.forsyth2 --block-size T fs2
# Block Limits | File Limits
# Filesystem Fileset type TB quota limit in_doubt grace | files quota limit in_doubt grace Remarks
# fs2 root USR 84 300 300 1 none | 5986737 0 0 148 none lcrcstg.lcrc.anl.gov
# Neither of these indicate any problems with disk space...Attempting to pick up testing without starting over: cd ~/ez/zppy
git status
# On branch fix-mpas-analysis-cache
# Handle uncommitted changes
git add -A
git commit -m "Testing " --no-verify
git checkout add-python3.14
# On branch add-python3.14
# Good, correct branch
conda activate test-py3.14
# Current conda env: test-py3.14
# Good, correct environment
python -m pip install .
zppy -c tests/integration/generated/test_weekly_bundles_chrysalis.cfg
zppy -c tests/integration/generated/test_weekly_legacy_3.0.0_bundles_chrysalis.cfg
sq | wc -l # Wed 12/03 15:30 => 5 - header row = 4 jobs
sq | wc -l # Wed 12/03 16:33 => 1 - header row = 0 jobs
# Review finished runs
### v2 ###
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v2_output/test_zppy_py3.14/v2.LR.historical_0201/post/scripts
grep -v "OK" *status
# Good, no errors
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_legacy_3.0.0_comprehensive_v2_output/test_zppy_py3.14/v2.LR.historical_0201/post/scripts
grep -v "OK" *status
# Good, no errors
### v3 ###
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test_zppy_py3.14/v3.LR.historical_0051/post/scripts
grep -v "OK" *status
# Good, no errors
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_legacy_3.0.0_comprehensive_v3_output/test_zppy_py3.14/v3.LR.historical_0051/post/scripts
grep -v "OK" *status
# Good, no errors
### bundles ###
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test_zppy_py3.14/v3.LR.historical_0051/post/scripts
grep -v "OK" *status
# Good, no errors
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_legacy_3.0.0_bundles_output/test_zppy_py3.14/v3.LR.historical_0051/post/scripts
grep -v "OK" *status
# Good, no errors
cd ~/ez/zppy
ls tests/integration/test_*.py
pytest tests/integration/test_bash_generation.py
# 1 failed in 2.12s -- that's because of changes in https://github.com/E3SM-Project/zppy/pull/761
pytest tests/integration/test_campaign.py
# 6 failed in 1.93s -- same reason
pytest tests/integration/test_defaults.py
# 1 failed in 0.37s -- same reason
pytest tests/integration/test_last_year.py
# 1 passed in 0.29s
pytest tests/integration/test_bundles.py
# 1 failed, 1 passed in 1.39s
# Looks like we might be missing some ts_rof_monthly code? Possibly because of the restart?
salloc --nodes=1 --partition=debug --time=00:30:00 --account=e3sm
lcrc_conda
conda activate test-py3.14
pytest tests/integration/test_images.py
# 1 passed in 711.75s (0:11:51)
cat test_images_summary.md
Bundles debuggingFull test output: # Let's check the ts_rof_monthly error:
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_bundles_output/test_zppy_py3.14/v3.LR.historical_0051/post/scripts
grep "ts_rof" *.o*
# bundle3.o1029462:=== ts_rof_monthly_1985-1986-0002.bash ===
# bundle3.o1029462:=== ts_rof_monthly_1987-1988-0002.bash ===
grep "ts_rof" *.bash # The test is actually checking the bash file
# Many matches
grep "./ts_rof_monthly_1985-1986-0002.bash" *.bash
# No results
grep "./ts_rof_monthly_1987-1988-0002.bash" *.bash
# No results
ls bundle3.o*
# bundle3.o1029462 bundle3.o1033271
# So, yes, ts_rof ran on the initial run before we ran into the disk space limit.
# So, it was already marked as completed and the bash file it was in got overwritten during the rerun.Ok, I think this PR does actually pass the full test suite. Two issues came up, neither of which are actually because of this PR:
|
|
@andrewdnolan @tomvothecoder I've run the full test suite on this change. Is there any reason to hold off on merging? I shouldn't have to wait until zppy-interfaces and zstash are ready too, right? That would be a longer wait -- the former needs dependencies to support Python 3.14 and the latter needs further debugging/code changes. |
andrewdnolan
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.
@forsyth2 This looks great to me! My personal opinion would be that if your testing and CI passes then I'd merge this.
Having this in will ensure all development between now and the next unified release in March can and will be tested with 3.14, which should save alot of headache.
|
Awesome, thanks @andrewdnolan! I'll go ahead and merge then. |
Summary
Important: this should be merged to
mainafter the production release ofzppy v3.1.0.Objectives:
Issue resolution:
Select one: This pull request is...
Small Change