Skip to content
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

Cam development #2

Open
wants to merge 4,202 commits into
base: CESM2.2-updates
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4202 commits
Select commit Hold shift + click to select a range
7502085
Merge pull request #1176 from mwaxmonsky/vertical-diffusion-refactor
mwaxmonsky Nov 7, 2024
9759ee1
Merge remote-tracking branch 'upstream/cam_development' into update_g…
nusbaume Nov 7, 2024
cdafa1a
updates to QPC7
brian-eaton Nov 8, 2024
68be477
update to cam6_4_045
brian-eaton Nov 8, 2024
9a14ae3
Finalize ChangeLog and update submodules.
nusbaume Nov 8, 2024
3511875
Merge pull request #1186 from sjsprecious/update_gpu_tests
nusbaume Nov 8, 2024
3441f59
Merge remote-tracking branch 'ESCOMP/cam_development' into history-bu…
peverwhee Nov 11, 2024
03c0a0f
initial changelog
peverwhee Nov 11, 2024
b1a243c
Adding timer around all code in the do_rainturb option rather than ju…
huebleruwm Nov 11, 2024
cdcbea5
update archive_baseline script to modify read permissions on izumi
Nov 12, 2024
51d1e07
Merge branch 'history-bugfixes' of https://github.com/peverwhee/CAM i…
Nov 12, 2024
f97d9f4
Merge remote-tracking branch 'ESCOMP/cam_development' into timestamp_…
peverwhee Nov 12, 2024
04bcd98
update config component to handle new compset names
jedwards4b Jul 5, 2024
b755e37
update to cam6_4_046
brian-eaton Nov 13, 2024
a955e13
remove the mct submodule stub
jedwards4b Nov 14, 2024
5fef0ae
Initial changes for 1850 climate chemistry compsets
fvitt Nov 15, 2024
df55e13
Merge branch 'cam_development' into hplin/check_energy
jimmielin Nov 15, 2024
7244285
Update build issues; atmos_phys external to head of PR
jimmielin Nov 18, 2024
e3e6a13
Update check_energy_cam_fix interface
jimmielin Nov 18, 2024
78ada3c
Restore spectral scaling to RRTMGP
brian-eaton Nov 18, 2024
a10a955
Update check_energy_cam_fix interface (2)
jimmielin Nov 18, 2024
02df169
remove the ndep settings
fvitt Nov 18, 2024
c1a670e
Merge remote-tracking branch 'jedwards4b/remove_mct_submodule' into u…
Nov 18, 2024
4622f7d
bring in use_cases from francis; remove mct
Nov 18, 2024
2e172ee
remove gases from fincl lists that are no longer available
peverwhee Nov 19, 2024
902c495
Update atmos_phys to atmos_phys0_07_000
jimmielin Nov 19, 2024
b9b727f
add changelog
peverwhee Nov 19, 2024
47dd341
Merge pull request #1078 from jedwards4b/update_config_component0705
peverwhee Nov 19, 2024
a9441a8
update git-fleximod to 0.9.3
peverwhee Nov 20, 2024
7aeabaf
change QPC7 to QPLT; add QPMT
brian-eaton Nov 20, 2024
bc5428f
Address review comments
jimmielin Nov 21, 2024
e981332
Merge branch 'cam_development' into hplin/check_energy
jimmielin Nov 21, 2024
c0b9d8b
Update comment for tot_energy_phys vc parameter
jimmielin Nov 21, 2024
69f53c0
updates for QPLT
brian-eaton Nov 27, 2024
453eea9
add regression tests for QPLT
brian-eaton Nov 29, 2024
8069243
update to cam6_4_047
brian-eaton Nov 29, 2024
6330f1a
fixes for QPLT tests
brian-eaton Nov 29, 2024
554ec1c
fixes in outfrq3s_cosp tests
brian-eaton Dec 2, 2024
99db740
Rename AOAMF as AOA1 and output updated MMR in _tend routine
fvitt Dec 3, 2024
0624476
changes to use carma4_09 base
fvitt Dec 4, 2024
ee4a28b
correct the AOASRC name
fvitt Dec 4, 2024
03e953d
Merge remote-tracking branch 'ESCOMP/cam_development' into timestamp_…
peverwhee Dec 4, 2024
3aa7463
update to head of cam_development; update cime and share externals
peverwhee Dec 4, 2024
398d956
set carma_sulfnuc_method namelist option
fvitt Dec 4, 2024
ea7b248
change derecho 10x15 res tests to 4x5
fvitt Dec 5, 2024
9d32d13
add UT and UQ to cam_diagnostics.F90
brian-eaton Dec 6, 2024
4586070
fix for history_eddy option
brian-eaton Dec 6, 2024
fa69b87
more sane way to control nitrogen deposition to surface models
fvitt Dec 11, 2024
27a96f2
remove source for Eulerian dycore; remove configuration "-dyn eul"
brian-eaton Dec 12, 2024
d1736fc
add ozone for hightop aquaplanet configs
brian-eaton Dec 12, 2024
5e2d45a
Merge tag 'cam6_4_047' into cam_zm_cleanup4
cacraigucar Dec 16, 2024
5865cd8
update externals; use temp ctsm tag
peverwhee Dec 17, 2024
f040c7c
update cdeps external
Dec 17, 2024
0fdf1cc
Add diagnostic messages
cacraigucar Dec 18, 2024
b70cfea
fix some issues in derecho regression tests
fvitt Dec 19, 2024
2120003
update clm tag
peverwhee Dec 19, 2024
ee5b540
initial changelog
peverwhee Dec 20, 2024
9e2267c
commiting changes with residual orogrpahy. may not be 'perfect'
JulioTBacmeister Dec 20, 2024
19f0d96
updated changelog
peverwhee Dec 20, 2024
f429ebf
Merge pull request #1147 from jedwards4b/timestamp_in_rpointer_name
peverwhee Dec 20, 2024
99dbe11
merge to head of cam_development
peverwhee Dec 22, 2024
3548dcf
update submodules
peverwhee Dec 22, 2024
8c33802
Revert "limit t_sfc to valid temperature range"
nusbaume Dec 22, 2024
b851c07
Update CICE tag to fix bad surface temperature values.
nusbaume Dec 22, 2024
726f965
Initial ChangeLog update.
nusbaume Dec 22, 2024
3068bad
minor mods to gw_drag
JulioTBacmeister Dec 23, 2024
c4a80f2
Merge tag 'cam6_4_048' into gw_devel_b00
JulioTBacmeister Dec 23, 2024
24e012d
ChangeLog start; code clean up; add ndep diags to reg test
fvitt Dec 26, 2024
82a3c9c
fix restart problem with nitrogen flux history fields
fvitt Dec 26, 2024
bba4e59
add addfld calls to cam7 phys
fvitt Dec 26, 2024
9066aee
units correction in diagnostics
fvitt Dec 26, 2024
d6e0240
remove eulerian options from namelist; start removing control logic
brian-eaton Dec 27, 2024
d60dbc2
update cime tag to fix restarts issue
Dec 27, 2024
5a422de
remove/fix old comments; remove control logic for EUL
brian-eaton Dec 27, 2024
97fd801
set fldptr_ndep to zero for no flux cases
fvitt Dec 28, 2024
31796b2
namelist fixes
fvitt Dec 28, 2024
97ffeb9
fix TR8.sh; update ChangeLog
brian-eaton Dec 30, 2024
614b24a
merge to cam6_4_048
brian-eaton Dec 30, 2024
e56d13f
Merge branch 'cam_development' into hplin/check_energy
jimmielin Dec 30, 2024
f9ee7ca
rm src and configuration for SPCAM
brian-eaton Dec 30, 2024
2d12f78
update cime
Dec 30, 2024
c3c9ed2
final changelog
peverwhee Dec 31, 2024
95cbd6d
Merge pull request #1163 from peverwhee/history-bugfixes
peverwhee Dec 31, 2024
bdb3b76
Update to head of atmos_phys with check_energy_fix_run arguments
jimmielin Dec 31, 2024
b98803a
Merge branch 'cam_development' into hplin/check_energy
jimmielin Dec 31, 2024
0881a22
Update to atmos_phys0_07_001
jimmielin Dec 31, 2024
9c4d5ca
remove namelist options for SPCAM
brian-eaton Dec 31, 2024
5719f87
merge to cam6_4_049
brian-eaton Dec 31, 2024
4ed8390
merge to cam6_4_049
brian-eaton Dec 31, 2024
8bf2946
remove src dependencies on SPCAM
brian-eaton Dec 31, 2024
b7b4c3c
Finalize ChangeLog for cam6_4_050.
jimmielin Dec 31, 2024
b4c6463
Merge pull request #1180 from jimmielin/hplin/check_energy
jimmielin Dec 31, 2024
4c48fcf
Merge remote-tracking branch 'upstream/cam_development' into clubb_in…
nusbaume Dec 31, 2024
88bf778
Add comments describing new vertical level variables.
nusbaume Dec 31, 2024
696aee1
merge to cam6_4_050
brian-eaton Jan 1, 2025
454ce0a
mods and tests for QPMT configuration
brian-eaton Jan 1, 2025
53ee68f
Merge branch 'cam_development' of https://github.com/ESCOMP/CAM into …
brian-eaton Jan 1, 2025
38a3091
update ChangeLog
brian-eaton Jan 1, 2025
b5c0bd7
Merge remote-tracking branch 'ESCOMP/cam_development' into aoa_output
fvitt Jan 2, 2025
244142f
ChangeLog draft
fvitt Jan 2, 2025
7e9ce4b
ChangeLog update
fvitt Jan 2, 2025
286df59
ChangeLog update
fvitt Jan 2, 2025
42e1896
Merge pull request #1198 from fvitt/aoa_output
fvitt Jan 2, 2025
189151b
code review changes
fvitt Jan 3, 2025
bcdd606
Merge remote-tracking branch 'upstream/cam_development' into clubb_in…
nusbaume Jan 3, 2025
529e386
mods to namelist defaults and testlist
brian-eaton Jan 3, 2025
0623736
Eliminate final whitespace which snuck in file
cacraigucar Jan 3, 2025
8582fd5
Fix bugs found with GNU regression tests.
nusbaume Jan 5, 2025
1b6ec5f
add new err test; update git-fleximod; update externals
peverwhee Jan 6, 2025
6f63133
Address reviewer comments
cacraigucar Jan 6, 2025
87cb006
Update ChangeLog.
nusbaume Jan 6, 2025
ab1e8c7
Merge pull request #1175 from huebleruwm/clubb_intr_gpuization
nusbaume Jan 6, 2025
068ebc6
update cime external
peverwhee Jan 6, 2025
f43794b
Merge remote-tracking branch 'ESCOMP/cam_development' into carma_base…
fvitt Jan 6, 2025
76ea3a4
update ChangeLog
fvitt Jan 7, 2025
56ccdb0
update ChangeLog
fvitt Jan 7, 2025
adaccfd
Merge pull request #1201 from fvitt/carma_base_tag
fvitt Jan 7, 2025
4fdca1e
Merge remote-tracking branch 'upstream/cam_development' into t_sfc_re…
nusbaume Jan 7, 2025
a5ed0a5
Update CICE tag to cesm3_cice6_6_0_6.
nusbaume Jan 7, 2025
9848f15
use sim_year to determine stream_ndep settings; remove deprecated nde…
fvitt Jan 8, 2025
e106d4f
update ChangeLog
fvitt Jan 9, 2025
5f21959
Finalize ChangeLog and update submodules from previous PRs.
nusbaume Jan 9, 2025
7a90325
Merge pull request #1211 from nusbaume/t_sfc_revert
nusbaume Jan 9, 2025
04f41af
added vorticity coupling from SE dycore to GW param
JulioTBacmeister Jan 9, 2025
b30e948
add sim_year valid values of 2010 and 1850-2015
fvitt Jan 9, 2025
55a30e3
update to cam6_4_054
brian-eaton Jan 10, 2025
392b0bf
Merge branch 'misc06' of https://github.com/brian-eaton/CAM into misc06
brian-eaton Jan 10, 2025
22e9efe
add QPLT and QPMT tests to prealpha category
brian-eaton Jan 10, 2025
27f78e8
update ChangeLog
brian-eaton Jan 13, 2025
7de26a3
Merge pull request #1203 from brian-eaton/misc06
brian-eaton Jan 13, 2025
f998687
Latest movmtn mods - vorticity source
JulioTBacmeister Jan 15, 2025
450312b
Add sim_year to geoschem use case files; ChangeLog updates
fvitt Jan 15, 2025
e63673e
Merge tag 'cam6_4_055' into gw_devel_b00
JulioTBacmeister Jan 15, 2025
e402122
call endrun for values < -1.e-10
fvitt Jan 15, 2025
27426fd
change clubb openacc directives to passpass GPU tests
sjsprecious Jan 15, 2025
8811977
reminder for a new ccs_config tag
sjsprecious Jan 15, 2025
305c53a
check neg values only if DEBUG
fvitt Jan 15, 2025
56e2c02
merge to head of ESCOMP/cam_development
fvitt Jan 15, 2025
c819813
adjust sim_years for co2_cycle file defaults
fvitt Jan 16, 2025
fa37cb5
ChangeLog update
fvitt Jan 17, 2025
4328f4e
ChangeLog update
fvitt Jan 17, 2025
ea101b3
Merge pull request #1216 from fvitt/nitro_dep_fluxes
fvitt Jan 17, 2025
e30e10d
merge to cam6_4_056
brian-eaton Jan 17, 2025
7f5fb23
update fire_emis_factors_file
brian-eaton Jan 17, 2025
94564df
remove bld/scripts/remapfv2eul.ncl
brian-eaton Jan 17, 2025
b3a012a
update ccs_config tag for clubb gpu fix
sjsprecious Jan 21, 2025
7495bf5
add Gunther's suggestion
sjsprecious Jan 21, 2025
132a768
remove references to EUL dycore from nudging tools
brian-eaton Jan 22, 2025
4fb29df
mods to gw movmtn infrastructure
JulioTBacmeister Jan 22, 2025
575c6ad
Merge remote-tracking branch 'upstream/cam_development' into ssi-scale
nusbaume Jan 22, 2025
f3ec18b
Update ChangeLog with Derecho test results.
nusbaume Jan 22, 2025
25bbadc
Fix spacing in ChangeLog.
nusbaume Jan 22, 2025
e900c71
Use Fotran unit handling
cacraigucar Jan 22, 2025
9947b25
Merge remote-tracking branch 'refs/remotes/origin/cam_zm_cleanup4' in…
cacraigucar Jan 22, 2025
c08de27
issue 1212 bug fix (cloud frac ice+liquid)
PeterHjortLauritzen Jan 23, 2025
bc4d5e7
fix Exner bug in CLUBB interface and change CLUBB namelist
PeterHjortLauritzen Jan 23, 2025
c6b96bb
update changelog
PeterHjortLauritzen Jan 23, 2025
3d57be8
fix heating depth bug
PeterHjortLauritzen Jan 23, 2025
0411085
Remove commented out line
cacraigucar Jan 23, 2025
0683024
update Changelog
PeterHjortLauritzen Jan 23, 2025
f6dd61e
conserve dry mixing ratios in gw and vertical diffusion code
PeterHjortLauritzen Jan 23, 2025
c624dc1
update Changelog
PeterHjortLauritzen Jan 23, 2025
a03a186
fix English
PeterHjortLauritzen Jan 23, 2025
6c905d0
update changlog
PeterHjortLauritzen Jan 23, 2025
2e7db43
added movtn_source to nml
JulioTBacmeister Jan 23, 2025
fe947be
Merge tag 'cam6_4_056' into cam_zm_cleanup4
cacraigucar Jan 24, 2025
1825587
adding more namelist params for movmtn
JulioTBacmeister Jan 28, 2025
ea056d2
first stage of clean up for PR
JulioTBacmeister Jan 29, 2025
1180831
Update atmos_phys tag
cacraigucar Jan 29, 2025
552bd23
Finalize ChangeLog.
nusbaume Jan 29, 2025
9ee01d5
Merge pull request #1194 from brian-eaton/ssi-scale
nusbaume Jan 29, 2025
a0e078c
Switch to correct tape for tphysac/tphysbc snapshot
jimmielin Jan 27, 2025
5f7ac9c
Remove comments and move check for use_gw_movmtn_pbl using the SE dyc…
cacraigucar Jan 29, 2025
88084c5
fix gnu compilation error
cacraigucar Jan 30, 2025
f9aae40
Merge remote-tracking branch 'upstream/cam_development' into issue122…
nusbaume Jan 31, 2025
4f8b8f3
Fill-out initial ChangeLog entry.
nusbaume Jan 31, 2025
89b3664
cleanup
cacraigucar Jan 31, 2025
8f3b0b3
Add derecho test results to ChangeLog.
nusbaume Jan 31, 2025
65baa71
update topo file
cacraigucar Jan 31, 2025
4da5455
temporary fix for topo
cacraigucar Jan 31, 2025
dd33c5b
Workaround for one more missing variable in topo files
cacraigucar Feb 1, 2025
f7f3731
Update ChangeLog with Izumi test results.
nusbaume Feb 4, 2025
014626a
Merge pull request #1231 from PeterHjortLauritzen/issue1222_1208_club…
nusbaume Feb 4, 2025
0d6d47a
Merge tag 'cam6_4_058' into issue1212_nucleate_ice_cam_bugfix
cacraigucar Feb 4, 2025
33c62b9
preliminary Changelog
cacraigucar Feb 4, 2025
a69d053
Fix failing restart test
cacraigucar Feb 4, 2025
0436320
Add MPAS pertlim test (from Patrick Callaghan).
nusbaume Feb 4, 2025
668c9a3
Address first round of review comments
cacraigucar Feb 4, 2025
2c4796d
Fix typos
cacraigucar Feb 4, 2025
6e90910
Update ChangeLog
cacraigucar Feb 4, 2025
b3ef374
Merge pull request #1230 from PeterHjortLauritzen/issue1212_nucleate_…
cacraigucar Feb 4, 2025
d3285d7
Merge tag 'cam6_4_059' into issue1233_preserve_constant_dry_mixingrat…
cacraigucar Feb 4, 2025
9f93b9e
Fix compiler issue
cacraigucar Feb 4, 2025
0644bcb
Update ChangeLog for cam6_4_060
cacraigucar Feb 5, 2025
4c27612
Merge pull request #1234 from PeterHjortLauritzen/issue1233_preserve_…
cacraigucar Feb 5, 2025
6afb521
Merge tag 'cam6_4_060' into issue1229_heating_depth_bugfix
cacraigucar Feb 5, 2025
85efadc
Change scope of variable from inout to in
cacraigucar Feb 5, 2025
c67f137
Address final reviewer comments
cacraigucar Feb 5, 2025
2f2991d
Fix bug for WACCM tests
cacraigucar Feb 6, 2025
527f323
Update ChangeLog for cam6_4_061
cacraigucar Feb 6, 2025
5a1fbc8
Merge pull request #1232 from PeterHjortLauritzen/issue1229_heating_d…
cacraigucar Feb 6, 2025
27d456d
Merge tag 'cam6_4_061' into gw_devel_b00
cacraigucar Feb 6, 2025
56c909d
Update ChangeLog for cam6_4_062
cacraigucar Feb 7, 2025
834379d
Merge pull request #1117 from JulioTBacmeister/gw_devel_b00
cacraigucar Feb 7, 2025
de302e6
Update namelist settings
cacraigucar Feb 7, 2025
a1b5274
Address review comments
cacraigucar Feb 7, 2025
2f2d047
Change all dust_emis_fact which are cam7 to new default
cacraigucar Feb 7, 2025
0a7aac5
Update ChangeLog for cam6_4_063
cacraigucar Feb 10, 2025
b90429e
Merge pull request #1252 from cacraigucar/cam_beta06_namelist
cacraigucar Feb 10, 2025
f2155a5
Merge remote-tracking branch 'upstream/cam_development' into fix_brok…
nusbaume Feb 10, 2025
85b14f3
remove unnecessary directory for configure to use
cacraigucar Feb 10, 2025
3ab5a5d
Address reviewer comments
cacraigucar Feb 10, 2025
2bf7954
Initial ChangeLog entry, including Derecho test results.
nusbaume Feb 10, 2025
a56fc0b
merge to head of cam development
peverwhee Feb 10, 2025
94072d1
Update comments
cacraigucar Feb 10, 2025
cbdaefd
Finalize ChangeLog with Izumi test results.
nusbaume Feb 10, 2025
6eb3046
Merge pull request #1226 from sjsprecious/fix_broken_gpu_tests
nusbaume Feb 10, 2025
1e83f0b
update externals; add CUPiD
peverwhee Feb 10, 2025
df46a40
fix formatting
peverwhee Feb 10, 2025
1034b26
Merge tag 'cam6_4_064' into cam_zm_cleanup4
cacraigucar Feb 10, 2025
91c2890
merge to ehad
peverwhee Feb 10, 2025
79aee2f
Updated ChangeLog for cam6_4_065
cacraigucar Feb 11, 2025
3eb2112
Merge pull request #1218 from cacraigucar/cam_zm_cleanup4
cacraigucar Feb 11, 2025
0972a9e
comments added
fvitt Feb 13, 2025
a2bd754
Merge remote-tracking branch 'ESCOMP/cam_development' into negwetdep
fvitt Feb 13, 2025
2ec28cc
ChangeLog draft
fvitt Feb 14, 2025
86a16a3
update ChangeLog
fvitt Feb 14, 2025
1ba445b
Merge pull request #1228 from fvitt/negwetdep
fvitt Feb 14, 2025
3da32d4
update to cam6_4_065
brian-eaton Feb 14, 2025
d4821a1
remove old ReleaseNotes file
brian-eaton Feb 14, 2025
504ab1c
update to cam6_4_066
brian-eaton Feb 14, 2025
6ebf2f2
needed to update share beyond share1.1.7
jedwards4b Feb 14, 2025
b8838e7
Merge remote-tracking branch 'ESCOMP/cam_development' into update-ext…
peverwhee Feb 14, 2025
6795521
Merge remote-tracking branch 'jedwards/fix_mpas_abort_interface' into…
peverwhee Feb 14, 2025
0329450
update share external
peverwhee Feb 14, 2025
db2371f
update ChangeLog
brian-eaton Feb 15, 2025
a01a051
Merge pull request #1217 from brian-eaton/rm-spcam
brian-eaton Feb 15, 2025
15472a1
Merge remote-tracking branch 'ESCOMP/cam_development' into update-ext…
peverwhee Feb 18, 2025
9eee34e
update fleximod workflow to match CESM
peverwhee Feb 18, 2025
8262c03
update to cam6_4_067
brian-eaton Feb 19, 2025
f579f58
fix TR8.sh and missing _r8
brian-eaton Feb 19, 2025
d25822b
update ChangeLog
brian-eaton Feb 19, 2025
ce3beab
Merge pull request #1215 from brian-eaton/rm-eul
brian-eaton Feb 19, 2025
839c106
Merge remote-tracking branch 'ESCOMP/cam_development' into update-ext…
peverwhee Feb 20, 2025
ac833d2
finalize changelog
peverwhee Feb 20, 2025
25ede0a
Merge pull request #1219 from peverwhee/update-externals
peverwhee Feb 20, 2025
2f913e8
Merge remote-tracking branch 'upstream/cam_development' into maps_per…
nusbaume Feb 21, 2025
b8aef73
Add ChangeLog entry, including Derecho test results.
nusbaume Feb 21, 2025
4c04d00
Update ChangeLog with Izumi test results.
nusbaume Feb 21, 2025
e8de158
Merge pull request #1114 from patcal/maps_pertlim_fix
nusbaume Feb 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
254 changes: 31 additions & 223 deletions .github/scripts/branch_pr_issue_closer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

import re
import sys
import subprocess
import shlex
import argparse

from github import Github
Expand All @@ -31,42 +29,6 @@
#HELPER FUNCTIONS
#################

#+++++++++++++++++++++++++++++++++++++++++
#Curl command needed to move project cards
#+++++++++++++++++++++++++++++++++++++++++

def project_card_move(oa_token, column_id, card_id):

"""
Currently pyGithub doesn't contain the methods required
to move project cards from one column to another, so
the unix curl command must be called directly, which is
what this function does.

The specific command-line call made is:

curl -H "Authorization: token OA_token" -H \
"Accept: application/vnd.github.inertia-preview+json" \
-X POST -d '{"position":"top", "column_id":<column_id>}' \
https://api.github.com/projects/columns/cards/<card_id>/moves

"""

#create required argument strings from inputs:
github_oa_header = ''' "Authorization: token {0}" '''.format(oa_token)
github_url_str = '''https://api.github.com/projects/columns/cards/{0}/moves'''.format(card_id)
json_post_inputs = ''' '{{"position":"top", "column_id":{}}}' '''.format(column_id)

#Create curl command line string:
curl_cmdline = '''curl -H '''+github_oa_header+''' -H "Accept: application/vnd.github.inertia-preview+json" -X POST -d '''+\
json_post_inputs+''' '''+github_url_str

#Split command line string into argument list:
curl_arg_list = shlex.split(curl_cmdline)

#Run command using subprocess:
subprocess.run(curl_arg_list, check=True)

#++++++++++++++++++++++++++++++
#Input Argument parser function
#++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -101,7 +63,7 @@ def end_script(msg):
"""
Prints message to screen, and then exits script.
"""
print("\n{}\n".format(msg))
print(f"\n{msg}\n")
print("Issue closing check has completed successfully.")
sys.exit(0)

Expand Down Expand Up @@ -137,11 +99,10 @@ def _main_prog():

ghub = Github(token)

#++++++++++++++++++++
#+++++++++++++++++++++
#Open ESCOMP/CAM repo
#++++++++++++++++++++
#+++++++++++++++++++++

#Official CAM repo:
cam_repo = ghub.get_repo("ESCOMP/CAM")

#+++++++++++++++++++++++++++++
Expand All @@ -162,6 +123,9 @@ def _main_prog():
#Search for merge text, starting at beginning of message:
commit_msg_match = pr_merge_pattern.match(commit_message)

#Initialize variables:
pr_num = 0

#Check if match exists:
if commit_msg_match is not None:
#If it does then pull out text immediately after message:
Expand All @@ -174,7 +138,7 @@ def _main_prog():
first_word = post_msg_word_list[0]

#Print merged pr number to screen:
print("Merged PR: {}".format(first_word))
print(f"Merged PR: {first_word}")

try:
#Try assuming the word is just a number:
Expand Down Expand Up @@ -251,27 +215,28 @@ def _main_prog():
pr_msg_lower = merged_pull.body.lower()

#search for at least one keyword:
word_matches = []
if keyword_pattern.search(pr_msg_lower) is not None:
#If at least one keyword is found, then determine location of every keyword instance:
word_matches = keyword_pattern.finditer(pr_msg_lower)
else:
endmsg = "Pull request was merged without using any of the keywords. Thus there are no issues to close."
end_script(endmsg)

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Extract issue and PR numbers associated with found keywords in merged PR message
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Extract issue and PR numbers associated with found keywords in merged PR message
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#create issue pattern ("the number symbol {#} + a number"),
#which ends with either a space, a comma, a period, or
#the end of the string itself:
issue_pattern = re.compile(r'#[0-9]+(\s|,|$)|.')

#Create new "close" issues list:
close_issues = list()
close_issues = []

#Create new "closed" PR list:
close_pulls = list()
close_pulls = []

#Search text right after keywords for possible issue numbers:
for match in word_matches:
Expand Down Expand Up @@ -299,13 +264,13 @@ def _main_prog():
#so set the issue number to one that will never be found:
issue_num = -9999

#Check that number is actually for an issue (as opposed to a PR):
if issue_num in open_issues:
#Add issue number to "close issues" list:
close_issues.append(issue_num)
elif issue_num in open_pulls:
#If in fact a PR, then add to PR list:
#Check if number is actually for a PR (as opposed to an issue):
if issue_num in open_pulls:
#Add PR number to "close pulls" list:
close_pulls.append(issue_num)
elif issue_num in open_issues:
#If in fact an issue, then add to "close issues" list:
close_issues.append(issue_num)

#If no issue numbers are present after any of the keywords, then exit script:
if not close_issues and not close_pulls:
Expand All @@ -322,183 +287,26 @@ def _main_prog():
print("PRs referenced by the merged PR: "+", ".join(\
str(pull) for pull in close_pulls))

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Determine name of project associated with merged Pull Request
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#Pull-out all projects from repo:
projects = cam_repo.get_projects()

#Initalize modified project name:
proj_mod_name = None

#Loop over all repo projects:
for project in projects:
#Pull-out columns from each project:
proj_columns = project.get_columns()

#Loop over columns:
for column in proj_columns:

#check if column name is "Completed Tags"
if column.name == "Completed tags":
#If so, then extract cards:
cards = column.get_cards()

#Loop over cards:
for card in cards:
#Extract card content:
card_content = card.get_content()

#Next, check if card number exists and matches merged PR number:
if card_content is not None and card_content.number == pr_num:
#If so, and if Project name is None, then set string:
if proj_mod_name is None:
proj_mod_name = project.name
#Break out of card loop:
break

#If already set, then somehow merged PR is in two different projects,
#which is not what this script is expecting, so just exit:
endmsg = "Merged Pull Request found in two different projects, so script will do nothing."
end_script(endmsg)

#Print project name associated with merged PR:
print("merged PR project name: {}".format(proj_mod_name))

#++++++++++++++++++++++++++++++++++++++++
#Extract repo project "To do" card issues
#++++++++++++++++++++++++++++++++++++++++

#Initalize issue counting dictionary:
proj_issues_count = dict()

#Initalize issue id to project card id dictionary:
proj_issue_card_ids = dict()

#Initialize list for issues that have already been closed:
already_closed_issues = list()

#Loop over all repo projects:
for project in projects:

#Next, pull-out columns from each project:
proj_columns = project.get_columns()

#Loop over columns:
for column in proj_columns:
#Check if column name is "To do"
if column.name == "To do":
#If so, then extract cards:
cards = column.get_cards()

#Loop over cards:
for card in cards:
#Extract card content:
card_content = card.get_content()

#Next, check if card issue number matches any of the "close" issue numbers from the PR:
if card_content is not None and card_content.number in close_issues:

#If so, then check if issue number is already in proj_issues_count:
if card_content.number in proj_issues_count:
#Add one to project issue counter:
proj_issues_count[card_content.number] += 1

#Also add issue id and card id to id dictionary used for card move, if in relevant project:
if project.name == proj_mod_name:
proj_issue_card_ids[card_content.number] = card.id

else:
#If not, then append to project issues count dictionary:
proj_issues_count[card_content.number] = 1

#Also add issue id and card id to id dictionary used for card move, if in relevant project:
if project.name == proj_mod_name:
proj_issue_card_ids[card_content.number] = card.id

#Otherwise, check if column name matches "closed issues" column:
elif column.name == "closed issues" and project.name == proj_mod_name:
#Save column id:
column_target_id = column.id

#Extract cards:
closed_cards = column.get_cards()

#Loop over cards:
for closed_card in closed_cards:
#Extract card content:
closed_card_content = closed_card.get_content()

#Check if card issue number matches any of the "close" issue numbers from the PR:
if closed_card_content is not None and closed_card_content.number in close_issues:
#If issue number matches, then it likely means the same
#commit message or issue number reference was used in multiple
#pushes to the same repo (e.g., for a PR and then a tag). Thus
#the issue should be marked as "already closed":
already_closed_issues.append(closed_card_content.number)

#Remove all issues from issue dictionary that are "already closed":
for already_closed_issue_num in already_closed_issues:
if already_closed_issue_num in proj_issues_count:
proj_issues_count.pop(already_closed_issue_num)

#If no project cards are found that match the issue, then exit script:
if not proj_issues_count:
endmsg = "No project cards match the issue being closed, so the script will do nothing."
end_script(endmsg)
#++++++++++++++++++++++++++++++++++++++++++++++
#Attempt to close all referenced issues and PRs
#++++++++++++++++++++++++++++++++++++++++++++++

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Check if the number of "To-do" project cards matches the total number
#of merged PRs for each 'close' issue.
#
#Then, close all issues for which project cards equals merged PRs
#
#If not, then simply move the project card to the relevant project's
#"closed issues" column.
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#Loop over project issues and counts that have been "closed" by merged PR:
for issue_num, issue_count in proj_issues_count.items():

#If issue count is just one, then close issue:
if issue_count == 1:
#Extract github issue object:
cam_issue = cam_repo.get_issue(number=issue_num)
#Close issue:
cam_issue.edit(state='closed')
print("Issue #{} has been closed.".format(issue_num))
else:
#Extract card id from id dictionary:
if issue_num in proj_issue_card_ids:
card_id = proj_issue_card_ids[issue_num]
else:
#If issue isn't in dictionary, then it means the issue
#number was never found in the "To do" column, which
#likely means the user either referenced the wrong
#issue number, or the issue was never assigned to the
#project. Warn user and then exit with a non-zero
#error so that the Action fails:
endmsg = 'Issue #{} was not found in the "To Do" Column of the "{}" project.\n' \
'Either the wrong issue number was referenced, or the issue was never ' \
'attached to the project.'.format(issue_num, proj_mod_name)
print(endmsg)
sys.exit(1)

#Then move the card on the relevant project page to the "closed issues" column:
project_card_move(token.strip(), column_target_id, card_id)

#++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Finally, close all Pull Requests in "close_pulls" list:
#++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Loop over referenced issues:
for issue_num in close_issues:
#Extract github issue object:
cam_issue = cam_repo.get_issue(number=issue_num)
#Close issue:
cam_issue.edit(state='closed')
print(f"Issue #{issue_num} has been closed.")

#Loop over referenced PRs:
for pull_num in close_pulls:
#Extract Pull request object:
cam_pull = cam_repo.get_pull(number=pull_num)

#Close Pull Request:
cam_pull.edit(state='closed')
print("Pull Request #{} has been closed.".format(pull_num))
print(f"Pull Request #{pull_num} has been closed.")

#++++++++++
#End script
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/branch_push_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
runs-on: ubuntu-latest
steps:
# acquire github action routines
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# acquire specific version of python
- name: Set up Python 3.6
- name: Set up Python 3.10
if: github.repository == 'ESCOMP/CAM' #Only run on main repo
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.6' # Semantic version range syntax or exact version of a Python version
python-version: '3.10' # Semantic version range syntax or exact version of a Python version
# install required python packages
- name: Install dependencies
if: github.repository == 'ESCOMP/CAM' #Only run on main repo
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/fleximod_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on: pull_request

jobs:
fleximod-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# oldest supported and latest supported
python-version: ["3.7", "3.x"]
steps:
- id: checkout-CESM
uses: actions/checkout@v4
- id: run-fleximod
run: |
$GITHUB_WORKSPACE/bin/git-fleximod update
echo
echo "Update complete, checking status"
echo
$GITHUB_WORKSPACE/bin/git-fleximod test
- id: check-cleanliness
run: |
echo
echo "Checking if git fleximod matches expected externals"
echo
git diff --exit-code
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
Loading