From 31975f3da29eef541a2c7b2b04a40ff95425148f Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 26 Jun 2024 09:38:49 -0600 Subject: [PATCH 01/56] working on cesm3_0_alpha02a --- .gitmodules | 7 ------- ccs_config | 2 +- cime | 2 +- .../testmods_dirs/allactive/defaultio/user_nl_mosart | 6 +++--- components/cdeps | 2 +- components/cice | 2 +- components/cism | 2 +- components/cmeps | 2 +- components/mizuroute | 2 +- components/mosart | 2 +- components/rtm | 2 +- libraries/mct | 1 - share | 2 +- 13 files changed, 13 insertions(+), 21 deletions(-) delete mode 160000 libraries/mct diff --git a/.gitmodules b/.gitmodules index b8db1cb844..a6d53adc52 100644 --- a/.gitmodules +++ b/.gitmodules @@ -48,13 +48,6 @@ fxtag = cime6.0.246 fxrequired = ToplevelRequired -[submodule "mct"] - path = libraries/mct - url = https://github.com/MCSclimate/MCT - fxDONOTUSEurl = https://github.com/MCSclimate/MCT - fxrequired = ToplevelRequired - fxtag = MCT_2.11.0 - [submodule "mpi-serial"] path = libraries/mpi-serial url = https://github.com/ESMCI/mpi-serial diff --git a/ccs_config b/ccs_config index 797acd7014..1fe4ffca80 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 797acd7014f10c8e46e50403cbf0fdf52230a2b5 +Subproject commit 1fe4ffca802721cd4967ed36bad78c9f7d615a93 diff --git a/cime b/cime index 422ddaa770..e843f3cbbc 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit 422ddaa770a3cea6e83a60c9700ebce77acaceed +Subproject commit e843f3cbbc18c76a17323349285a9c0438f094e7 diff --git a/cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart b/cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart index ecd3d1730e..e0e98e7d7e 100644 --- a/cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart +++ b/cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart @@ -6,8 +6,8 @@ ! NOTE: if the xml variable RTM_MODE in env_run.xml is set to 'NULL', then ! then rtm will set rtm_present to .false. - and will ignore everything else !---------------------------------------------------------------------------------- -rtmhist_ndens = 1 -rtmhist_nhtfrq =-24 -rtmhist_mfilt = 1 +ndens = 1 +nhtfrq =-24 +mfilt = 1 diff --git a/components/cdeps b/components/cdeps index 7a522c828c..f0eceabfe8 160000 --- a/components/cdeps +++ b/components/cdeps @@ -1 +1 @@ -Subproject commit 7a522c828c32dc35777992653f281ec525509c4a +Subproject commit f0eceabfe85390b832fbcfe0646a0ad58a283c07 diff --git a/components/cice b/components/cice index 58d73e91e5..bdf6ea04d6 160000 --- a/components/cice +++ b/components/cice @@ -1 +1 @@ -Subproject commit 58d73e91e542177b0d80d2f8d886176eb817893c +Subproject commit bdf6ea04d6133434fcaa4de5336de106f01290d0 diff --git a/components/cism b/components/cism index c05dd5c4fc..34339777af 160000 --- a/components/cism +++ b/components/cism @@ -1 +1 @@ -Subproject commit c05dd5c4fc85327e76523aaea9cfe1e388748928 +Subproject commit 34339777afa7b810fd4822fce1039826668b33e4 diff --git a/components/cmeps b/components/cmeps index 6384ff4e4a..1dd90c7458 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 6384ff4e4a6bc82a678f9419a43ffbd5d53ac209 +Subproject commit 1dd90c745897fdd8cd94769495a30f390749b602 diff --git a/components/mizuroute b/components/mizuroute index c55bd1ab74..81c720c7ee 160000 --- a/components/mizuroute +++ b/components/mizuroute @@ -1 +1 @@ -Subproject commit c55bd1ab746734ea77a00606dde895ab034edf1a +Subproject commit 81c720c7ee51f9c69f2934f696078c42f4493565 diff --git a/components/mosart b/components/mosart index abd2bc4bc7..e2ffe00004 160000 --- a/components/mosart +++ b/components/mosart @@ -1 +1 @@ -Subproject commit abd2bc4bc7ee789aba2eb46c834c3d9ee51428b1 +Subproject commit e2ffe00004cc416cfc8bcfae2a949474075c1d1f diff --git a/components/rtm b/components/rtm index 2d6a3c7b22..88503adbc2 160000 --- a/components/rtm +++ b/components/rtm @@ -1 +1 @@ -Subproject commit 2d6a3c7b224abcd9af9b8ebb1ca939c5b9e59681 +Subproject commit 88503adbc275fb2ccbb6b598e460deaeb140e515 diff --git a/libraries/mct b/libraries/mct deleted file mode 160000 index 82b0071e69..0000000000 --- a/libraries/mct +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 82b0071e69d14330b75d23b0bc68543ebea9aadc diff --git a/share b/share index 4b9dc4871a..66aa3c90d4 160000 --- a/share +++ b/share @@ -1 +1 @@ -Subproject commit 4b9dc4871a259f00f35bb47708d876cb7dcdf75c +Subproject commit 66aa3c90d4200e01c2ccdd9583754ae0f304c32e From 0c3d68371e5a5e1cac6949fbee94713264a97bc5 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 26 Jun 2024 13:42:19 -0600 Subject: [PATCH 02/56] dependabot changes and issue #48 --- git_fleximod/git_fleximod.py | 2 +- poetry.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index e1b8f484a5..ed24c4e753 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -547,7 +547,7 @@ def submodules_test(gitmodules, root_dir): # and that sparse checkout files exist for name in gitmodules.sections(): url = gitmodules.get(name, "url") - fxurl = gitmodules.get(name, "fxDONOTMODIFYurl") + fxurl = gitmodules.get(name, "fxDONOTUSEurl") fxsparse = gitmodules.get(name, "fxsparse") path = gitmodules.get(name, "path") fxurl = fxurl[:-4] if fxurl.endswith(".git") else fxurl diff --git a/poetry.lock b/poetry.lock index b59ed3942c..4d36881b89 100644 --- a/poetry.lock +++ b/poetry.lock @@ -242,7 +242,7 @@ test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre [[package]] name = "idna" -version = "3.6" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" @@ -294,7 +294,7 @@ files = [ [[package]] name = "jinja2" -version = "3.1.3" +version = "3.1.4" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" @@ -465,7 +465,7 @@ files = [ [[package]] name = "requests" -version = "2.31.0" +version = "2.32.0" description = "Python HTTP for Humans." optional = false python-versions = ">=3.7" @@ -643,7 +643,7 @@ files = [ [[package]] name = "urllib3" -version = "2.2.0" +version = "2.2.2" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" From 46043f0104254dffd1b1da34c57ad940124e40d0 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 26 Jun 2024 13:46:07 -0600 Subject: [PATCH 03/56] add code of conduct (issue #35) --- CODE_OF_CONDUCT.md | 107 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..84f2925bba --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,107 @@ +# Contributor Code of Conduct +_The Contributor Code of Conduct is for participants in our software projects and community._ + +## Our Pledge +We, as contributors, creators, stewards, and maintainers (participants), of **git-fleximod** pledge to make participation in +our software, system or hardware project and community a safe, productive, welcoming and inclusive experience for everyone. +All participants are required to abide by this Code of Conduct. +This includes respectful treatment of everyone regardless of age, body size, disability, ethnicity, gender identity or expression, +level of experience, nationality, political affiliation, veteran status, pregnancy, genetic information, physical appearance, race, +religion, or sexual orientation, as well as any other characteristic protected under applicable US federal or state law. + +## Our Standards +Examples of behaviors that contribute to a positive environment include: + +* All participants are treated with respect and consideration, valuing a diversity of views and opinions +* Be considerate, respectful, and collaborative +* Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism +* Acknowledging the contributions of others +* Avoid personal attacks directed toward other participants +* Be mindful of your surroundings and of your fellow participants +* Alert UCAR staff and suppliers/vendors if you notice a dangerous situation or someone in distress +* Respect the rules and policies of the project and venue + +Examples of unacceptable behavior include, but are not limited to: + +* Harassment, intimidation, or discrimination in any form +* Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested +* Unwelcome sexual attention or advances +* Personal attacks directed at other guests, members, participants, etc. +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Alarming, intimidating, threatening, or hostile comments or conduct +* Inappropriate use of nudity and/or sexual images +* Threatening or stalking anyone, including a participant +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Scope +This Code of Conduct applies to all spaces managed by the Project whether they be physical, online or face-to-face. +This includes project code, code repository, associated web pages, documentation, mailing lists, project websites and wiki pages, +issue tracker, meetings, telecons, events, project social media accounts, and any other forums created by the project team which the +community uses for communication. +In addition, violations of this Code of Conduct outside these spaces may affect a person's ability to participate within them. +Representation of a project may be further defined and clarified by project maintainers. + +## Community Responsibilities +Everyone in the community is empowered to respond to people who are showing unacceptable behavior. +They can talk to them privately or publicly. +Anyone requested to stop unacceptable behavior is expected to comply immediately. +If the behavior continues concerns may be brought to the project administrators or to any other party listed in the +[Reporting](#reporting) section below. + +## Project Administrator Responsibilities +Project administrators are responsible for clarifying the standards of acceptable behavior and are encouraged to model appropriate +behavior and provide support when people in the community point out inappropriate behavior. +Project administrator(s) are normally the ones that would be tasked to carry out the actions in the [Consequences](#consequences) +section below. + +Project administrators are also expected to keep this Code of Conduct updated with the main one housed at UCAR, as listed below in +the [Attribution](#attribution) section. + +## Reporting +Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action as +outlined in the [Consequences](#consequences) section below. +However, making a report to a project administrator is not considered an 'official report' to UCAR. + +Instances of unacceptable behavior may also be reported directly to UCAR pursuant to [UCAR's Harassment Reporting and Complaint +Procedure](https://www2.fin.ucar.edu/procedures/hr/harassment-reporting-and-complaint-procedure), or anonymously through [UCAR's +EthicsPoint Hotline](https://www2.fin.ucar.edu/ethics/anonymous-reporting). + +Complaints received by UCAR will be handled pursuant to the procedures outlined in UCAR's Harassment Reporting and Complaint +Procedure. +Complaints to UCAR will be held as confidential as practicable under the circumstances, and retaliation against a person who +initiates a complaint or an inquiry about inappropriate behavior will not be tolerated. + +Any Contributor can use these reporting methods even if they are not directly affiliated with UCAR. +The Frequently Asked Questions (FAQ) page for reporting is [here](https://www2.fin.ucar.edu/procedures/hr/reporting-faqs). + +## Consequences +Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the +circumstances. +Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits, email, issues, and +other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently any contributor for other +behaviors that are deemed inappropriate, threatening, offensive, or harmful. +Project administrators also have the right to report violations to UCAR HR and/or UCAR's Office of Diversity, Equity and Inclusion +(ODEI), as well as a participant's home institution and/or law enforcement. +In the event an incident is reported to UCAR, UCAR will follow its Harassment Reporting and Complaint Procedure. + +## Process for Changes +All UCAR managed projects are required to adopt this Contributor Code of Conduct. +Adoption is assumed even if not expressly stated in the repository. +Projects should fill in sections where prompted with project-specific information, including, project name and adoption date. + +Projects that adopt this Code of Conduct need to stay up to date with UCAR's Contributor Code of Conduct, linked with a DOI in the +[Attribution](#attribution) section below. +Projects can make limited substantive changes to the Code of Conduct, however, the changes must be limited in scope and may not +contradict the UCAR Contributor Code of Conduct. + +## Attribution +This Code of Conduct was originally adapted from the [Contributor Covenant](http://contributor-covenant.org/version/1/4), version +1.4. +We then aligned it with the UCAR Participant Code of Conduct, which also borrows from the American Geophysical Union (AGU) Code of +Conduct. +The UCAR Participant Code of Conduct applies to both UCAR employees as well as participants in activities run by UCAR. +The original version of this for all software projects that have strong management from UCAR or UCAR staff is available on the UCAR +website at https://doi.org/10.5065/6w2c-a132. +The date that it was adopted by this project was **Feb/13/2018**. +When responding to complaints, UCAR HR and ODEI will do so based on the latest published version. +Therefore, any project-specific changes should follow the [Process for Changes](#process-for-changes) section above. From 31ce71bf80dd69823ca501d6902eb080d747cebb Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 26 Jun 2024 13:53:28 -0600 Subject: [PATCH 04/56] use poetry update to update poetry.lock file --- poetry.lock | 110 ++++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4d36881b89..3a74effcd1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -13,13 +13,13 @@ files = [ [[package]] name = "babel" -version = "2.14.0" +version = "2.15.0" description = "Internationalization utilities" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Babel-2.14.0-py3-none-any.whl", hash = "sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287"}, - {file = "Babel-2.14.0.tar.gz", hash = "sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363"}, + {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, + {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, ] [package.dependencies] @@ -30,13 +30,13 @@ dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.6.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, + {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, ] [[package]] @@ -162,13 +162,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [package.extras] @@ -225,20 +225,21 @@ smmap = ">=3.0.1,<6" [[package]] name = "gitpython" -version = "3.1.41" +version = "3.1.43" description = "GitPython is a Python library used to interact with Git repositories" optional = false python-versions = ">=3.7" files = [ - {file = "GitPython-3.1.41-py3-none-any.whl", hash = "sha256:c36b6634d069b3f719610175020a9aed919421c87552185b085e04fbbdb10b7c"}, - {file = "GitPython-3.1.41.tar.gz", hash = "sha256:ed66e624884f76df22c8e16066d567aaa5a37d5b5fa19db2c6df6f7156db9048"}, + {file = "GitPython-3.1.43-py3-none-any.whl", hash = "sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff"}, + {file = "GitPython-3.1.43.tar.gz", hash = "sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c"}, ] [package.dependencies] gitdb = ">=4.0.1,<5" [package.extras] -test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "sumtypes"] +doc = ["sphinx (==4.3.2)", "sphinx-autodoc-typehints", "sphinx-rtd-theme", "sphinxcontrib-applehelp (>=1.0.2,<=1.0.4)", "sphinxcontrib-devhelp (==1.0.2)", "sphinxcontrib-htmlhelp (>=2.0.0,<=2.0.1)", "sphinxcontrib-qthelp (==1.0.3)", "sphinxcontrib-serializinghtml (==1.1.5)"] +test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions"] [[package]] name = "idna" @@ -247,8 +248,8 @@ description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] @@ -264,22 +265,22 @@ files = [ [[package]] name = "importlib-metadata" -version = "7.0.1" +version = "8.0.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-7.0.1-py3-none-any.whl", hash = "sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e"}, - {file = "importlib_metadata-7.0.1.tar.gz", hash = "sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc"}, + {file = "importlib_metadata-8.0.0-py3-none-any.whl", hash = "sha256:15584cf2b1bf449d98ff8a6ff1abef57bf20f3ac6454f431736cd3e660921b2f"}, + {file = "importlib_metadata-8.0.0.tar.gz", hash = "sha256:188bd24e4c346d3f0a933f275c2fec67050326a856b9a359881d7c2a697e8812"}, ] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] +test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] [[package]] name = "iniconfig" @@ -299,8 +300,8 @@ description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, ] [package.dependencies] @@ -380,24 +381,24 @@ files = [ [[package]] name = "packaging" -version = "23.2" +version = "24.1" description = "Core utilities for Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] [[package]] name = "pluggy" -version = "1.4.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -406,39 +407,38 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pyfakefs" -version = "5.3.5" +version = "5.5.0" description = "pyfakefs implements a fake file system that mocks the Python file system modules." optional = false python-versions = ">=3.7" files = [ - {file = "pyfakefs-5.3.5-py3-none-any.whl", hash = "sha256:751015c1de94e1390128c82b48cdedc3f088bbdbe4bc713c79d02a27f0f61e69"}, - {file = "pyfakefs-5.3.5.tar.gz", hash = "sha256:7cdc500b35a214cb7a614e1940543acc6650e69a94ac76e30f33c9373bd9cf90"}, + {file = "pyfakefs-5.5.0-py3-none-any.whl", hash = "sha256:8dbf203ab7bef1529f11f7d41b9478b898e95bf9f3b71262163aac07a518cd76"}, + {file = "pyfakefs-5.5.0.tar.gz", hash = "sha256:7448aaa07142f892d0a4eb52a5ed3206a9f02c6599e686cd97d624c18979c154"}, ] [[package]] name = "pygments" -version = "2.17.2" +version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, - {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] [package.extras] -plugins = ["importlib-metadata"] windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "8.0.0" +version = "8.2.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.0.0-py3-none-any.whl", hash = "sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"}, - {file = "pytest-8.0.0.tar.gz", hash = "sha256:249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c"}, + {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, + {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, ] [package.dependencies] @@ -446,11 +446,11 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.3.0,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +pluggy = ">=1.5,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytz" @@ -465,13 +465,13 @@ files = [ [[package]] name = "requests" -version = "2.32.0" +version = "2.32.3" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] @@ -648,8 +648,8 @@ description = "HTTP library with thread-safe connection pooling, file post, and optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.0-py3-none-any.whl", hash = "sha256:ce3711610ddce217e6d113a2732fafad960a03fd0318c91faa79481e35c11224"}, - {file = "urllib3-2.2.0.tar.gz", hash = "sha256:051d961ad0c62a94e50ecf1af379c3aba230c66c710493493560c0c223c49f20"}, + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, ] [package.extras] @@ -674,18 +674,18 @@ test = ["pytest (>=6.0.0)", "setuptools (>=65)"] [[package]] name = "zipp" -version = "3.17.0" +version = "3.19.2" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, - {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, + {file = "zipp-3.19.2-py3-none-any.whl", hash = "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c"}, + {file = "zipp-3.19.2.tar.gz", hash = "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [metadata] lock-version = "2.0" From 53220198c5e53fd11026df8ef71b11ef4d5a3233 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 26 Jun 2024 14:07:18 -0600 Subject: [PATCH 05/56] Bump to 0.7.9 --- git_fleximod/cli.py | 2 +- pyproject.toml | 2 +- tbump.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index a15a226de4..25fce68fdf 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.7.8" +__version__ = "0.7.9" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree diff --git a/pyproject.toml b/pyproject.toml index 5b1332549c..52cc26e7a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.7.8" +version = "0.7.9" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index c4f7ac96ea..b1d08a5611 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.7.8" +current = "0.7.9" # Example of a semver regexp. # Make sure this matches current_version before From acee7aac5e628e4fc52437dae6b31c82946da798 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 26 Jun 2024 14:13:25 -0600 Subject: [PATCH 06/56] update submodules --- cime | 2 +- components/cmeps | 2 +- libraries/mpi-serial | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cime b/cime index e843f3cbbc..86d99fd3cc 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit e843f3cbbc18c76a17323349285a9c0438f094e7 +Subproject commit 86d99fd3ccca249e98a533b305754edb1bece2bd diff --git a/components/cmeps b/components/cmeps index 1dd90c7458..06a825a01d 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 1dd90c745897fdd8cd94769495a30f390749b602 +Subproject commit 06a825a01d6c1abdecdcb0a4c41068a95b83745c diff --git a/libraries/mpi-serial b/libraries/mpi-serial index 2c44fb3d32..8e89b43b95 160000 --- a/libraries/mpi-serial +++ b/libraries/mpi-serial @@ -1 +1 @@ -Subproject commit 2c44fb3d327be7c6429894bc5d4de769f3486848 +Subproject commit 8e89b43b957571deebf4a3c12b67672a6a986c12 From 9455d931120f3a0e45a1037f59abe00879515e01 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 26 Jun 2024 14:15:31 -0600 Subject: [PATCH 07/56] update user_nl_mosart --- ccs_config | 2 +- cime | 2 +- cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart | 2 +- components/rtm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ccs_config b/ccs_config index 1fe4ffca80..e6c5d4e0af 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 1fe4ffca802721cd4967ed36bad78c9f7d615a93 +Subproject commit e6c5d4e0af5781e09e77efcf0269f8e907272f58 diff --git a/cime b/cime index 86d99fd3cc..517ce986c5 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit 86d99fd3ccca249e98a533b305754edb1bece2bd +Subproject commit 517ce986c5982bd2ca362ebb93cb5a5db57c7641 diff --git a/cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart b/cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart index e0e98e7d7e..38561d0a19 100644 --- a/cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart +++ b/cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart @@ -1,7 +1,7 @@ !---------------------------------------------------------------------------------- ! Users should add all user specific namelist changes below in the form of ! namelist_var = new_namelist_value -! NOTE: namelist variable rtm_tstep CAN ONLY be changed by modifying the value +! NOTE: namelist variable tstep CAN ONLY be changed by modifying the value ! of the xml variable ROF_NCPL in env_run.xml ! NOTE: if the xml variable RTM_MODE in env_run.xml is set to 'NULL', then ! then rtm will set rtm_present to .false. - and will ignore everything else diff --git a/components/rtm b/components/rtm index 88503adbc2..2d6a3c7b22 160000 --- a/components/rtm +++ b/components/rtm @@ -1 +1 @@ -Subproject commit 88503adbc275fb2ccbb6b598e460deaeb140e515 +Subproject commit 2d6a3c7b224abcd9af9b8ebb1ca939c5b9e59681 From 6da0eb710aadde323c270554518199ba6db82ffd Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 26 Jun 2024 14:23:10 -0600 Subject: [PATCH 08/56] update branchs --- ccs_config | 2 +- components/clm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ccs_config b/ccs_config index e6c5d4e0af..0a8f3a5ac2 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit e6c5d4e0af5781e09e77efcf0269f8e907272f58 +Subproject commit 0a8f3a5ac207839448cfb15ca496a408d406a680 diff --git a/components/clm b/components/clm index a9433779f0..4edaa461a4 160000 --- a/components/clm +++ b/components/clm @@ -1 +1 @@ -Subproject commit a9433779f0ae499d60ad118d2ec331628f0eaaa8 +Subproject commit 4edaa461a4cbd56bf98c5014aa85b9cd84e7fe3c From f66ef8c73b2ab8668c4361c374602be12b52cde7 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 06:44:30 -0600 Subject: [PATCH 09/56] working dglc now --- .gitmodules | 4 ++-- ccs_config | 2 +- cime | 2 +- cime_config/config_compsets.xml | 8 ++++---- components/cam | 2 +- components/cdeps | 2 +- components/cism | 2 +- components/cmeps | 2 +- components/mom | 2 +- share | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitmodules b/.gitmodules index a6d53adc52..f082b076a3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -38,7 +38,7 @@ path = share url = https://github.com/ESCOMP/CESM_share fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share - fxtag = share1.0.19 + fxtag = share1.1.1 fxrequired = ToplevelRequired [submodule "cime"] @@ -59,7 +59,7 @@ path = components/cam url = https://www.github.com/ESCOMP/CAM fxDONOTUSEurl = https://www.github.com/ESCOMP/CAM - fxtag = cam6_3_162 + fxtag = cam6_4_001 fxrequired = ToplevelRequired [submodule "ww3"] diff --git a/ccs_config b/ccs_config index 0a8f3a5ac2..69a958581e 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 0a8f3a5ac207839448cfb15ca496a408d406a680 +Subproject commit 69a958581ecd2d32ee9cb1c38bcd3847b8b920bf diff --git a/cime b/cime index 517ce986c5..9b2ff92bba 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit 517ce986c5982bd2ca362ebb93cb5a5db57c7641 +Subproject commit 9b2ff92bba1b43765dbb1acf0f0c82d451d6141f diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 743ccd2776..2c0a756637 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -39,13 +39,13 @@ - BLT1850_v0c - 1850_CAM%DEV%LT%GHGMAM4_CLM51%BGC-CROP_CICE_MOM6_MOSART_CISM2%GRIS-NOEVOLVE_SWAV + BLT1850 + 1850_CAM70%LT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV - BLTHIST_v0c - HIST_CAM%DEV%LT%GHGMAM4_CLM51%BGC-CROP_CICE_MOM6_MOSART_CISM2%GRIS-NOEVOLVE_SWAV + BLTHIST + HIST_CAM70%LT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV diff --git a/components/cam b/components/cam index ab476f9b73..68b342ebf9 160000 --- a/components/cam +++ b/components/cam @@ -1 +1 @@ -Subproject commit ab476f9b7345cbefdc4cf67ff17f0fe85d8c7387 +Subproject commit 68b342ebf95a33ea070b9e7dd3533d294f0fccb1 diff --git a/components/cdeps b/components/cdeps index f0eceabfe8..453a9d175a 160000 --- a/components/cdeps +++ b/components/cdeps @@ -1 +1 @@ -Subproject commit f0eceabfe85390b832fbcfe0646a0ad58a283c07 +Subproject commit 453a9d175a5739d9cca5c4ec7b96f45b201decec diff --git a/components/cism b/components/cism index 34339777af..3d3047b299 160000 --- a/components/cism +++ b/components/cism @@ -1 +1 @@ -Subproject commit 34339777afa7b810fd4822fce1039826668b33e4 +Subproject commit 3d3047b299678d83cfa5fe3f778b7485fea7d238 diff --git a/components/cmeps b/components/cmeps index 06a825a01d..428ecc6cbe 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 06a825a01d6c1abdecdcb0a4c41068a95b83745c +Subproject commit 428ecc6cbe4d046be11b032445ab0fa7fdf212d0 diff --git a/components/mom b/components/mom index 2f3c373332..da96f40927 160000 --- a/components/mom +++ b/components/mom @@ -1 +1 @@ -Subproject commit 2f3c37333280fc66de1795d48209b7ff267e6e74 +Subproject commit da96f40927f58b8841407cffa93c502f8740d1f8 diff --git a/share b/share index 66aa3c90d4..f6f31fd61c 160000 --- a/share +++ b/share @@ -1 +1 @@ -Subproject commit 66aa3c90d4200e01c2ccdd9583754ae0f304c32e +Subproject commit f6f31fd61cb8f80aee97311fcca64b3e26b0202c From 3e791388d12fd83e1996276e92f7efa20623665f Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 07:24:38 -0600 Subject: [PATCH 10/56] add fleximod test workflow --- .github/workflows/fleximod_test.yaml | 14 ++++++++++++++ .gitmodules | 16 ++++++++-------- ccs_config | 2 +- cime_config/config_compsets.xml | 10 ++++++++++ components/cmeps | 2 +- components/mizuroute | 2 +- components/rtm | 2 +- 7 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/fleximod_test.yaml diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml new file mode 100644 index 0000000000..f014bc9727 --- /dev/null +++ b/.github/workflows/fleximod_test.yaml @@ -0,0 +1,14 @@ +on: + push: + branches: [ master ] + pull-request: + branches: [ master ] +jobs: + fleximod-test: + runs-on: ubuntu-latest + steps: + - id: checkout-CESM + uses: actions/checkout@v4 + - id: run-fleximod + run: | + ./bin/git-fleximod test diff --git a/.gitmodules b/.gitmodules index f082b076a3..783c52e8bf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -38,7 +38,7 @@ path = share url = https://github.com/ESCOMP/CESM_share fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share - fxtag = share1.1.1 + fxtag = share1.1.2 fxrequired = ToplevelRequired [submodule "cime"] @@ -74,7 +74,7 @@ url = https://github.com/ESCOMP/RTM fxDONOTUSEurl = https://github.com/ESCOMP/RTM fxrequired = ToplevelRequired - fxtag = rtm1_0_79 + fxtag = rtm1_0_80 [submodule "pysect"] path = tools/statistical_ensemble_test/pyCECT @@ -88,14 +88,14 @@ url = https://github.com/ESCOMP/MOSART fxDONOTUSEurl = https://github.com/ESCOMP/MOSART fxrequired = ToplevelRequired - fxtag = mosart1_0_49 + fxtag = mosart1.1.02 [submodule "mizuroute"] path = components/mizuroute url = https://github.com/ESCOMP/mizuRoute fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute fxrequired = ToplevelRequired - fxtag = cesm-coupling.n02_v2.1.2 + fxtag = cesm-coupling.n02_v2.1.3 [submodule "fms"] path = libraries/FMS @@ -116,14 +116,14 @@ url = https://github.com/ESCOMP/CDEPS fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS fxrequired = ToplevelRequired - fxtag = cdeps1.0.37 + fxtag = cdeps1.0.43 [submodule "cmeps"] path = components/cmeps url = https://github.com/ESCOMP/CMEPS.git fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git fxrequired = ToplevelRequired - fxtag = cmeps0.14.63 + fxtag = cmeps1.0.0 [submodule "cice"] path = components/cice @@ -136,7 +136,7 @@ path = components/cism url = https://github.com/ESCOMP/cism-wrapper.git fxDONOTUSEurl = https://github.com/ESCOMP/cism-wrapper.git - fxtag = cismwrap_2_2_001 + fxtag = cismwrap_2_2_002 fxrequired = ToplevelRequired [submodule "clm"] @@ -144,7 +144,7 @@ url = https://github.com/ESCOMP/CTSM fxDONOTUSEurl = https://github.com/ESCOMP/CTSM fxrequired = ToplevelRequired - fxtag = ctsm5.2.007 + fxtag = ctsm5.2.008 [submodule "mom"] path = components/mom diff --git a/ccs_config b/ccs_config index 69a958581e..797acd7014 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 69a958581ecd2d32ee9cb1c38bcd3847b8b920bf +Subproject commit 797acd7014f10c8e46e50403cbf0fdf52230a2b5 diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 2c0a756637..3c1f8c1024 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -48,6 +48,16 @@ HIST_CAM70%LT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + + BMT1850 + 1850_CAM70%MT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + + + + BMTHIST + HIST_CAM70%MT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + + diff --git a/components/cmeps b/components/cmeps index 428ecc6cbe..1605a750fd 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 428ecc6cbe4d046be11b032445ab0fa7fdf212d0 +Subproject commit 1605a750fdc5f0b646017335bf4879df8a1719dd diff --git a/components/mizuroute b/components/mizuroute index 81c720c7ee..2ff305a029 160000 --- a/components/mizuroute +++ b/components/mizuroute @@ -1 +1 @@ -Subproject commit 81c720c7ee51f9c69f2934f696078c42f4493565 +Subproject commit 2ff305a0292cb06789de6cfea7ad3cc0d6173493 diff --git a/components/rtm b/components/rtm index 2d6a3c7b22..b3dfcfbba5 160000 --- a/components/rtm +++ b/components/rtm @@ -1 +1 @@ -Subproject commit 2d6a3c7b224abcd9af9b8ebb1ca939c5b9e59681 +Subproject commit b3dfcfbba58c151ac5a6ab513b3515ef3deff798 From ee9ede493c383e590cbb2cd5bc7770ce45ba99b3 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 07:36:03 -0600 Subject: [PATCH 11/56] add fleximod test workflow --- .github/workflows/fleximod_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index f014bc9727..9af4cf6436 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -1,7 +1,7 @@ on: push: branches: [ master ] - pull-request: + pull_request: branches: [ master ] jobs: fleximod-test: From d05418fe00eddbafb7f812e60499d62c7bfc6b0e Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 07:38:43 -0600 Subject: [PATCH 12/56] add fleximod test workflow --- .github/workflows/fleximod_test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index 9af4cf6436..05de16e4af 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -11,4 +11,5 @@ jobs: uses: actions/checkout@v4 - id: run-fleximod run: | + cd CESM ./bin/git-fleximod test From e6ffb82754f20dec548e5ec64124e781f60e99f2 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 07:40:03 -0600 Subject: [PATCH 13/56] add fleximod test workflow --- .github/workflows/fleximod_test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index 05de16e4af..58b44d1535 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -11,5 +11,6 @@ jobs: uses: actions/checkout@v4 - id: run-fleximod run: | - cd CESM + pwd + cd ${GITHUB_WORKDIR}/CESM ./bin/git-fleximod test From bd2b1a0d45b7efa461567adebe9380228de6b68d Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 07:42:16 -0600 Subject: [PATCH 14/56] add fleximod test workflow --- .github/workflows/fleximod_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index 58b44d1535..12c36f37f6 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -12,5 +12,5 @@ jobs: - id: run-fleximod run: | pwd - cd ${GITHUB_WORKDIR}/CESM + ls -l bin ./bin/git-fleximod test From 2d4e5950ef0afede200f8401da27ded73539b911 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 07:44:38 -0600 Subject: [PATCH 15/56] add fleximod test workflow --- .github/workflows/fleximod_test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index 12c36f37f6..d315700894 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -13,4 +13,5 @@ jobs: run: | pwd ls -l bin - ./bin/git-fleximod test + ./bin/git-fleximod test 2>&1 | tee fleximod.out + From 6ab7cfd15683f3a8b194d3c79e9e2de4d0c05795 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 08:09:48 -0600 Subject: [PATCH 16/56] add fleximod test workflow --- .github/workflows/fleximod_test.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index d315700894..33ebeee7f9 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -10,8 +10,6 @@ jobs: - id: checkout-CESM uses: actions/checkout@v4 - id: run-fleximod - run: | - pwd - ls -l bin - ./bin/git-fleximod test 2>&1 | tee fleximod.out + run: ./bin/git-fleximod test + From 589ad84b33e4ff98ffc831281a0af107fd4cf9ac Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 08:20:24 -0600 Subject: [PATCH 17/56] matrix of python versions --- .github/workflows/fleximod_test.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index 33ebeee7f9..eae31d5db9 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -6,10 +6,15 @@ on: jobs: fleximod-test: runs-on: ubuntu-latest + strategy: + matrix: + # oldest supported and latest supported + python-version: ["3.7", "3.x"] steps: - id: checkout-CESM uses: actions/checkout@v4 - id: run-fleximod - run: ./bin/git-fleximod test + run: | + $GITHUB_WORKSPACE/bin/git-fleximod test From 6af2e4aa6bc0ca5b1ce4ee6d60eac7170a6bb784 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 08:22:36 -0600 Subject: [PATCH 18/56] matrix of python versions --- .github/workflows/fleximod_test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index eae31d5db9..db5dec851d 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -15,6 +15,7 @@ jobs: uses: actions/checkout@v4 - id: run-fleximod run: | - $GITHUB_WORKSPACE/bin/git-fleximod test + $GITHUB_WORKSPACE/bin/git-fleximod test share + $GITHUB_WORKSPACE/bin/git-fleximod test ccs_config From de2e57b199b940968d20feeef8c939a829104139 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 08:25:07 -0600 Subject: [PATCH 19/56] matrix of python versions --- .github/workflows/fleximod_test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index db5dec851d..ea12952144 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -16,6 +16,8 @@ jobs: - id: run-fleximod run: | $GITHUB_WORKSPACE/bin/git-fleximod test share - $GITHUB_WORKSPACE/bin/git-fleximod test ccs_config + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 From a2e7f69900843ab920d74ca317dd78af0465adc1 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 08:29:41 -0600 Subject: [PATCH 20/56] update code first --- .github/workflows/fleximod_test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index ea12952144..141e6fdf3a 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -15,7 +15,8 @@ jobs: uses: actions/checkout@v4 - id: run-fleximod run: | - $GITHUB_WORKSPACE/bin/git-fleximod test share + $GITHUB_WORKSPACE/bin/git-fleximod update + $GITHUB_WORKSPACE/bin/git-fleximod test - name: Setup tmate session if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 From 87e76624e749196bf48d27dac7fec7a24a7e56a8 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 08:30:12 -0600 Subject: [PATCH 21/56] update code first --- .github/workflows/fleximod_test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fleximod_test.yaml b/.github/workflows/fleximod_test.yaml index 141e6fdf3a..24bcac95d4 100644 --- a/.github/workflows/fleximod_test.yaml +++ b/.github/workflows/fleximod_test.yaml @@ -17,8 +17,8 @@ jobs: run: | $GITHUB_WORKSPACE/bin/git-fleximod update $GITHUB_WORKSPACE/bin/git-fleximod test - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 +# - name: Setup tmate session +# if: ${{ failure() }} +# uses: mxschmitt/action-tmate@v3 From a7d8b4e3e7e0661b98ba03dfc3808b84c6ec6ff1 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 1 Jul 2024 17:06:50 -0600 Subject: [PATCH 22/56] all pytests passing --- git_fleximod/git_fleximod.py | 109 +++++++++++++++++++++------------ git_fleximod/gitmodules.py | 2 +- tests/conftest.py | 16 ++++- tests/test_e_complex_update.py | 68 ++++++++++++++++++++ 4 files changed, 152 insertions(+), 43 deletions(-) create mode 100644 tests/test_e_complex_update.py diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index ed24c4e753..69da054d43 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -20,7 +20,7 @@ def fxrequired_allowed_values(): - return ["ToplevelRequired", "ToplevelOptional", "AlwaysRequired", "AlwaysOptional"] + return ["ToplevelRequired", "ToplevelOptional", "AlwaysRequired", "AlwaysOptional", "TopLevelRequired", "TopLevelOptional"] def commandline_arguments(args=None): @@ -33,14 +33,9 @@ def commandline_arguments(args=None): # explicitly listing a component overrides the optional flag if options.optional or options.components: - fxrequired = [ - "ToplevelRequired", - "ToplevelOptional", - "AlwaysRequired", - "AlwaysOptional", - ] + fxrequired = fxrequired_allowed_values() else: - fxrequired = ["ToplevelRequired", "AlwaysRequired"] + fxrequired = ["ToplevelRequired", "AlwaysRequired", "TopLevelRequired"] action = options.action if not action: @@ -154,6 +149,8 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master if os.path.isdir(os.path.join(root_dir, path, ".git")): with utils.pushd(sprep_repo): + if os.path.isdir(os.path.join(topgit,".git")): + shutil.rmtree(os.path.join(topgit,".git")) shutil.move(".git", topgit) with open(".git", "w") as f: f.write("gitdir: " + os.path.relpath(topgit)) @@ -166,7 +163,9 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master return with utils.pushd(sprep_repo): - shutil.copy(sparsefile, gitsparse) + if os.path.isfile(sparsefile): + shutil.copy(sparsefile, gitsparse) + # Finally checkout the repo sprepo_git.git_operation("fetch", "origin", "--tags") @@ -202,9 +201,9 @@ def single_submodule_checkout( # if url is provided update to the new url tmpurl = None repo_exists = False - if os.path.exists(os.path.join(repodir, ".git")): - logger.info("Submodule {} already checked out".format(name)) - repo_exists = True +# if os.path.exists(os.path.join(repodir, ".git")): +# logger.info("Submodule {} already checked out".format(name)) +# repo_exists = True # Look for a .gitmodules file in the newly checkedout repo if not repo_exists and url: # ssh urls cause problems for those who dont have git accounts with ssh keys defined @@ -244,10 +243,13 @@ def single_submodule_checkout( if not repo_exists or not tmpurl: git.git_operation("submodule", "update", "--init", "--", path) - + if tag and not optional: + smgit = GitInterface(repodir, logger) + smgit.git_operation("checkout", tag) + if os.path.exists(os.path.join(repodir, ".gitmodules")): # recursively handle this checkout - print(f"Recursively checking out submodules of {name}") + print(f"Recursively checking out submodules of {name} {optional}") gitmodules = GitModules(logger, confpath=repodir) requiredlist = ["AlwaysRequired"] if optional: @@ -288,7 +290,7 @@ def submodules_status(gitmodules, root_dir, toplevel=False): tag = gitmodules.get(name, "fxtag") url = gitmodules.get(name, "url") required = gitmodules.get(name, "fxrequired") - level = required and "Toplevel" in required + level = required and required.startswith("Top") if not path: utils.fatal_error("No path found in .gitmodules for {}".format(name)) newpath = os.path.join(root_dir, path) @@ -299,6 +301,7 @@ def submodules_status(gitmodules, root_dir, toplevel=False): url = url.replace("git@github.com:", "https://github.com/") tags = rootgit.git_operation("ls-remote", "--tags", url) result = rootgit.git_operation("submodule","status",newpath).split() +# print(f"newpath {newpath} result {result}") ahash = None if result: ahash = result[0][1:] @@ -318,8 +321,12 @@ def submodules_status(gitmodules, root_dir, toplevel=False): if hhash and atag: break optional = " (optional)" if required and "Optional" in required else "" +# print(f"tag is {tag} ahash is {ahash} {hhash} {atag} {newpath} {required} {level}") + if required and not required.startswith("Always") and not level: + continue + if tag and (ahash == hhash or atag == tag): - print(f"e {name:>20} not checked out, aligned at tag {tag}{optional}") + print(f"e {name:>20} not checked out, aligned at tag {tag}{optional} {level} {required}") elif tag: ahash = rootgit.git_operation( "submodule", "status", "{}".format(path) @@ -341,15 +348,19 @@ def submodules_status(gitmodules, root_dir, toplevel=False): atag = git.git_operation("describe", "--tags", "--always").rstrip() ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] rurl = git.git_operation("ls-remote","--get-url").rstrip() + recurse = False if rurl != url: remote = add_remote(git, url) git.git_operation("fetch", remote) if tag and atag == tag: print(f" {name:>20} at tag {tag}") + recurse = True elif tag and ahash[: len(tag)] == tag: print(f" {name:>20} at hash {ahash}") + recurse = True elif atag == ahash: print(f" {name:>20} at hash {ahash}") + recurse = True elif tag: print( f"s {name:>20} {atag} {ahash} is out of sync with .gitmodules {tag}" @@ -361,18 +372,33 @@ def submodules_status(gitmodules, root_dir, toplevel=False): f"e {name:>20} has no fxtag defined in .gitmodules, module at {atag}" ) testfails += 1 - + status = git.git_operation("status", "--ignore-submodules", "-uno") if "nothing to commit" not in status: localmods = localmods + 1 print("M" + textwrap.indent(status, " ")) - + if recurse and os.path.exists(os.path.join(newpath, ".gitmodules")): + submodules = GitModules( + logger, + confpath=newpath, + ) + nf, lm, nu = submodules_status(submodules, newpath) + testfails += nf + localmods += lm + needsupdate += nu + + return testfails, localmods, needsupdate +def git_toplevelroot(root_dir, logger): + rgit = GitInterface(root_dir, logger) + superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") + return superroot + + def submodules_update(gitmodules, root_dir, requiredlist, force): _, localmods, needsupdate = submodules_status(gitmodules, root_dir) - if localmods and not force: local_mods_output() return @@ -383,27 +409,26 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): fxtag = gitmodules.get(name, "fxtag") path = gitmodules.get(name, "path") url = gitmodules.get(name, "url") - logger.info( - "name={} path={} url={} fxtag={} requiredlist={} ".format( - name, os.path.join(root_dir, path), url, fxtag, requiredlist - ) - ) fxrequired = gitmodules.get(name, "fxrequired") - assert fxrequired in fxrequired_allowed_values() - rgit = GitInterface(root_dir, logger) - superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") + if fxrequired: + allowedvalues = fxrequired_allowed_values() + assert fxrequired in allowedvalues - fxsparse = gitmodules.get(name, "fxsparse") + fxsparse = gitmodules.get(name, "fxsparse") + superroot = git_toplevelroot(root_dir, logger) + if ( fxrequired - and (superroot and "Toplevel" in fxrequired) - or fxrequired not in requiredlist + and ((superroot and "Toplevel" in fxrequired) + or fxrequired not in requiredlist) ): - if "ToplevelOptional" == fxrequired: - print("Skipping optional component {}".format(name)) - continue + if "Optional" in fxrequired and "Optional" not in requiredlist: + if fxrequired.startswith("Always"): + print(f"Skipping optional component {name:>20}") + continue + if fxsparse: logger.debug( "Callng submodule_sparse_checkout({}, {}, {}, {}, {}, {}".format( @@ -417,7 +442,7 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): root_dir, name, path, url ) ) - + print(f"fxrequired {fxrequired} requiredlist {requiredlist}") single_submodule_checkout( root_dir, name, @@ -425,7 +450,7 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): url=url, tag=fxtag, force=force, - optional=("AlwaysOptional" in requiredlist), + optional="AlwaysOptional" in requiredlist ) if os.path.exists(os.path.join(path, ".git")): @@ -448,6 +473,8 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): print(f"{name:>20} updated to {fxtag}") except Exception as error: print(error) + + elif not fxtag: print(f"No fxtag found for submodule {name:>20}") else: @@ -455,7 +482,6 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): - def local_mods_output(): text = """\ The submodules labeled with 'M' above are not in a clean state. @@ -469,7 +495,6 @@ def local_mods_output(): """ print(text) - # checkout is done by update if required so this function may be depricated def submodules_checkout(gitmodules, root_dir, requiredlist, force=False): """ @@ -498,10 +523,12 @@ def submodules_checkout(gitmodules, root_dir, requiredlist, force=False): fxtag = gitmodules.get(name, "fxtag") path = gitmodules.get(name, "path") url = gitmodules.get(name, "url") + superroot = git_toplevelroot(root_dir, logger) if fxrequired and fxrequired not in requiredlist: - if "Optional" in fxrequired: - print("Skipping optional component {}".format(name)) + if fxrequired == "AlwaysOptional" or (superroot == root_dir): + print(f"Skipping optional component {name:>20} {requiredlist}") continue + if fxsparse: logger.debug( @@ -521,7 +548,9 @@ def submodules_checkout(gitmodules, root_dir, requiredlist, force=False): url=url, tag=fxtag, force=force, - optional="AlwaysOptional" in requiredlist, + optional="AlwaysOptional" == fxrequired \ + or "ToplevelOptional" == fxrequired \ + or "TopLevelOptional" == fxrequired ) diff --git a/git_fleximod/gitmodules.py b/git_fleximod/gitmodules.py index 7e4e05394a..cf8b350dd6 100644 --- a/git_fleximod/gitmodules.py +++ b/git_fleximod/gitmodules.py @@ -1,4 +1,4 @@ -import shutil +import shutil, os from pathlib import Path from configparser import RawConfigParser, ConfigParser from .lstripreader import LstripReader diff --git a/tests/conftest.py b/tests/conftest.py index 65ee85d23d..81edbe713e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -119,8 +119,20 @@ def complex_repo(tmp_path, logger): str_path = str(test_dir) gitp = GitInterface(str_path, logger) gitp.git_operation("remote", "add", "origin", "https://github.com/jedwards4b/fleximod-test2") - gitp.git_operation("fetch", "origin", "main") - gitp.git_operation("checkout", "main") + gitp.git_operation("fetch", "origin") + gitp.git_operation("checkout", "v0.0.1") + return test_dir + +@pytest.fixture +def complex_update(tmp_path, logger): + test_dir = tmp_path / "testcomplex" + test_dir.mkdir() + str_path = str(test_dir) + gitp = GitInterface(str_path, logger) + gitp.git_operation("remote", "add", "origin", "https://github.com/jedwards4b/fleximod-test2") + gitp.git_operation("fetch", "origin") + gitp.git_operation("checkout", "v0.0.2") + return test_dir @pytest.fixture diff --git a/tests/test_e_complex_update.py b/tests/test_e_complex_update.py new file mode 100644 index 0000000000..44998f186f --- /dev/null +++ b/tests/test_e_complex_update.py @@ -0,0 +1,68 @@ +import pytest +from pathlib import Path +from git_fleximod.gitinterface import GitInterface + +def test_complex_update(git_fleximod, complex_update, logger): + status = git_fleximod(complex_update, "status") + assert("ToplevelOptional not checked out, aligned at tag v5.3.2" in status.stdout) + assert("ToplevelRequired not checked out, aligned at tag MPIserial_2.5.0" in status.stdout) + assert("AlwaysRequired not checked out, aligned at tag MPIserial_2.4.0" in status.stdout) + assert("Complex not checked out, out of sync at tag testtag02, expected tag is testtag3" in status.stdout) + assert("AlwaysOptional not checked out, out of sync at tag None, expected tag is MPIserial_2.3.0" in status.stdout) + print(f"status before is {status.stdout}") + + # This should checkout and update test_submodule and complex_sub + result = git_fleximod(complex_update, "update") + assert result.returncode == 0 + + status = git_fleximod(complex_update, "status") + assert("ToplevelOptional not checked out, aligned at tag v5.3.2" in status.stdout) + assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) + assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) + assert("Complex at tag testtag3" in status.stdout) + print(f"status after is {status.stdout}") + # now check the complex_sub + root = (complex_update / "modules" / "complex") + assert(not (root / "libraries" / "gptl" / ".git").exists()) + assert(not (root / "libraries" / "mpi-serial" / ".git").exists()) + assert((root / "modules" / "mpi-serialAR" / ".git").exists()) + assert((root / "modules" / "mpi-serialSAR" / ".git").exists()) + assert(not (root / "modules" / "mpi-serial2" / ".git").exists()) + assert((root / "modules" / "mpi-sparse" / ".git").exists()) + assert((root / "modules" / "mpi-sparse" / "m4").exists()) + assert(not (root / "modules" / "mpi-sparse" / "README").exists()) + + # update a single optional submodule + + result = git_fleximod(complex_update, "update ToplevelOptional") + assert result.returncode == 0 + + status = git_fleximod(complex_update, "status") + assert("ToplevelOptional at tag v5.3.2" in status.stdout) + assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) + assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) + assert("Complex at tag testtag3" in status.stdout) + assert("AlwaysOptional not checked out, out of sync at tag None, expected tag is MPIserial_2.3.0" in status.stdout) + + # Finally update optional + result = git_fleximod(complex_update, "update --optional") + assert result.returncode == 0 + + status = git_fleximod(complex_update, "status") + assert("ToplevelOptional at tag v5.3.2" in status.stdout) + assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) + assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) + assert("Complex at tag testtag3" in status.stdout) + assert("AlwaysOptional at tag MPIserial_2.3.0" in status.stdout) + + # now check the complex_sub + root = (complex_update / "modules" / "complex" ) + assert(not (root / "libraries" / "gptl" / ".git").exists()) + assert(not (root / "libraries" / "mpi-serial" / ".git").exists()) + assert((root / "modules" / "mpi-serial" / ".git").exists()) + assert((root / "modules" / "mpi-serial2" / ".git").exists()) + assert((root / "modules" / "mpi-sparse" / ".git").exists()) + assert((root / "modules" / "mpi-sparse" / "m4").exists()) + assert(not (root / "modules" / "mpi-sparse" / "README").exists()) + + From 82dd7a41d1b01092a968e2126f6f300f872d2812 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Jul 2024 07:59:52 -0600 Subject: [PATCH 23/56] test_b_update now working --- git_fleximod/git_fleximod.py | 250 +++++++++-------------------------- git_fleximod/gitinterface.py | 6 +- 2 files changed, 70 insertions(+), 186 deletions(-) diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index 69da054d43..505d7222f0 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -13,7 +13,7 @@ from git_fleximod import cli from git_fleximod.gitinterface import GitInterface from git_fleximod.gitmodules import GitModules -from configparser import NoOptionError +from git_fleximod.submodule import Submodule # logger variable is global logger = None @@ -265,132 +265,42 @@ def single_submodule_checkout( return -def add_remote(git, url): - remotes = git.git_operation("remote", "-v") - newremote = "newremote.00" - if url in remotes: - for line in remotes: - if url in line and "fetch" in line: - newremote = line.split()[0] - break - else: - i = 0 - while "newremote" in remotes: - i = i + 1 - newremote = f"newremote.{i:02d}" - git.git_operation("remote", "add", newremote, url) - return newremote - -def submodules_status(gitmodules, root_dir, toplevel=False): + +def init_submodule_from_gitmodules(gitmodules, name, root_dir, logger): + path = gitmodules.get(name, "path") + url = gitmodules.get(name, "url") + tag = gitmodules.get(name, "fxtag") + fxurl = gitmodules.get(name, "fxDONOTUSEurl") + fxsparse = gitmodules.get(name, "fxsparse") + fxrequired = gitmodules.get(name, "fxrequired") + return Submodule(root_dir, name, path, url, fxtag=tag, fxurl=fxurl, fxsparse=fxsparse, fxrequired=fxrequired, logger=logger) + +def submodules_status(gitmodules, root_dir, toplevel=False, depth=0): testfails = 0 localmods = 0 needsupdate = 0 + submodules = {} + wrapper = textwrap.TextWrapper(initial_indent=' '*depth, width=120,subsequent_indent=' '*(depth+20)) for name in gitmodules.sections(): - path = gitmodules.get(name, "path") - tag = gitmodules.get(name, "fxtag") - url = gitmodules.get(name, "url") - required = gitmodules.get(name, "fxrequired") - level = required and required.startswith("Top") - if not path: - utils.fatal_error("No path found in .gitmodules for {}".format(name)) - newpath = os.path.join(root_dir, path) - logger.debug("newpath is {}".format(newpath)) - if not os.path.exists(os.path.join(newpath, ".git")): - rootgit = GitInterface(root_dir, logger) - # submodule commands use path, not name - url = url.replace("git@github.com:", "https://github.com/") - tags = rootgit.git_operation("ls-remote", "--tags", url) - result = rootgit.git_operation("submodule","status",newpath).split() -# print(f"newpath {newpath} result {result}") - ahash = None - if result: - ahash = result[0][1:] - hhash = None - atag = None + if not submodules or name not in submodules: + submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) + + result,n,l,t = submodules[name].status() + testfails += t + localmods += l + needsupdate += n + if toplevel or not submodules[name].toplevel(): + print(wrapper.fill(result)) + subdir = os.path.join(root_dir, submodules[name].path) + if os.path.exists(os.path.join(subdir, ".gitmodules")): + submod = GitModules(logger, confpath=subdir) + t,l,n = submodules_status(submod, subdir, depth=depth+1) + testfails += t + localmods += l + needsupdate += n - needsupdate += 1 - if not toplevel and level: - continue - for htag in tags.split("\n"): - if htag.endswith('^{}'): - htag = htag[:-3] - if ahash and not atag and ahash in htag: - atag = (htag.split()[1])[10:] - if tag and not hhash and htag.endswith(tag): - hhash = htag.split()[0] - if hhash and atag: - break - optional = " (optional)" if required and "Optional" in required else "" -# print(f"tag is {tag} ahash is {ahash} {hhash} {atag} {newpath} {required} {level}") - if required and not required.startswith("Always") and not level: - continue - - if tag and (ahash == hhash or atag == tag): - print(f"e {name:>20} not checked out, aligned at tag {tag}{optional} {level} {required}") - elif tag: - ahash = rootgit.git_operation( - "submodule", "status", "{}".format(path) - ).rstrip() - ahash = ahash[1 : len(tag) + 1] - if tag == ahash: - print(f"e {name:>20} not checked out, aligned at hash {ahash}{optional}") - else: - print( - f"e {name:>20} not checked out, out of sync at tag {atag}, expected tag is {tag}{optional}" - ) - testfails += 1 - else: - print(f"e {name:>20} has no fxtag defined in .gitmodules{optional}") - testfails += 1 - else: - with utils.pushd(newpath): - git = GitInterface(newpath, logger) - atag = git.git_operation("describe", "--tags", "--always").rstrip() - ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] - rurl = git.git_operation("ls-remote","--get-url").rstrip() - recurse = False - if rurl != url: - remote = add_remote(git, url) - git.git_operation("fetch", remote) - if tag and atag == tag: - print(f" {name:>20} at tag {tag}") - recurse = True - elif tag and ahash[: len(tag)] == tag: - print(f" {name:>20} at hash {ahash}") - recurse = True - elif atag == ahash: - print(f" {name:>20} at hash {ahash}") - recurse = True - elif tag: - print( - f"s {name:>20} {atag} {ahash} is out of sync with .gitmodules {tag}" - ) - testfails += 1 - needsupdate += 1 - else: - print( - f"e {name:>20} has no fxtag defined in .gitmodules, module at {atag}" - ) - testfails += 1 - - status = git.git_operation("status", "--ignore-submodules", "-uno") - if "nothing to commit" not in status: - localmods = localmods + 1 - print("M" + textwrap.indent(status, " ")) - if recurse and os.path.exists(os.path.join(newpath, ".gitmodules")): - submodules = GitModules( - logger, - confpath=newpath, - ) - nf, lm, nu = submodules_status(submodules, newpath) - testfails += nf - localmods += lm - needsupdate += nu - - return testfails, localmods, needsupdate - def git_toplevelroot(root_dir, logger): rgit = GitInterface(root_dir, logger) superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") @@ -398,25 +308,24 @@ def git_toplevelroot(root_dir, logger): def submodules_update(gitmodules, root_dir, requiredlist, force): - _, localmods, needsupdate = submodules_status(gitmodules, root_dir) - if localmods and not force: - local_mods_output() - return - if needsupdate == 0: - return - +# _, localmods, needsupdate = submodules_status(gitmodules, root_dir) +# if localmods and not force: +# local_mods_output() +# return +# if needsupdate == 0: +# return + submodules = {} for name in gitmodules.sections(): - fxtag = gitmodules.get(name, "fxtag") - path = gitmodules.get(name, "path") - url = gitmodules.get(name, "url") - - fxrequired = gitmodules.get(name, "fxrequired") - if fxrequired: - allowedvalues = fxrequired_allowed_values() - assert fxrequired in allowedvalues + if not submodules or name not in submodules: + submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) + _, needsupdate, localmods, testfails = submodules[name].status() + fxrequired = submodules[name].fxrequired + if not fxrequired: + fxrequired = "AlwaysRequired" + allowedvalues = fxrequired_allowed_values() + assert fxrequired in allowedvalues - fxsparse = gitmodules.get(name, "fxsparse") superroot = git_toplevelroot(root_dir, logger) if ( @@ -429,56 +338,27 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): print(f"Skipping optional component {name:>20}") continue - if fxsparse: - logger.debug( - "Callng submodule_sparse_checkout({}, {}, {}, {}, {}, {}".format( - root_dir, name, url, path, fxsparse, fxtag - ) - ) - submodule_sparse_checkout(root_dir, name, url, path, fxsparse, tag=fxtag) - else: - logger.info( - "Calling submodule_checkout({},{},{},{})".format( - root_dir, name, path, url - ) - ) - print(f"fxrequired {fxrequired} requiredlist {requiredlist}") - single_submodule_checkout( - root_dir, - name, - path, - url=url, - tag=fxtag, - force=force, - optional="AlwaysOptional" in requiredlist - ) +# if fxsparse: +# logger.debug( +# "Callng submodule_sparse_checkout({}, {}, {}, {}, {}, {}".format( +# root_dir, name, url, path, fxsparse, fxtag +# ) +# ) +# submodule_sparse_checkout(root_dir, name, url, path, fxsparse, tag=fxtag) +# else: + print(f"fxrequired {fxrequired} requiredlist {requiredlist}") + submodules[name].update(optional="AlwaysOptional") + +# single_submodule_checkout( +# root_dir, +# name, +# path, +# url=url, +# tag=fxtag, +# force=force, +# optional="AlwaysOptional" in requiredlist +# ) - if os.path.exists(os.path.join(path, ".git")): - submoddir = os.path.join(root_dir, path) - with utils.pushd(submoddir): - git = GitInterface(submoddir, logger) - # first make sure the url is correct - upstream = git.git_operation("ls-remote", "--get-url").rstrip() - newremote = "origin" - if upstream != url: - add_remote(git, url) - - tags = git.git_operation("tag", "-l") - if fxtag and fxtag not in tags: - git.git_operation("fetch", newremote, "--tags") - atag = git.git_operation("describe", "--tags", "--always").rstrip() - if fxtag and fxtag != atag: - try: - git.git_operation("checkout", fxtag) - print(f"{name:>20} updated to {fxtag}") - except Exception as error: - print(error) - - - elif not fxtag: - print(f"No fxtag found for submodule {name:>20}") - else: - print(f"{name:>20} up to date.") diff --git a/git_fleximod/gitinterface.py b/git_fleximod/gitinterface.py index 93ae38ecde..c7462b3a15 100644 --- a/git_fleximod/gitinterface.py +++ b/git_fleximod/gitinterface.py @@ -62,7 +62,11 @@ def git_operation(self, operation, *args, **kwargs): def config_get_value(self, section, name): if self._use_module: config = self.repo.config_reader() - return config.get_value(section, name) + try: + val = config.get_value(section, name) + except: + val = None + return val else: cmd = ("git", "-C", str(self.repo_path), "config", "--get", f"{section}.{name}") output = utils.execute_subprocess(cmd, output_to_caller=True) From 72211d20b74babf0f9996391a1f7f7f4091f17c2 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Jul 2024 08:44:48 -0600 Subject: [PATCH 24/56] add the new submodule class --- git_fleximod/submodule.py | 329 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 git_fleximod/submodule.py diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py new file mode 100644 index 0000000000..f1c1b62984 --- /dev/null +++ b/git_fleximod/submodule.py @@ -0,0 +1,329 @@ +import os +import textwrap +import shutil +from configparser import NoOptionError +from git_fleximod import utils +from git_fleximod.gitinterface import GitInterface + +class Submodule(): + def __init__(self, root_dir, name, path, url, fxtag=None, fxurl=None, fxsparse=None, fxrequired=None, logger=None): + self.name = name + self.root_dir = root_dir + self.path = path + url = url.replace("git@github.com:", "https://github.com/") + self.url = url + self.fxurl = fxurl + self.fxtag = fxtag + self.fxsparse = fxsparse + self.fxrequired = fxrequired + self.logger = logger + + def status(self): + smpath = os.path.join(self.root_dir, self.path) + testfails = 0 + localmods = 0 + needsupdate = 0 + ahash = None + optional = " (optional)" if "Optional" in self.fxrequired else None + required = None + level = None + if not os.path.exists(os.path.join(smpath, ".git")): + rootgit = GitInterface(self.root_dir, self.logger) + # submodule commands use path, not name + tags = rootgit.git_operation("ls-remote", "--tags", self.url) + result = rootgit.git_operation("submodule","status",smpath).split() + + if result: + ahash = result[0][1:] + hhash = None + atag = None + for htag in tags.split("\n"): + if htag.endswith('^{}'): + htag = htag[:-3] + if ahash and not atag and ahash in htag: + atag = (htag.split()[1])[10:] + if self.fxtag and not hhash and htag.endswith(self.fxtag): + hhash = htag.split()[0] + if hhash and atag: + break + if self.fxtag and (ahash == hhash or atag == self.fxtag): + result = f"e {self.name:>20} not checked out, aligned at tag {self.fxtag}{optional} {level} {required}" + elif self.fxtag: + ahash = rootgit.git_operation( + "submodule", "status", "{}".format(self.path) + ).rstrip() + ahash = ahash[1 : len(self.fxtag) + 1] + if self.fxtag == ahash: + result = f"e {self.name:>20} not checked out, aligned at hash {ahash}{optional}" + else: + result = f"e {self.name:>20} not checked out, out of sync at tag {atag}, expected tag is {self.fxtag}{optional}" + testfails += 1 + else: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules{optional}" + testfails += 1 + else: + with utils.pushd(smpath): + git = GitInterface(smpath, self.logger) + remote = git.git_operation("remote").rstrip() + if remote == '': + result = f"e {self.name:>20} has no associated remote" + testfails += 1 + needsupdate += 1 + return result, needsupdate, localmods, testfails + rurl = git.git_operation("ls-remote","--get-url").rstrip() + atag = git.git_operation("describe", "--tags", "--always").rstrip() + ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] + + recurse = False + if rurl != self.url: + remote = self._add_remote(git) + git.git_operation("fetch", remote) + if self.fxtag and atag == self.fxtag: + result = f" {self.name:>20} at tag {self.fxtag}" + recurse = True + elif self.fxtag and ahash[: len(self.fxtag)] == self.fxtag: + result = f" {self.name:>20} at hash {ahash}" + recurse = True + elif atag == ahash: + result = f" {self.name:>20} at hash {ahash}" + recurse = True + elif self.fxtag: + result = f"s {self.name:>20} {atag} {ahash} is out of sync with .gitmodules {self.fxtag}" + testfails += 1 + needsupdate += 1 + else: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {atag}" + testfails += 1 + + status = git.git_operation("status", "--ignore-submodules", "-uno") + if "nothing to commit" not in status: + localmods = localmods + 1 + result = "M" + textwrap.indent(status, " ") + + return result, needsupdate, localmods, testfails + + + def _add_remote(self, git): + remotes = git.git_operation("remote", "-v").splitlines() + upstream = None + if remotes: + upstream = git.git_operation("ls-remote", "--get-url").rstrip() + newremote = "newremote.00" + + line = next((s for s in remotes if self.url in s), None) + if line: + newremote = line.split()[0] + return newremote + else: + i = 0 + while "newremote" in remotes: + i = i + 1 + newremote = f"newremote.{i:02d}" + else: + newremote = "origin" + git.git_operation("remote", "add", newremote, self.url) + return newremote + + def toplevel(self): + if self.fxrequired: + return True if self.fxrequired.startswith("Top") else False + + def sparse_checkout(self): + """ + This function performs a sparse checkout of a git submodule. It does so by first creating the .git/info/sparse-checkout fileq + in the submodule and then checking out the desired tag. If the submodule is already checked out, it will not be checked out again. + Creating the sparse-checkout file first prevents the entire submodule from being checked out and then removed. This is important + because the submodule may have a large number of files and checking out the entire submodule and then removing it would be time + and disk space consuming. + + Returns: + None + """ + self.logger.info("Called sparse_checkout for {}".format(self.name)) + rgit = GitInterface(self.root_dir, self.logger) + superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") + if superroot: + gitroot = superroot.strip() + else: + gitroot = self.root_dir.strip() + assert os.path.isdir(os.path.join(gitroot, ".git")) + # first create the module directory + if not os.path.isdir(os.path.join(self.root_dir, self.path)): + os.makedirs(os.path.join(self.root_dir, self.path)) + + # initialize a new git repo and set the sparse checkout flag + sprep_repo = os.path.join(self.root_dir, self.path) + sprepo_git = GitInterface(sprep_repo, self.logger) + if os.path.exists(os.path.join(sprep_repo, ".git")): + try: + self.logger.info("Submodule {} found".format(self.name)) + chk = sprepo_git.config_get_value("core", "sparseCheckout") + if chk == "true": + self.logger.info("Sparse submodule {} already checked out".format(self.name)) + return + except (NoOptionError): + self.logger.debug("Sparse submodule {} not present".format(self.name)) + except Exception as e: + utils.fatal_error("Unexpected error {} occured.".format(e)) + + sprepo_git.config_set_value("core", "sparseCheckout", "true") + + # set the repository remote + + self.logger.info("Setting remote origin in {}/{}".format(self.root_dir, self.path)) + status = sprepo_git.git_operation("remote", "-v") + if self.url not in status: + sprepo_git.git_operation("remote", "add", "origin", self.url) + + topgit = os.path.join(gitroot, ".git") + + if gitroot != self.root_dir and os.path.isfile(os.path.join(self.root_dir, ".git")): + with open(os.path.join(self.root_dir, ".git")) as f: + gitpath = os.path.relpath( + os.path.join(self.root_dir, f.read().split()[1]), + start=os.path.join(self.root_dir, self.path), + ) + topgit = os.path.join(gitpath, "modules") + else: + topgit = os.path.relpath( + os.path.join(self.root_dir, ".git", "modules"), + start=os.path.join(self.root_dir, self.path), + ) + + with utils.pushd(sprep_repo): + if not os.path.isdir(topgit): + os.makedirs(topgit) + topgit += os.sep + self.name + + if os.path.isdir(os.path.join(self.root_dir, self.path, ".git")): + with utils.pushd(sprep_repo): + if os.path.isdir(os.path.join(topgit,".git")): + shutil.rmtree(os.path.join(topgit,".git")) + shutil.move(".git", topgit) + with open(".git", "w") as f: + f.write("gitdir: " + os.path.relpath(topgit)) + # assert(os.path.isdir(os.path.relpath(topgit, start=sprep_repo))) + gitsparse = os.path.abspath(os.path.join(topgit, "info", "sparse-checkout")) + if os.path.isfile(gitsparse): + self.logger.warning( + "submodule {} is already initialized {}".format(self.name, topgit) + ) + return + + with utils.pushd(sprep_repo): + if os.path.isfile(self.fxsparse): + shutil.copy(self.fxsparse, gitsparse) + + + # Finally checkout the repo + sprepo_git.git_operation("fetch", "origin", "--tags") + sprepo_git.git_operation("checkout", self.fxtag) + + print(f"Successfully checked out {self.name:>20} at {self.fxtag}") + rgit.config_set_value(f'submodule "{self.name}"', "active", "true") + rgit.config_set_value(f'submodule "{self.name}"', "url", self.url) + + def update(self, optional=None): + # function implementation... + git = GitInterface(self.root_dir, self.logger) + repodir = os.path.join(self.root_dir, self.path) + self.logger.info("Checkout {} into {}/{}".format(self.name, self.root_dir, self.path)) + # if url is provided update to the new url + tmpurl = None + repo_exists = False + # if os.path.exists(os.path.join(repodir, ".git")): + # self.logger.info("Submodule {} already checked out".format(self.name)) + # repo_exists = True + # Look for a .gitmodules file in the newly checkedout repo + if self.fxsparse: + print(f"Sparse checkout {self.name} fxsparse {self.fxsparse}") + self.sparse_checkout() + else: + if not repo_exists and self.url: + # ssh urls cause problems for those who dont have git accounts with ssh keys defined + # but cime has one since e3sm prefers ssh to https, because the .gitmodules file was + # opened with a GitModules object we don't need to worry about restoring the file here + # it will be done by the GitModules class + if self.url.startswith("git@"): + tmpurl = self.url + url = self.url.replace("git@github.com:", "https://github.com/") + git.git_operation("clone", url, self.path) + smgit = GitInterface(repodir, self.logger) + if not tag: + tag = smgit.git_operation("describe", "--tags", "--always").rstrip() + smgit.git_operation("checkout", tag) + # Now need to move the .git dir to the submodule location + rootdotgit = os.path.join(self.root_dir, ".git") + if os.path.isfile(rootdotgit): + with open(rootdotgit) as f: + line = f.readline() + if line.startswith("gitdir: "): + rootdotgit = line[8:].rstrip() + + newpath = os.path.abspath(os.path.join(self.root_dir, rootdotgit, "modules", self.name)) + if os.path.exists(newpath): + shutil.rmtree(os.path.join(repodir, ".git")) + else: + shutil.move(os.path.join(repodir, ".git"), newpath) + + with open(os.path.join(repodir, ".git"), "w") as f: + f.write("gitdir: " + os.path.relpath(newpath, start=repodir)) + + if not os.path.exists(repodir): + parent = os.path.dirname(repodir) + if not os.path.isdir(parent): + os.makedirs(parent) + git.git_operation("submodule", "add", "--name", self.name, "--", url, self.path) + + if not repo_exists or not tmpurl: + git.git_operation("submodule", "update", "--init", "--", self.path) + + if self.fxtag and not optional: + smgit = GitInterface(repodir, self.logger) + smgit.git_operation("checkout", self.fxtag) + + if os.path.exists(os.path.join(repodir, ".gitmodules")): + # recursively handle this checkout + print(f"Recursively checking out submodules of {self.name} {optional}") + gitmodules = GitModules(self.logger, confpath=repodir) + requiredlist = ["AlwaysRequired"] + if optional: + requiredlist.append("AlwaysOptional") + submodules_checkout(gitmodules, repodir, requiredlist, force=force) + if not os.path.exists(os.path.join(repodir, ".git")): + utils.fatal_error( + f"Failed to checkout {self.name} {repo_exists} {tmpurl} {repodir} {self.path}" + ) + + if tmpurl: + print(git.git_operation("restore", ".gitmodules")) + if os.path.exists(os.path.join(self.path, ".git")): + submoddir = os.path.join(self.root_dir, self.path) + with utils.pushd(submoddir): + git = GitInterface(submoddir, self.logger) + # first make sure the url is correct + print("3calling ls-remote") + + newremote = self._add_remote(git) + + tags = git.git_operation("tag", "-l") + fxtag = self.fxtag + if fxtag and fxtag not in tags: + git.git_operation("fetch", newremote, "--tags") + atag = git.git_operation("describe", "--tags", "--always").rstrip() + if fxtag and fxtag != atag: + try: + git.git_operation("checkout", fxtag) + print(f"{self.name:>20} updated to {fxtag}") + except Exception as error: + print(error) + + + elif not fxtag: + print(f"No fxtag found for submodule {self.name:>20}") + else: + print(f"{self.name:>20} up to date.") + + + + return From 2b021fdd76e31b4c7addaae97db0241d557183a2 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Jul 2024 09:08:45 -0600 Subject: [PATCH 25/56] add documentation to submodule.py --- git_fleximod/submodule.py | 82 +++++++++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index f1c1b62984..dc27c3d00a 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -6,7 +6,24 @@ from git_fleximod.gitinterface import GitInterface class Submodule(): + """ + Represents a Git submodule with enhanced features for flexible management. + + Attributes: + name (str): The name of the submodule. + root_dir (str): The root directory of the main project. + path (str): The relative path from the root directory to the submodule. + url (str): The URL of the submodule repository. + fxurl (str): The URL for flexible submodule management (optional). + fxtag (str): The tag for flexible submodule management (optional). + fxsparse (str): Path to the sparse checkout file relative to the submodule path, see git-sparse-checkout for details (optional). + fxrequired (str): Indicates if the submodule is optional or required (optional). + logger (logging.Logger): Logger instance for logging (optional). + """ def __init__(self, root_dir, name, path, url, fxtag=None, fxurl=None, fxsparse=None, fxrequired=None, logger=None): + """ + Initializes a new Submodule instance with the provided attributes. + """ self.name = name self.root_dir = root_dir self.path = path @@ -19,6 +36,13 @@ def __init__(self, root_dir, name, path, url, fxtag=None, fxurl=None, fxsparse=N self.logger = logger def status(self): + """ + Checks the status of the submodule and returns 4 parameters: + - result (str): The status of the submodule. + - needsupdate (int): An indicator if the submodule needs to be updated. + - localmods (int): An indicator if the submodule has local modifications. + - testfails (int): An indicator if the submodule has failed a test, this is used for testing purposes. + """ smpath = os.path.join(self.root_dir, self.path) testfails = 0 localmods = 0 @@ -104,6 +128,19 @@ def status(self): def _add_remote(self, git): + """ + Adds a new remote to the submodule if it does not already exist. + + This method checks the existing remotes of the submodule. If the submodule's URL is not already listed as a remote, + it attempts to add a new remote. The name for the new remote is generated dynamically to avoid conflicts. If no + remotes exist, it defaults to naming the new remote 'origin'. + + Args: + git (GitInterface): An instance of GitInterface to perform git operations. + + Returns: + str: The name of the new remote if added, or the name of the existing remote that matches the submodule's URL. + """ remotes = git.git_operation("remote", "-v").splitlines() upstream = None if remotes: @@ -125,20 +162,27 @@ def _add_remote(self, git): return newremote def toplevel(self): + """ + Checks if the submodule is a top-level submodule (ie not a submodule of a submodule). + """ if self.fxrequired: return True if self.fxrequired.startswith("Top") else False def sparse_checkout(self): """ - This function performs a sparse checkout of a git submodule. It does so by first creating the .git/info/sparse-checkout fileq - in the submodule and then checking out the desired tag. If the submodule is already checked out, it will not be checked out again. - Creating the sparse-checkout file first prevents the entire submodule from being checked out and then removed. This is important - because the submodule may have a large number of files and checking out the entire submodule and then removing it would be time - and disk space consuming. + Performs a sparse checkout of the submodule. - Returns: + This method optimizes the checkout process by only checking out files specified in the submodule's sparse-checkout configuration, + rather than the entire submodule content. It achieves this by first ensuring the `.git/info/sparse-checkout` file is created and + configured in the submodule's directory. Then, it proceeds to checkout the desired tag. If the submodule has already been checked out, + this method will not perform the checkout again. + + This approach is particularly beneficial for submodules with a large number of files, as it significantly reduces the time and disk space + required for the checkout process by avoiding the unnecessary checkout and subsequent removal of unneeded files. + + Returns: None - """ + """ self.logger.info("Called sparse_checkout for {}".format(self.name)) rgit = GitInterface(self.root_dir, self.logger) superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") @@ -224,7 +268,29 @@ def sparse_checkout(self): rgit.config_set_value(f'submodule "{self.name}"', "url", self.url) def update(self, optional=None): - # function implementation... + """ + Updates the submodule to the latest or specified version. + + This method handles the update process of the submodule, including checking out the submodule into the specified path, + handling sparse checkouts if configured, and updating the submodule's URL if necessary. It supports both SSH and HTTPS URLs, + automatically converting SSH URLs to HTTPS to avoid issues for users without SSH keys. + + The update process involves the following steps: + 1. If the submodule is configured for sparse checkout, it performs a sparse checkout. + 2. If the submodule is not already checked out, it clones the submodule using the provided URL. + 3. If a specific tag or hash is provided, it checks out that tag; otherwise, it checks out the latest version. + 4. If the root `.git` is a file (indicating a submodule or a worktree), additional steps are taken to integrate the submodule properly. + + Args: + optional (bool): Indicates if the submodule is optional. This parameter is currently unused in the function but can be implemented for conditional updates based on the submodule's importance. + + Note: + - The method currently does not use the `optional` parameter, but it is designed for future use where updates can be conditional based on the submodule's importance. + - SSH URLs are automatically converted to HTTPS to accommodate users without SSH keys. + + Returns: + None + """ git = GitInterface(self.root_dir, self.logger) repodir = os.path.join(self.root_dir, self.path) self.logger.info("Checkout {} into {}/{}".format(self.name, self.root_dir, self.path)) From 143abac699cd344b978b3fcd4fc76b9e21c409a5 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Jul 2024 10:19:56 -0600 Subject: [PATCH 26/56] tests a-d all pass --- git_fleximod/git_fleximod.py | 204 ++++------------------------------- git_fleximod/submodule.py | 69 +++++------- 2 files changed, 47 insertions(+), 226 deletions(-) diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index 505d7222f0..e3adddb855 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -175,97 +175,6 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master rgit.config_set_value(f'submodule "{name}"', "active", "true") rgit.config_set_value(f'submodule "{name}"', "url", url) - -def single_submodule_checkout( - root, name, path, url=None, tag=None, force=False, optional=False -): - """ - This function checks out a single git submodule. - - Parameters: - root (str): The root directory for the git operation. - name (str): The name of the submodule. - path (str): The path to the submodule. - url (str, optional): The URL of the submodule. Defaults to None. - tag (str, optional): The tag to checkout. Defaults to None. - force (bool, optional): If set to True, forces the checkout operation. Defaults to False. - optional (bool, optional): If set to True, the submodule is considered optional. Defaults to False. - - Returns: - None - """ - # function implementation... - git = GitInterface(root, logger) - repodir = os.path.join(root, path) - logger.info("Checkout {} into {}/{}".format(name, root, path)) - # if url is provided update to the new url - tmpurl = None - repo_exists = False -# if os.path.exists(os.path.join(repodir, ".git")): -# logger.info("Submodule {} already checked out".format(name)) -# repo_exists = True - # Look for a .gitmodules file in the newly checkedout repo - if not repo_exists and url: - # ssh urls cause problems for those who dont have git accounts with ssh keys defined - # but cime has one since e3sm prefers ssh to https, because the .gitmodules file was - # opened with a GitModules object we don't need to worry about restoring the file here - # it will be done by the GitModules class - if url.startswith("git@"): - tmpurl = url - url = url.replace("git@github.com:", "https://github.com/") - git.git_operation("clone", url, path) - smgit = GitInterface(repodir, logger) - if not tag: - tag = smgit.git_operation("describe", "--tags", "--always").rstrip() - smgit.git_operation("checkout", tag) - # Now need to move the .git dir to the submodule location - rootdotgit = os.path.join(root, ".git") - if os.path.isfile(rootdotgit): - with open(rootdotgit) as f: - line = f.readline() - if line.startswith("gitdir: "): - rootdotgit = line[8:].rstrip() - - newpath = os.path.abspath(os.path.join(root, rootdotgit, "modules", name)) - if os.path.exists(newpath): - shutil.rmtree(os.path.join(repodir, ".git")) - else: - shutil.move(os.path.join(repodir, ".git"), newpath) - - with open(os.path.join(repodir, ".git"), "w") as f: - f.write("gitdir: " + os.path.relpath(newpath, start=repodir)) - - if not os.path.exists(repodir): - parent = os.path.dirname(repodir) - if not os.path.isdir(parent): - os.makedirs(parent) - git.git_operation("submodule", "add", "--name", name, "--", url, path) - - if not repo_exists or not tmpurl: - git.git_operation("submodule", "update", "--init", "--", path) - if tag and not optional: - smgit = GitInterface(repodir, logger) - smgit.git_operation("checkout", tag) - - if os.path.exists(os.path.join(repodir, ".gitmodules")): - # recursively handle this checkout - print(f"Recursively checking out submodules of {name} {optional}") - gitmodules = GitModules(logger, confpath=repodir) - requiredlist = ["AlwaysRequired"] - if optional: - requiredlist.append("AlwaysOptional") - submodules_checkout(gitmodules, repodir, requiredlist, force=force) - if not os.path.exists(os.path.join(repodir, ".git")): - utils.fatal_error( - f"Failed to checkout {name} {repo_exists} {tmpurl} {repodir} {path}" - ) - - if tmpurl: - print(git.git_operation("restore", ".gitmodules")) - - return - - def init_submodule_from_gitmodules(gitmodules, name, root_dir, logger): path = gitmodules.get(name, "path") url = gitmodules.get(name, "url") @@ -280,7 +189,7 @@ def submodules_status(gitmodules, root_dir, toplevel=False, depth=0): localmods = 0 needsupdate = 0 submodules = {} - wrapper = textwrap.TextWrapper(initial_indent=' '*depth, width=120,subsequent_indent=' '*(depth+20)) + wrapper = textwrap.TextWrapper(initial_indent=' '*(depth*10), width=120,subsequent_indent=' '*(depth*20)) for name in gitmodules.sections(): if not submodules or name not in submodules: submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) @@ -306,23 +215,15 @@ def git_toplevelroot(root_dir, logger): superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") return superroot - def submodules_update(gitmodules, root_dir, requiredlist, force): -# _, localmods, needsupdate = submodules_status(gitmodules, root_dir) -# if localmods and not force: -# local_mods_output() -# return -# if needsupdate == 0: -# return submodules = {} for name in gitmodules.sections(): if not submodules or name not in submodules: submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) _, needsupdate, localmods, testfails = submodules[name].status() - fxrequired = submodules[name].fxrequired - if not fxrequired: - fxrequired = "AlwaysRequired" - + if not submodules[name].fxrequired: + submodules[name].fxrequired = "AlwaysRequired" + fxrequired = submodules[name].fxrequired allowedvalues = fxrequired_allowed_values() assert fxrequired in allowedvalues @@ -334,32 +235,24 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): or fxrequired not in requiredlist) ): if "Optional" in fxrequired and "Optional" not in requiredlist: + print(f"Skipping optional component {name:>20}") if fxrequired.startswith("Always"): print(f"Skipping optional component {name:>20}") continue - -# if fxsparse: -# logger.debug( -# "Callng submodule_sparse_checkout({}, {}, {}, {}, {}, {}".format( -# root_dir, name, url, path, fxsparse, fxtag -# ) -# ) -# submodule_sparse_checkout(root_dir, name, url, path, fxsparse, tag=fxtag) -# else: - print(f"fxrequired {fxrequired} requiredlist {requiredlist}") - submodules[name].update(optional="AlwaysOptional") - -# single_submodule_checkout( -# root_dir, -# name, -# path, -# url=url, -# tag=fxtag, -# force=force, -# optional="AlwaysOptional" in requiredlist -# ) - - + optional = "AlwaysOptional" in requiredlist + print(f"1 Required list is {requiredlist} optional is {optional}") + if fxrequired in requiredlist: + submodules[name].update() + repodir = os.path.join(root_dir, submodules[name].path) + if os.path.exists(os.path.join(repodir, ".gitmodules")): + # recursively handle this checkout + print(f"Recursively checking out submodules of {name}") + gitmodules = GitModules(submodules[name].logger, confpath=repodir) + requiredlist = ["AlwaysRequired"] + if optional: + requiredlist.append("AlwaysOptional") + print(f"2 Required list is {requiredlist}") + submodules_update(gitmodules, repodir, requiredlist, force=force) def local_mods_output(): @@ -375,65 +268,6 @@ def local_mods_output(): """ print(text) -# checkout is done by update if required so this function may be depricated -def submodules_checkout(gitmodules, root_dir, requiredlist, force=False): - """ - This function checks out all git submodules based on the provided parameters. - - Parameters: - gitmodules (ConfigParser): The gitmodules configuration. - root_dir (str): The root directory for the git operation. - requiredlist (list): The list of required modules. - force (bool, optional): If set to True, forces the checkout operation. Defaults to False. - - Returns: - None - """ - # function implementation... - print("") - _, localmods, needsupdate = submodules_status(gitmodules, root_dir) - if localmods and not force: - local_mods_output() - return - if not needsupdate: - return - for name in gitmodules.sections(): - fxrequired = gitmodules.get(name, "fxrequired") - fxsparse = gitmodules.get(name, "fxsparse") - fxtag = gitmodules.get(name, "fxtag") - path = gitmodules.get(name, "path") - url = gitmodules.get(name, "url") - superroot = git_toplevelroot(root_dir, logger) - if fxrequired and fxrequired not in requiredlist: - if fxrequired == "AlwaysOptional" or (superroot == root_dir): - print(f"Skipping optional component {name:>20} {requiredlist}") - continue - - - if fxsparse: - logger.debug( - "Callng submodule_sparse_checkout({}, {}, {}, {}, {}, {}".format( - root_dir, name, url, path, fxsparse, fxtag - ) - ) - submodule_sparse_checkout(root_dir, name, url, path, fxsparse, tag=fxtag) - else: - logger.debug( - "Calling submodule_checkout({},{},{})".format(root_dir, name, path) - ) - single_submodule_checkout( - root_dir, - name, - path, - url=url, - tag=fxtag, - force=force, - optional="AlwaysOptional" == fxrequired \ - or "ToplevelOptional" == fxrequired \ - or "TopLevelOptional" == fxrequired - ) - - def submodules_test(gitmodules, root_dir): """ This function tests the git submodules based on the provided parameters. diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index dc27c3d00a..a3e5624e54 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -32,23 +32,28 @@ def __init__(self, root_dir, name, path, url, fxtag=None, fxurl=None, fxsparse=N self.fxurl = fxurl self.fxtag = fxtag self.fxsparse = fxsparse - self.fxrequired = fxrequired + if fxrequired: + self.fxrequired = fxrequired + else: + self.fxrequired = "AlwaysRequired" self.logger = logger def status(self): """ Checks the status of the submodule and returns 4 parameters: - result (str): The status of the submodule. - - needsupdate (int): An indicator if the submodule needs to be updated. - - localmods (int): An indicator if the submodule has local modifications. - - testfails (int): An indicator if the submodule has failed a test, this is used for testing purposes. + - needsupdate (bool): An indicator if the submodule needs to be updated. + - localmods (bool): An indicator if the submodule has local modifications. + - testfails (bool): An indicator if the submodule has failed a test, this is used for testing purposes. """ smpath = os.path.join(self.root_dir, self.path) - testfails = 0 - localmods = 0 - needsupdate = 0 + testfails = False + localmods = False + needsupdate = False ahash = None - optional = " (optional)" if "Optional" in self.fxrequired else None + optional = "" + if "Optional" in self.fxrequired: + optional = " (optional)" required = None level = None if not os.path.exists(os.path.join(smpath, ".git")): @@ -71,7 +76,8 @@ def status(self): if hhash and atag: break if self.fxtag and (ahash == hhash or atag == self.fxtag): - result = f"e {self.name:>20} not checked out, aligned at tag {self.fxtag}{optional} {level} {required}" + result = f"e {self.name:>20} not checked out, aligned at tag {self.fxtag}{optional}" + needsupdate = True elif self.fxtag: ahash = rootgit.git_operation( "submodule", "status", "{}".format(self.path) @@ -81,18 +87,19 @@ def status(self): result = f"e {self.name:>20} not checked out, aligned at hash {ahash}{optional}" else: result = f"e {self.name:>20} not checked out, out of sync at tag {atag}, expected tag is {self.fxtag}{optional}" - testfails += 1 + testfails = True + needsupdate = True else: result = f"e {self.name:>20} has no fxtag defined in .gitmodules{optional}" - testfails += 1 + testfails = True else: with utils.pushd(smpath): git = GitInterface(smpath, self.logger) remote = git.git_operation("remote").rstrip() if remote == '': result = f"e {self.name:>20} has no associated remote" - testfails += 1 - needsupdate += 1 + testfails = True + needsupdate = True return result, needsupdate, localmods, testfails rurl = git.git_operation("ls-remote","--get-url").rstrip() atag = git.git_operation("describe", "--tags", "--always").rstrip() @@ -113,15 +120,15 @@ def status(self): recurse = True elif self.fxtag: result = f"s {self.name:>20} {atag} {ahash} is out of sync with .gitmodules {self.fxtag}" - testfails += 1 - needsupdate += 1 + testfails = True + needsupdate = True else: result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {atag}" - testfails += 1 + testfails = True status = git.git_operation("status", "--ignore-submodules", "-uno") if "nothing to commit" not in status: - localmods = localmods + 1 + localmods = True result = "M" + textwrap.indent(status, " ") return result, needsupdate, localmods, testfails @@ -161,13 +168,6 @@ def _add_remote(self, git): git.git_operation("remote", "add", newremote, self.url) return newremote - def toplevel(self): - """ - Checks if the submodule is a top-level submodule (ie not a submodule of a submodule). - """ - if self.fxrequired: - return True if self.fxrequired.startswith("Top") else False - def sparse_checkout(self): """ Performs a sparse checkout of the submodule. @@ -267,7 +267,7 @@ def sparse_checkout(self): rgit.config_set_value(f'submodule "{self.name}"', "active", "true") rgit.config_set_value(f'submodule "{self.name}"', "url", self.url) - def update(self, optional=None): + def update(self): """ Updates the submodule to the latest or specified version. @@ -282,10 +282,8 @@ def update(self, optional=None): 4. If the root `.git` is a file (indicating a submodule or a worktree), additional steps are taken to integrate the submodule properly. Args: - optional (bool): Indicates if the submodule is optional. This parameter is currently unused in the function but can be implemented for conditional updates based on the submodule's importance. - + None Note: - - The method currently does not use the `optional` parameter, but it is designed for future use where updates can be conditional based on the submodule's importance. - SSH URLs are automatically converted to HTTPS to accommodate users without SSH keys. Returns: @@ -339,23 +337,15 @@ def update(self, optional=None): parent = os.path.dirname(repodir) if not os.path.isdir(parent): os.makedirs(parent) - git.git_operation("submodule", "add", "--name", self.name, "--", url, self.path) + git.git_operation("submodule", "add", "--name", self.name, "--", self.url, self.path) if not repo_exists or not tmpurl: git.git_operation("submodule", "update", "--init", "--", self.path) - if self.fxtag and not optional: + if self.fxtag: smgit = GitInterface(repodir, self.logger) smgit.git_operation("checkout", self.fxtag) - if os.path.exists(os.path.join(repodir, ".gitmodules")): - # recursively handle this checkout - print(f"Recursively checking out submodules of {self.name} {optional}") - gitmodules = GitModules(self.logger, confpath=repodir) - requiredlist = ["AlwaysRequired"] - if optional: - requiredlist.append("AlwaysOptional") - submodules_checkout(gitmodules, repodir, requiredlist, force=force) if not os.path.exists(os.path.join(repodir, ".git")): utils.fatal_error( f"Failed to checkout {self.name} {repo_exists} {tmpurl} {repodir} {self.path}" @@ -368,10 +358,7 @@ def update(self, optional=None): with utils.pushd(submoddir): git = GitInterface(submoddir, self.logger) # first make sure the url is correct - print("3calling ls-remote") - newremote = self._add_remote(git) - tags = git.git_operation("tag", "-l") fxtag = self.fxtag if fxtag and fxtag not in tags: From 62a338b531bbf858b5d941d4f8f7af5166328dcf Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Jul 2024 10:33:31 -0600 Subject: [PATCH 27/56] all pytests now passing --- git_fleximod/submodule.py | 6 ++++++ tests/test_e_complex_update.py | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index a3e5624e54..68fb08d6de 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -168,6 +168,12 @@ def _add_remote(self, git): git.git_operation("remote", "add", newremote, self.url) return newremote + def toplevel(self): + """ + Returns True if the submodule is Toplevel (either Required or Optional) + """ + return True if "Top" in self.fxrequired else False + def sparse_checkout(self): """ Performs a sparse checkout of the submodule. diff --git a/tests/test_e_complex_update.py b/tests/test_e_complex_update.py index 44998f186f..0c3ab4c6a6 100644 --- a/tests/test_e_complex_update.py +++ b/tests/test_e_complex_update.py @@ -9,7 +9,6 @@ def test_complex_update(git_fleximod, complex_update, logger): assert("AlwaysRequired not checked out, aligned at tag MPIserial_2.4.0" in status.stdout) assert("Complex not checked out, out of sync at tag testtag02, expected tag is testtag3" in status.stdout) assert("AlwaysOptional not checked out, out of sync at tag None, expected tag is MPIserial_2.3.0" in status.stdout) - print(f"status before is {status.stdout}") # This should checkout and update test_submodule and complex_sub result = git_fleximod(complex_update, "update") @@ -20,7 +19,7 @@ def test_complex_update(git_fleximod, complex_update, logger): assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) assert("Complex at tag testtag3" in status.stdout) - print(f"status after is {status.stdout}") + # now check the complex_sub root = (complex_update / "modules" / "complex") assert(not (root / "libraries" / "gptl" / ".git").exists()) @@ -59,9 +58,11 @@ def test_complex_update(git_fleximod, complex_update, logger): root = (complex_update / "modules" / "complex" ) assert(not (root / "libraries" / "gptl" / ".git").exists()) assert(not (root / "libraries" / "mpi-serial" / ".git").exists()) - assert((root / "modules" / "mpi-serial" / ".git").exists()) - assert((root / "modules" / "mpi-serial2" / ".git").exists()) + assert(not (root / "modules" / "mpi-serial" / ".git").exists()) + assert((root / "modules" / "mpi-serialAR" / ".git").exists()) + assert((root / "modules" / "mpi-serialSAR" / ".git").exists()) assert((root / "modules" / "mpi-sparse" / ".git").exists()) + assert((root / "modules" / "mpi-serial2" / ".git").exists()) assert((root / "modules" / "mpi-sparse" / "m4").exists()) assert(not (root / "modules" / "mpi-sparse" / "README").exists()) From ded91fda0c896e5967b6df8dd2d18895f9dae096 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Jul 2024 12:15:29 -0600 Subject: [PATCH 28/56] all tests passing, issue #50 fixed --- git_fleximod/git_fleximod.py | 15 ++++++++------- git_fleximod/submodule.py | 13 +++++++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index e3adddb855..c4e595d85b 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -215,11 +215,13 @@ def git_toplevelroot(root_dir, logger): superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") return superroot -def submodules_update(gitmodules, root_dir, requiredlist, force): - submodules = {} +def submodules_update(gitmodules, root_dir, requiredlist, force, submodules=None): + if not submodules: + submodules = {} for name in gitmodules.sections(): if not submodules or name not in submodules: submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) + _, needsupdate, localmods, testfails = submodules[name].status() if not submodules[name].fxrequired: submodules[name].fxrequired = "AlwaysRequired" @@ -235,24 +237,23 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): or fxrequired not in requiredlist) ): if "Optional" in fxrequired and "Optional" not in requiredlist: - print(f"Skipping optional component {name:>20}") if fxrequired.startswith("Always"): print(f"Skipping optional component {name:>20}") continue optional = "AlwaysOptional" in requiredlist - print(f"1 Required list is {requiredlist} optional is {optional}") + if fxrequired in requiredlist: submodules[name].update() repodir = os.path.join(root_dir, submodules[name].path) if os.path.exists(os.path.join(repodir, ".gitmodules")): # recursively handle this checkout print(f"Recursively checking out submodules of {name}") - gitmodules = GitModules(submodules[name].logger, confpath=repodir) + gitsubmodules = GitModules(submodules[name].logger, confpath=repodir) requiredlist = ["AlwaysRequired"] if optional: requiredlist.append("AlwaysOptional") - print(f"2 Required list is {requiredlist}") - submodules_update(gitmodules, repodir, requiredlist, force=force) + + submodules_update(gitsubmodules, repodir, requiredlist, force=force, submodules=submodules) def local_mods_output(): diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index 68fb08d6de..daa0fef090 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -102,8 +102,17 @@ def status(self): needsupdate = True return result, needsupdate, localmods, testfails rurl = git.git_operation("ls-remote","--get-url").rstrip() - atag = git.git_operation("describe", "--tags", "--always").rstrip() - ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] + line = git.git_operation("log", "--pretty=format:\"%h %d").partition('\n')[0] + parts = line.split() + ahash = parts[0][1:] + if len(parts) > 3: + atag = parts[3][:-1] + else: + atag = None + + #print(f"line is {line} ahash is {ahash} atag is {atag}") + # atag = git.git_operation("describe", "--tags", "--always").rstrip() + # ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] recurse = False if rurl != self.url: From dae1c82884feb69249dd0616c2a18131252ef4d2 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Jul 2024 12:45:32 -0600 Subject: [PATCH 29/56] now working with issue #50 --- git_fleximod/git_fleximod.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index c4e595d85b..2e282af434 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -215,9 +215,8 @@ def git_toplevelroot(root_dir, logger): superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") return superroot -def submodules_update(gitmodules, root_dir, requiredlist, force, submodules=None): - if not submodules: - submodules = {} +def submodules_update(gitmodules, root_dir, requiredlist, force): + submodules = {} for name in gitmodules.sections(): if not submodules or name not in submodules: submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) @@ -249,12 +248,11 @@ def submodules_update(gitmodules, root_dir, requiredlist, force, submodules=None # recursively handle this checkout print(f"Recursively checking out submodules of {name}") gitsubmodules = GitModules(submodules[name].logger, confpath=repodir) - requiredlist = ["AlwaysRequired"] + newrequiredlist = ["AlwaysRequired"] if optional: - requiredlist.append("AlwaysOptional") - - submodules_update(gitsubmodules, repodir, requiredlist, force=force, submodules=submodules) + newrequiredlist.append("AlwaysOptional") + submodules_update(gitsubmodules, repodir, newrequiredlist, force=force) def local_mods_output(): text = """\ From 53fce573bcad0ca1ae5c78013df8a42ad3414e5b Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Jul 2024 16:10:22 -0600 Subject: [PATCH 30/56] no need to make submodule objects persist --- git_fleximod/git_fleximod.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index 2e282af434..e28499de87 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -188,19 +188,17 @@ def submodules_status(gitmodules, root_dir, toplevel=False, depth=0): testfails = 0 localmods = 0 needsupdate = 0 - submodules = {} wrapper = textwrap.TextWrapper(initial_indent=' '*(depth*10), width=120,subsequent_indent=' '*(depth*20)) for name in gitmodules.sections(): - if not submodules or name not in submodules: - submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) + submod = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) - result,n,l,t = submodules[name].status() + result,n,l,t = submod.status() testfails += t localmods += l needsupdate += n - if toplevel or not submodules[name].toplevel(): + if toplevel or not submod.toplevel(): print(wrapper.fill(result)) - subdir = os.path.join(root_dir, submodules[name].path) + subdir = os.path.join(root_dir, submod.path) if os.path.exists(os.path.join(subdir, ".gitmodules")): submod = GitModules(logger, confpath=subdir) t,l,n = submodules_status(submod, subdir, depth=depth+1) @@ -216,15 +214,13 @@ def git_toplevelroot(root_dir, logger): return superroot def submodules_update(gitmodules, root_dir, requiredlist, force): - submodules = {} for name in gitmodules.sections(): - if not submodules or name not in submodules: - submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) + submod = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) - _, needsupdate, localmods, testfails = submodules[name].status() - if not submodules[name].fxrequired: - submodules[name].fxrequired = "AlwaysRequired" - fxrequired = submodules[name].fxrequired + _, needsupdate, localmods, testfails = submod.status() + if not submod.fxrequired: + submod.fxrequired = "AlwaysRequired" + fxrequired = submod.fxrequired allowedvalues = fxrequired_allowed_values() assert fxrequired in allowedvalues @@ -242,12 +238,12 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): optional = "AlwaysOptional" in requiredlist if fxrequired in requiredlist: - submodules[name].update() - repodir = os.path.join(root_dir, submodules[name].path) + submod.update() + repodir = os.path.join(root_dir, submod.path) if os.path.exists(os.path.join(repodir, ".gitmodules")): # recursively handle this checkout print(f"Recursively checking out submodules of {name}") - gitsubmodules = GitModules(submodules[name].logger, confpath=repodir) + gitsubmodules = GitModules(submod.logger, confpath=repodir) newrequiredlist = ["AlwaysRequired"] if optional: newrequiredlist.append("AlwaysOptional") From 3142760d61afd0dd1a241ffcde558e171aaf97a5 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 5 Jul 2024 07:25:33 -0600 Subject: [PATCH 31/56] update externals and compset names and aliases --- .gitmodules | 152 +++++++++++++++-------------- ccs_config | 2 +- cime | 2 +- cime_config/config_compsets.xml | 16 +-- cime_config/config_pes.xml | 20 ++-- cime_config/testlist_allactive.xml | 22 ++--- components/cam | 2 +- components/cism | 2 +- components/clm | 2 +- components/cmeps | 2 +- components/mom | 2 +- libraries/mpi-serial | 2 +- 12 files changed, 115 insertions(+), 111 deletions(-) diff --git a/.gitmodules b/.gitmodules index 783c52e8bf..39a5608ea5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,33 +26,32 @@ # repository branches. # - [submodule "ccs_config"] path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git - fxtag = ccs_config_cesm0.0.109 + fxtag = ccs_config_cesm1.0.0 fxrequired = ToplevelRequired -[submodule "share"] - path = share - url = https://github.com/ESCOMP/CESM_share - fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share - fxtag = share1.1.2 - fxrequired = ToplevelRequired - [submodule "cime"] path = cime url = https://github.com/ESMCI/cime fxDONOTUSEurl = https://github.com/ESMCI/cime - fxtag = cime6.0.246 + fxtag = cime6.1.0 fxrequired = ToplevelRequired -[submodule "mpi-serial"] - path = libraries/mpi-serial - url = https://github.com/ESMCI/mpi-serial - fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial - fxtag = MPIserial_2.5.0 +[submodule "fms"] + path = libraries/FMS + url = https://github.com/ESCOMP/FMS_interface + fxDONOTUSEurl = https://github.com/ESCOMP/FMS_interface + fxrequired = ToplevelRequired + fxtag = fi_240516 + +[submodule "share"] + path = share + url = https://github.com/ESCOMP/CESM_share + fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share + fxtag = share1.1.2 fxrequired = ToplevelRequired [submodule "cam"] @@ -62,13 +61,48 @@ fxtag = cam6_4_001 fxrequired = ToplevelRequired -[submodule "ww3"] - path = components/ww3 - url = https://github.com/ESCOMP/WW3_interface - fxDONOTUSEurl = https://github.com/ESCOMP/WW3_interface - fxtag = ww3i_0.0.2 +[submodule "clm"] + path = components/clm + url = https://github.com/ESCOMP/CTSM + fxDONOTUSEurl = https://github.com/ESCOMP/CTSM fxrequired = ToplevelRequired - + fxtag = ctsm5.2.007 + +[submodule "cice"] + path = components/cice + url = https://github.com/ESCOMP/CESM_CICE + fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE + fxrequired = ToplevelRequired + fxtag = cesm_cice6_5_0_9 + +[submodule "mom"] + path = components/mom + url = https://github.com/ESCOMP/MOM_interface + fxDONOTUSEurl = https://github.com/ESCOMP/MOM_interface + fxrequired = ToplevelRequired + fxtag = mi_240522 + +[submodule "cism"] + path = components/cism + url = https://github.com/ESCOMP/cism-wrapper.git + fxDONOTUSEurl = https://github.com/ESCOMP/cism-wrapper.git + fxtag = cismwrap_2_2_002 + fxrequired = ToplevelRequired + +[submodule "cdeps"] + path = components/cdeps + url = https://github.com/ESCOMP/CDEPS + fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS + fxrequired = ToplevelRequired + fxtag = cdeps1.0.43 + +[submodule "cmeps"] + path = components/cmeps + url = https://github.com/ESCOMP/CMEPS.git + fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git + fxrequired = ToplevelRequired + fxtag = cmeps1.0.0 + [submodule "rtm"] path = components/rtm url = https://github.com/ESCOMP/RTM @@ -76,20 +110,13 @@ fxrequired = ToplevelRequired fxtag = rtm1_0_80 -[submodule "pysect"] - path = tools/statistical_ensemble_test/pyCECT - url = https://github.com/NCAR/PyCECT - fxDONOTUSEurl = https://github.com/NCAR/PyCECT - fxrequired = ToplevelRequired - fxtag = 3.2.2 - -[submodule "mosart"] - path = components/mosart - url = https://github.com/ESCOMP/MOSART - fxDONOTUSEurl = https://github.com/ESCOMP/MOSART +[submodule "ww3"] + path = components/ww3 + url = https://github.com/ESCOMP/WW3_interface + fxDONOTUSEurl = https://github.com/ESCOMP/WW3_interface + fxtag = ww3i_0.0.2 fxrequired = ToplevelRequired - fxtag = mosart1.1.02 - + [submodule "mizuroute"] path = components/mizuroute url = https://github.com/ESCOMP/mizuRoute @@ -97,13 +124,13 @@ fxrequired = ToplevelRequired fxtag = cesm-coupling.n02_v2.1.3 -[submodule "fms"] - path = libraries/FMS - url = https://github.com/ESCOMP/FMS_interface - fxDONOTUSEurl = https://github.com/ESCOMP/FMS_interface +[submodule "mosart"] + path = components/mosart + url = https://github.com/ESCOMP/MOSART + fxDONOTUSEurl = https://github.com/ESCOMP/MOSART fxrequired = ToplevelRequired - fxtag = fi_240516 - + fxtag = mosart1.1.02 + [submodule "parallelio"] path = libraries/parallelio url = https://github.com/NCAR/ParallelIO @@ -111,44 +138,21 @@ fxrequired = ToplevelRequired fxtag = pio2_6_2 -[submodule "cdeps"] - path = components/cdeps - url = https://github.com/ESCOMP/CDEPS - fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS +[submodule "mpi-serial"] + path = libraries/mpi-serial + url = https://github.com/ESMCI/mpi-serial + fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial + fxtag = MPIserial_2.5.0 fxrequired = ToplevelRequired - fxtag = cdeps1.0.43 -[submodule "cmeps"] - path = components/cmeps - url = https://github.com/ESCOMP/CMEPS.git - fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git +[submodule "pysect"] + path = tools/statistical_ensemble_test/pyCECT + url = https://github.com/NCAR/PyCECT + fxDONOTUSEurl = https://github.com/NCAR/PyCECT fxrequired = ToplevelRequired - fxtag = cmeps1.0.0 + fxtag = 3.2.2 -[submodule "cice"] - path = components/cice - url = https://github.com/ESCOMP/CESM_CICE - fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE - fxrequired = ToplevelRequired - fxtag = cesm_cice6_5_0_9 -[submodule "cism"] - path = components/cism - url = https://github.com/ESCOMP/cism-wrapper.git - fxDONOTUSEurl = https://github.com/ESCOMP/cism-wrapper.git - fxtag = cismwrap_2_2_002 - fxrequired = ToplevelRequired + -[submodule "clm"] - path = components/clm - url = https://github.com/ESCOMP/CTSM - fxDONOTUSEurl = https://github.com/ESCOMP/CTSM - fxrequired = ToplevelRequired - fxtag = ctsm5.2.008 -[submodule "mom"] - path = components/mom - url = https://github.com/ESCOMP/MOM_interface - fxDONOTUSEurl = https://github.com/ESCOMP/MOM_interface - fxrequired = ToplevelRequired - fxtag = mi_240522 diff --git a/ccs_config b/ccs_config index 797acd7014..69a958581e 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 797acd7014f10c8e46e50403cbf0fdf52230a2b5 +Subproject commit 69a958581ecd2d32ee9cb1c38bcd3847b8b920bf diff --git a/cime b/cime index 9b2ff92bba..fcb9c6ec1e 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit 9b2ff92bba1b43765dbb1acf0f0c82d451d6141f +Subproject commit fcb9c6ec1e15f2f33995cf247aef3f8ef9f121eb diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 3c1f8c1024..6d0581b190 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -39,23 +39,23 @@ - BLT1850 - 1850_CAM70%LT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + B1850C_LSC + 1850C_CAM70%LT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV - BLTHIST - HIST_CAM70%LT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + BHISTC_LSC + HIST_CAM70%LT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV - BMT1850 - 1850_CAM70%MT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + B1850C_MSC + 1850_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV - BMTHIST - HIST_CAM70%MT_CLM51%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + BHISTC_MSC + HIST_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV diff --git a/cime_config/config_pes.xml b/cime_config/config_pes.xml index 3caf46aabd..3a6a624466 100644 --- a/cime_config/config_pes.xml +++ b/cime_config/config_pes.xml @@ -46,12 +46,12 @@ 20 ypd/ 7100 pe-hrs/simyr expected 5400 - 939 - 64 - 4397 - 488 - 64 - 64 + 1792 + 1792 + 3608 + 612 + 4 + 1 5400 @@ -68,10 +68,10 @@ 0 0 0 - 1003 - 5400 - 0 - 0 + 1792 + 5404 + 5400 + 5400 0 diff --git a/cime_config/testlist_allactive.xml b/cime_config/testlist_allactive.xml index 96a25671c8..1a4281cba0 100644 --- a/cime_config/testlist_allactive.xml +++ b/cime_config/testlist_allactive.xml @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -16,7 +16,7 @@ - + @@ -24,7 +24,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -82,7 +82,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -121,7 +121,7 @@ - + diff --git a/components/cam b/components/cam index 68b342ebf9..62110abe52 160000 --- a/components/cam +++ b/components/cam @@ -1 +1 @@ -Subproject commit 68b342ebf95a33ea070b9e7dd3533d294f0fccb1 +Subproject commit 62110abe5269bc6081ff5bc91278aff67de8b394 diff --git a/components/cism b/components/cism index 3d3047b299..c84cc9f5b3 160000 --- a/components/cism +++ b/components/cism @@ -1 +1 @@ -Subproject commit 3d3047b299678d83cfa5fe3f778b7485fea7d238 +Subproject commit c84cc9f5b3103766a35d0a7ddd5e9dbd7deae762 diff --git a/components/clm b/components/clm index 4edaa461a4..0e34348ace 160000 --- a/components/clm +++ b/components/clm @@ -1 +1 @@ -Subproject commit 4edaa461a4cbd56bf98c5014aa85b9cd84e7fe3c +Subproject commit 0e34348aceafc229a2d002a2a7e8710bef61e395 diff --git a/components/cmeps b/components/cmeps index 1605a750fd..47fb4e633a 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 1605a750fdc5f0b646017335bf4879df8a1719dd +Subproject commit 47fb4e633a76ec6d60969b1af751f90790387246 diff --git a/components/mom b/components/mom index da96f40927..2f3c373332 160000 --- a/components/mom +++ b/components/mom @@ -1 +1 @@ -Subproject commit da96f40927f58b8841407cffa93c502f8740d1f8 +Subproject commit 2f3c37333280fc66de1795d48209b7ff267e6e74 diff --git a/libraries/mpi-serial b/libraries/mpi-serial index 8e89b43b95..2c44fb3d32 160000 --- a/libraries/mpi-serial +++ b/libraries/mpi-serial @@ -1 +1 @@ -Subproject commit 8e89b43b957571deebf4a3c12b67672a6a986c12 +Subproject commit 2c44fb3d327be7c6429894bc5d4de769f3486848 From 10546a898e0220927e1c96f5b47bbcf8f43a31f3 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 5 Jul 2024 07:33:01 -0600 Subject: [PATCH 32/56] update git-fleximod to v0.8.0 --- .lib/git-fleximod/git_fleximod/cli.py | 2 +- .lib/git-fleximod/pyproject.toml | 2 +- .lib/git-fleximod/tbump.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.lib/git-fleximod/git_fleximod/cli.py b/.lib/git-fleximod/git_fleximod/cli.py index 25fce68fdf..80cce85fda 100644 --- a/.lib/git-fleximod/git_fleximod/cli.py +++ b/.lib/git-fleximod/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.7.9" +__version__ = "0.8.0" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree diff --git a/.lib/git-fleximod/pyproject.toml b/.lib/git-fleximod/pyproject.toml index 52cc26e7a7..7f65fa1ca0 100644 --- a/.lib/git-fleximod/pyproject.toml +++ b/.lib/git-fleximod/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.7.9" +version = "0.8.0" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/.lib/git-fleximod/tbump.toml b/.lib/git-fleximod/tbump.toml index b1d08a5611..89621b644e 100644 --- a/.lib/git-fleximod/tbump.toml +++ b/.lib/git-fleximod/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.7.9" +current = "0.8.0" # Example of a semver regexp. # Make sure this matches current_version before From c624b61124d911f52ca8eead618ed2dd3c1b2171 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 5 Jul 2024 08:30:57 -0600 Subject: [PATCH 33/56] Bump to 0.8.0 --- git_fleximod/cli.py | 2 +- pyproject.toml | 2 +- tbump.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index 25fce68fdf..80cce85fda 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.7.9" +__version__ = "0.8.0" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree diff --git a/pyproject.toml b/pyproject.toml index 52cc26e7a7..7f65fa1ca0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.7.9" +version = "0.8.0" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index b1d08a5611..89621b644e 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.7.9" +current = "0.8.0" # Example of a semver regexp. # Make sure this matches current_version before From e9cd2bee6200f7bde68dec6e10d5491e3171cc4d Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 8 Jul 2024 09:49:35 -0600 Subject: [PATCH 34/56] better fix for issue with ssh access --- git_fleximod/git_fleximod.py | 4 +++- git_fleximod/gitinterface.py | 10 ++++++++-- git_fleximod/submodule.py | 29 +++++++++++++---------------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index e28499de87..4595cd2ab2 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -93,7 +93,8 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master """ logger.info("Called sparse_checkout for {}".format(name)) rgit = GitInterface(root_dir, logger) - superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") + superroot = git_toplevelroot(root_dir, logger) + if superroot: gitroot = superroot.strip() else: @@ -178,6 +179,7 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master def init_submodule_from_gitmodules(gitmodules, name, root_dir, logger): path = gitmodules.get(name, "path") url = gitmodules.get(name, "url") + assert path and url, f"Malformed .gitmodules file {path} {url}" tag = gitmodules.get(name, "fxtag") fxurl = gitmodules.get(name, "fxDONOTUSEurl") fxsparse = gitmodules.get(name, "fxsparse") diff --git a/git_fleximod/gitinterface.py b/git_fleximod/gitinterface.py index c7462b3a15..5831201446 100644 --- a/git_fleximod/gitinterface.py +++ b/git_fleximod/gitinterface.py @@ -49,8 +49,14 @@ def _init_git_repo(self): # pylint: disable=unused-argument def git_operation(self, operation, *args, **kwargs): - command = self._git_command(operation, *args) - self.logger.info(command) + newargs = [] + for a in args: + # Do not use ssh interface + if isinstance(a, str): + a = a.replace("git@github.com:", "https://github.com/") + newargs.append(a) + + command = self._git_command(operation, *newargs) if isinstance(command, list): try: return utils.execute_subprocess(command, output_to_caller=True) diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index daa0fef090..713ea344de 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -26,8 +26,7 @@ def __init__(self, root_dir, name, path, url, fxtag=None, fxurl=None, fxsparse=N """ self.name = name self.root_dir = root_dir - self.path = path - url = url.replace("git@github.com:", "https://github.com/") + self.path = path self.url = url self.fxurl = fxurl self.fxtag = fxtag @@ -46,6 +45,7 @@ def status(self): - localmods (bool): An indicator if the submodule has local modifications. - testfails (bool): An indicator if the submodule has failed a test, this is used for testing purposes. """ + smpath = os.path.join(self.root_dir, self.path) testfails = False localmods = False @@ -162,8 +162,7 @@ def _add_remote(self, git): if remotes: upstream = git.git_operation("ls-remote", "--get-url").rstrip() newremote = "newremote.00" - - line = next((s for s in remotes if self.url in s), None) + line = next((s for s in remotes if self.url or tmpurl in s), None) if line: newremote = line.split()[0] return newremote @@ -281,6 +280,7 @@ def sparse_checkout(self): print(f"Successfully checked out {self.name:>20} at {self.fxtag}") rgit.config_set_value(f'submodule "{self.name}"', "active", "true") rgit.config_set_value(f'submodule "{self.name}"', "url", self.url) + rgit.config_set_value(f'submodule "{self.name}"', "path", self.path) def update(self): """ @@ -308,11 +308,11 @@ def update(self): repodir = os.path.join(self.root_dir, self.path) self.logger.info("Checkout {} into {}/{}".format(self.name, self.root_dir, self.path)) # if url is provided update to the new url - tmpurl = None + tag = None repo_exists = False - # if os.path.exists(os.path.join(repodir, ".git")): - # self.logger.info("Submodule {} already checked out".format(self.name)) - # repo_exists = True + if os.path.exists(os.path.join(repodir, ".git")): + self.logger.info("Submodule {} already checked out".format(self.name)) + repo_exists = True # Look for a .gitmodules file in the newly checkedout repo if self.fxsparse: print(f"Sparse checkout {self.name} fxsparse {self.fxsparse}") @@ -324,9 +324,7 @@ def update(self): # opened with a GitModules object we don't need to worry about restoring the file here # it will be done by the GitModules class if self.url.startswith("git@"): - tmpurl = self.url - url = self.url.replace("git@github.com:", "https://github.com/") - git.git_operation("clone", url, self.path) + git.git_operation("clone", self.url, self.path) smgit = GitInterface(repodir, self.logger) if not tag: tag = smgit.git_operation("describe", "--tags", "--always").rstrip() @@ -347,14 +345,14 @@ def update(self): with open(os.path.join(repodir, ".git"), "w") as f: f.write("gitdir: " + os.path.relpath(newpath, start=repodir)) - + if not os.path.exists(repodir): parent = os.path.dirname(repodir) if not os.path.isdir(parent): os.makedirs(parent) git.git_operation("submodule", "add", "--name", self.name, "--", self.url, self.path) - if not repo_exists or not tmpurl: + if not repo_exists: git.git_operation("submodule", "update", "--init", "--", self.path) if self.fxtag: @@ -363,11 +361,10 @@ def update(self): if not os.path.exists(os.path.join(repodir, ".git")): utils.fatal_error( - f"Failed to checkout {self.name} {repo_exists} {tmpurl} {repodir} {self.path}" + f"Failed to checkout {self.name} {repo_exists} {repodir} {self.path}" ) - if tmpurl: - print(git.git_operation("restore", ".gitmodules")) + if os.path.exists(os.path.join(self.path, ".git")): submoddir = os.path.join(self.root_dir, self.path) with utils.pushd(submoddir): From a6e43fcfd70795763c0fed13d3b0d8ae9151dcc7 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 8 Jul 2024 10:08:29 -0600 Subject: [PATCH 35/56] Bump to 0.8.1 --- git_fleximod/cli.py | 2 +- pyproject.toml | 2 +- tbump.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index 80cce85fda..139083344d 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.8.0" +__version__ = "0.8.1" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree diff --git a/pyproject.toml b/pyproject.toml index 7f65fa1ca0..ef8f541f15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.8.0" +version = "0.8.1" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index 89621b644e..0b0d5ac7ae 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.8.0" +current = "0.8.1" # Example of a semver regexp. # Make sure this matches current_version before From d3d80061c0735a60bff3e480672de5179ce4f169 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 8 Jul 2024 13:28:14 -0600 Subject: [PATCH 36/56] update externals --- .gitmodules | 2 +- cime_config/config_compsets.xml | 6 +++--- cime_config/testlist_allactive.xml | 14 +++++++++----- components/cam | 2 +- components/cism | 2 +- components/clm | 2 +- components/mom | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.gitmodules b/.gitmodules index 39a5608ea5..8e2739b262 100644 --- a/.gitmodules +++ b/.gitmodules @@ -80,7 +80,7 @@ url = https://github.com/ESCOMP/MOM_interface fxDONOTUSEurl = https://github.com/ESCOMP/MOM_interface fxrequired = ToplevelRequired - fxtag = mi_240522 + fxtag = mi_240705 [submodule "cism"] path = components/cism diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 6d0581b190..567ce20cac 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -45,17 +45,17 @@ BHISTC_LSC - HIST_CAM70%LT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + HISTC_CAM70%LT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV B1850C_MSC - 1850_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + 1850C_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV BHISTC_MSC - HIST_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + HISTC_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV diff --git a/cime_config/testlist_allactive.xml b/cime_config/testlist_allactive.xml index 1a4281cba0..fd4aedc90a 100644 --- a/cime_config/testlist_allactive.xml +++ b/cime_config/testlist_allactive.xml @@ -11,12 +11,13 @@ + - + @@ -24,15 +25,16 @@ - + - + - + + @@ -82,6 +84,7 @@ + @@ -94,13 +97,14 @@ + - + diff --git a/components/cam b/components/cam index 62110abe52..302680ab82 160000 --- a/components/cam +++ b/components/cam @@ -1 +1 @@ -Subproject commit 62110abe5269bc6081ff5bc91278aff67de8b394 +Subproject commit 302680ab829647e37bc17098979b99f2932b3b7a diff --git a/components/cism b/components/cism index c84cc9f5b3..d46b607b4e 160000 --- a/components/cism +++ b/components/cism @@ -1 +1 @@ -Subproject commit c84cc9f5b3103766a35d0a7ddd5e9dbd7deae762 +Subproject commit d46b607b4eac2ec5bf4c3c4adab76f506d8e2627 diff --git a/components/clm b/components/clm index 0e34348ace..4670b6e2c3 160000 --- a/components/clm +++ b/components/clm @@ -1 +1 @@ -Subproject commit 0e34348aceafc229a2d002a2a7e8710bef61e395 +Subproject commit 4670b6e2c3df9af6d03eb900cd0eed4877eaab59 diff --git a/components/mom b/components/mom index 2f3c373332..7b33fdbffe 160000 --- a/components/mom +++ b/components/mom @@ -1 +1 @@ -Subproject commit 2f3c37333280fc66de1795d48209b7ff267e6e74 +Subproject commit 7b33fdbffe31dfa9db9ec61d310596b580c01dbb From 6bc7b0c95f1af421326261784d42f4918bd58566 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 8 Jul 2024 13:40:02 -0600 Subject: [PATCH 37/56] update fully coupled compset names --- cime_config/config_compsets.xml | 40 ++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 567ce20cac..984cf28632 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -58,6 +58,27 @@ HISTC_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + + + BLT1850 + 1850_CAM70%LT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + + + + BLTHIST + HIST_CAM70%LT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + + + + BMT1850 + 1850_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + + + + BMTHIST + HIST_CAM70%MT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_SWAV + + @@ -78,22 +99,15 @@ 1850_CAM60_CLM50%SP_CICE_DOCN%SOM_MOSART_SGLC_SWAV_TEST - - - B1850 - 1850_CAM60_CLM50%BGC-CROP_CICE_MOM6_MOSART_CISM2%GRIS-NOEVOLVE_SWAV_BGC%BDRD - - - - 0001-01-01 - 0001-01-01 - 1850-01-01 - 1955-01-01 - 2005-01-01 - 2013-01-01 + 0001-01-01 + 0001-01-01 + 1850-01-01 + 1955-01-01 + 2005-01-01 + 2013-01-01 From a90de4f8481e9c28a682da3189f84948dffd1bd8 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 9 Jul 2024 11:01:49 -0600 Subject: [PATCH 38/56] update to fetch tag first --- git_fleximod/submodule.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index 713ea344de..48657272ee 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -1,6 +1,7 @@ import os import textwrap import shutil +import string from configparser import NoOptionError from git_fleximod import utils from git_fleximod.gitinterface import GitInterface @@ -162,7 +163,8 @@ def _add_remote(self, git): if remotes: upstream = git.git_operation("ls-remote", "--get-url").rstrip() newremote = "newremote.00" - line = next((s for s in remotes if self.url or tmpurl in s), None) + tmpurl = self.url.replace("git@github.com:", "https://github.com/") + line = next((s for s in remotes if self.url in s or tmpurl in s), None) if line: newremote = line.split()[0] return newremote @@ -357,6 +359,13 @@ def update(self): if self.fxtag: smgit = GitInterface(repodir, self.logger) + newremote = self._add_remote(smgit) + # Trying to distingush a tag from a hash + allowed = set(string.digits + 'abcdef') + if not set(self.fxtag) <= allowed: + # This is a tag + tag = f"refs/tags/{self.fxtag}:refs/tags/{self.fxtag}" + smgit.git_operation("fetch", newremote, tag) smgit.git_operation("checkout", self.fxtag) if not os.path.exists(os.path.join(repodir, ".git")): From 75a03373577f5ed19a00d2c387ca36bff1172d76 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 9 Jul 2024 11:14:56 -0600 Subject: [PATCH 39/56] Bump to 0.8.2 --- git_fleximod/cli.py | 2 +- pyproject.toml | 2 +- tbump.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index 139083344d..fdcf102a19 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.8.1" +__version__ = "0.8.2" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree diff --git a/pyproject.toml b/pyproject.toml index ef8f541f15..9cff1423c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.8.1" +version = "0.8.2" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index 0b0d5ac7ae..b4eed7d40c 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.8.1" +current = "0.8.2" # Example of a semver regexp. # Make sure this matches current_version before From 81da99831fbc3654e4a7ddcc85a8e98ccf4f3d17 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 9 Jul 2024 11:18:12 -0600 Subject: [PATCH 40/56] update externals --- .gitmodules | 2 +- components/cam | 2 +- components/cmeps | 2 +- doc/source/cesm_configurations.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8e2739b262..6e3f25124c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -101,7 +101,7 @@ url = https://github.com/ESCOMP/CMEPS.git fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git fxrequired = ToplevelRequired - fxtag = cmeps1.0.0 + fxtag = cmeps1.0.1 [submodule "rtm"] path = components/rtm diff --git a/components/cam b/components/cam index 302680ab82..62110abe52 160000 --- a/components/cam +++ b/components/cam @@ -1 +1 @@ -Subproject commit 302680ab829647e37bc17098979b99f2932b3b7a +Subproject commit 62110abe5269bc6081ff5bc91278aff67de8b394 diff --git a/components/cmeps b/components/cmeps index 47fb4e633a..c2ef06d14b 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 47fb4e633a76ec6d60969b1af751f90790387246 +Subproject commit c2ef06d14ba74f7786aa616d3df26bda1f6c2afb diff --git a/doc/source/cesm_configurations.rst b/doc/source/cesm_configurations.rst index ad9a7e5024..88df6a53f7 100644 --- a/doc/source/cesm_configurations.rst +++ b/doc/source/cesm_configurations.rst @@ -70,7 +70,7 @@ The CESM2 components can be summarized as follows: .. csv-table:: "CESM2 model components" :header: "Component Generic Type", "Component Generic Name", "Component Name", "Component Type", "Description" - :widths: 12, 10, 10, 10, 60 + :widths: 12, 10, 10, 8, 60 "atmosphere","atm","cam", "active","The `Community Atmosphere Model (CAM) `_ is a global atmospheric general circulation model developed from the NCAR CCM3." "atmosphere","atm","datm", "data", "The `data atmosphere `_ component is a pure data component that reads in atmospheric forcing data" From aaf15160d06bb55a4eb9763c2c8e24123145bdc8 Mon Sep 17 00:00:00 2001 From: Chris Fischer Date: Wed, 10 Jul 2024 16:07:15 -0600 Subject: [PATCH 41/56] Update for cesm3_0_alpha02a --- .gitmodules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 783c52e8bf..804ce09a3b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,7 +31,7 @@ path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git - fxtag = ccs_config_cesm0.0.109 + fxtag = ccs_config_cesm1.1.0 fxrequired = ToplevelRequired [submodule "share"] @@ -45,7 +45,7 @@ path = cime url = https://github.com/ESMCI/cime fxDONOTUSEurl = https://github.com/ESMCI/cime - fxtag = cime6.0.246 + fxtag = cime6.1.0 fxrequired = ToplevelRequired [submodule "mpi-serial"] @@ -123,7 +123,7 @@ url = https://github.com/ESCOMP/CMEPS.git fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git fxrequired = ToplevelRequired - fxtag = cmeps1.0.0 + fxtag = cmeps1.0.2 [submodule "cice"] path = components/cice @@ -144,11 +144,11 @@ url = https://github.com/ESCOMP/CTSM fxDONOTUSEurl = https://github.com/ESCOMP/CTSM fxrequired = ToplevelRequired - fxtag = ctsm5.2.008 + fxtag = ctsm5.2.009 [submodule "mom"] path = components/mom url = https://github.com/ESCOMP/MOM_interface fxDONOTUSEurl = https://github.com/ESCOMP/MOM_interface fxrequired = ToplevelRequired - fxtag = mi_240522 + fxtag = mi_240705 From 5026d6aa2ebe539b4810b6ae188db7b229553681 Mon Sep 17 00:00:00 2001 From: Chris Fischer Date: Thu, 11 Jul 2024 12:47:53 -0600 Subject: [PATCH 42/56] Fix ccs_config typo in tag name. --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 804ce09a3b..e97725e3ea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,7 +31,7 @@ path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git - fxtag = ccs_config_cesm1.1.0 + fxtag = ccs_config_cesm1.0.0 fxrequired = ToplevelRequired [submodule "share"] From 50f57820aae081a06a0f580f2a9e1e83a89d63a1 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 23 Jul 2024 06:30:59 -0600 Subject: [PATCH 43/56] updates for alpha02b --- .gitmodules | 4 ++-- components/cam | 2 +- components/cice | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 0d997e2b61..f18a9d1ce9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,7 +58,7 @@ path = components/cam url = https://www.github.com/ESCOMP/CAM fxDONOTUSEurl = https://www.github.com/ESCOMP/CAM - fxtag = cam6_4_001 + fxtag = cam6_4_014 fxrequired = ToplevelRequired [submodule "clm"] @@ -73,7 +73,7 @@ url = https://github.com/ESCOMP/CESM_CICE fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE fxrequired = ToplevelRequired - fxtag = cesm_cice6_5_0_9 + fxtag = cesm_cice6_5_0_12 [submodule "mom"] path = components/mom diff --git a/components/cam b/components/cam index 62110abe52..87f3b5d774 160000 --- a/components/cam +++ b/components/cam @@ -1 +1 @@ -Subproject commit 62110abe5269bc6081ff5bc91278aff67de8b394 +Subproject commit 87f3b5d77441fdfa331075c4824ff8deacea18d2 diff --git a/components/cice b/components/cice index bdf6ea04d6..f14ec8339b 160000 --- a/components/cice +++ b/components/cice @@ -1 +1 @@ -Subproject commit bdf6ea04d6133434fcaa4de5336de106f01290d0 +Subproject commit f14ec8339bc5bc4a7a0664da5e247b5cfda531a1 From 6ee78d6b454167fcb08fc229aab786b6a2e6cc61 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 23 Jul 2024 07:32:05 -0600 Subject: [PATCH 44/56] correct count of test fails --- git_fleximod/git_fleximod.py | 15 ++++++++------- git_fleximod/submodule.py | 13 +++++++++---- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index 4595cd2ab2..50e0ef83df 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -195,18 +195,19 @@ def submodules_status(gitmodules, root_dir, toplevel=False, depth=0): submod = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) result,n,l,t = submod.status() - testfails += t - localmods += l - needsupdate += n if toplevel or not submod.toplevel(): print(wrapper.fill(result)) - subdir = os.path.join(root_dir, submod.path) - if os.path.exists(os.path.join(subdir, ".gitmodules")): - submod = GitModules(logger, confpath=subdir) - t,l,n = submodules_status(submod, subdir, depth=depth+1) testfails += t localmods += l needsupdate += n + subdir = os.path.join(root_dir, submod.path) + if os.path.exists(os.path.join(subdir, ".gitmodules")): + gsubmod = GitModules(logger, confpath=subdir) + t,l,n = submodules_status(gsubmod, subdir, depth=depth+1) + if toplevel or not submod.toplevel(): + testfails += t + localmods += l + needsupdate += n return testfails, localmods, needsupdate diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index 48657272ee..8e1dc733e8 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -92,7 +92,7 @@ def status(self): needsupdate = True else: result = f"e {self.name:>20} has no fxtag defined in .gitmodules{optional}" - testfails = True + testfails = False else: with utils.pushd(smpath): git = GitInterface(smpath, self.logger) @@ -122,9 +122,11 @@ def status(self): if self.fxtag and atag == self.fxtag: result = f" {self.name:>20} at tag {self.fxtag}" recurse = True + testfails = False elif self.fxtag and ahash[: len(self.fxtag)] == self.fxtag: result = f" {self.name:>20} at hash {ahash}" recurse = True + testfails = False elif atag == ahash: result = f" {self.name:>20} at hash {ahash}" recurse = True @@ -133,14 +135,17 @@ def status(self): testfails = True needsupdate = True else: - result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {atag}" - testfails = True + if atag: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {atag}" + else: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {ahash}" + testfails = False status = git.git_operation("status", "--ignore-submodules", "-uno") if "nothing to commit" not in status: localmods = True result = "M" + textwrap.indent(status, " ") - +# print(f"result {result} needsupdate {needsupdate} localmods {localmods} testfails {testfails}") return result, needsupdate, localmods, testfails From 733fcf2e2642775cce7e30bc49f6c7aeec674819 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 23 Jul 2024 07:33:33 -0600 Subject: [PATCH 45/56] update git-fleximod to count test fails correctly --- .lib/git-fleximod/git_fleximod/git_fleximod.py | 15 ++++++++------- .lib/git-fleximod/git_fleximod/submodule.py | 13 +++++++++---- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.lib/git-fleximod/git_fleximod/git_fleximod.py b/.lib/git-fleximod/git_fleximod/git_fleximod.py index 4595cd2ab2..50e0ef83df 100755 --- a/.lib/git-fleximod/git_fleximod/git_fleximod.py +++ b/.lib/git-fleximod/git_fleximod/git_fleximod.py @@ -195,18 +195,19 @@ def submodules_status(gitmodules, root_dir, toplevel=False, depth=0): submod = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) result,n,l,t = submod.status() - testfails += t - localmods += l - needsupdate += n if toplevel or not submod.toplevel(): print(wrapper.fill(result)) - subdir = os.path.join(root_dir, submod.path) - if os.path.exists(os.path.join(subdir, ".gitmodules")): - submod = GitModules(logger, confpath=subdir) - t,l,n = submodules_status(submod, subdir, depth=depth+1) testfails += t localmods += l needsupdate += n + subdir = os.path.join(root_dir, submod.path) + if os.path.exists(os.path.join(subdir, ".gitmodules")): + gsubmod = GitModules(logger, confpath=subdir) + t,l,n = submodules_status(gsubmod, subdir, depth=depth+1) + if toplevel or not submod.toplevel(): + testfails += t + localmods += l + needsupdate += n return testfails, localmods, needsupdate diff --git a/.lib/git-fleximod/git_fleximod/submodule.py b/.lib/git-fleximod/git_fleximod/submodule.py index 48657272ee..8e1dc733e8 100644 --- a/.lib/git-fleximod/git_fleximod/submodule.py +++ b/.lib/git-fleximod/git_fleximod/submodule.py @@ -92,7 +92,7 @@ def status(self): needsupdate = True else: result = f"e {self.name:>20} has no fxtag defined in .gitmodules{optional}" - testfails = True + testfails = False else: with utils.pushd(smpath): git = GitInterface(smpath, self.logger) @@ -122,9 +122,11 @@ def status(self): if self.fxtag and atag == self.fxtag: result = f" {self.name:>20} at tag {self.fxtag}" recurse = True + testfails = False elif self.fxtag and ahash[: len(self.fxtag)] == self.fxtag: result = f" {self.name:>20} at hash {ahash}" recurse = True + testfails = False elif atag == ahash: result = f" {self.name:>20} at hash {ahash}" recurse = True @@ -133,14 +135,17 @@ def status(self): testfails = True needsupdate = True else: - result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {atag}" - testfails = True + if atag: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {atag}" + else: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {ahash}" + testfails = False status = git.git_operation("status", "--ignore-submodules", "-uno") if "nothing to commit" not in status: localmods = True result = "M" + textwrap.indent(status, " ") - +# print(f"result {result} needsupdate {needsupdate} localmods {localmods} testfails {testfails}") return result, needsupdate, localmods, testfails From f0b88588130e1cdbe4f6454db838a405799f601f Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 23 Jul 2024 09:56:47 -0600 Subject: [PATCH 46/56] update to catch test --- .lib/git-fleximod/git_fleximod/git_fleximod.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.lib/git-fleximod/git_fleximod/git_fleximod.py b/.lib/git-fleximod/git_fleximod/git_fleximod.py index 50e0ef83df..7c764c0c82 100755 --- a/.lib/git-fleximod/git_fleximod/git_fleximod.py +++ b/.lib/git-fleximod/git_fleximod/git_fleximod.py @@ -200,15 +200,15 @@ def submodules_status(gitmodules, root_dir, toplevel=False, depth=0): testfails += t localmods += l needsupdate += n + subdir = os.path.join(root_dir, submod.path) if os.path.exists(os.path.join(subdir, ".gitmodules")): gsubmod = GitModules(logger, confpath=subdir) t,l,n = submodules_status(gsubmod, subdir, depth=depth+1) - if toplevel or not submod.toplevel(): - testfails += t - localmods += l - needsupdate += n - + testfails += t + localmods += l + needsupdate += n + return testfails, localmods, needsupdate def git_toplevelroot(root_dir, logger): From 0cab2f57f1e8d969fc2757f3578f13c3ba14c6ce Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 08:26:41 -0600 Subject: [PATCH 47/56] add pelayout for MT fully coupled case --- cime_config/config_pes.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/cime_config/config_pes.xml b/cime_config/config_pes.xml index 3a6a624466..ddb34f752b 100644 --- a/cime_config/config_pes.xml +++ b/cime_config/config_pes.xml @@ -42,6 +42,39 @@ + + + + 5400 + 1816 + 1816 + 3584 + 408 + 4 + 1 + 5400 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + 3584 + 3584 + 0 + 5400 + 0 + 0 + 0 + + 20 ypd/ 7100 pe-hrs/simyr expected From 0a4ea71b8764a9dc4db3edfa164cb91d918ebfcd Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 09:48:22 -0600 Subject: [PATCH 48/56] update the way tags are identified --- git_fleximod/submodule.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index 8e1dc733e8..3abf6153fe 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -106,10 +106,16 @@ def status(self): line = git.git_operation("log", "--pretty=format:\"%h %d").partition('\n')[0] parts = line.split() ahash = parts[0][1:] + atag = None if len(parts) > 3: - atag = parts[3][:-1] - else: - atag = None + idx = 0 + while idx < len(parts)-1: + idx = idx+1 + if parts[idx] == 'tag:': + atag = parts[idx+1][:-1] + if atag == self.fxtag: + break + #print(f"line is {line} ahash is {ahash} atag is {atag}") # atag = git.git_operation("describe", "--tags", "--always").rstrip() From 36b4b921c9a12b7197cc7812f5fb08cfb012489e Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 09:52:37 -0600 Subject: [PATCH 49/56] Bump to 0.8.3 --- git_fleximod/cli.py | 2 +- pyproject.toml | 2 +- tbump.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index fdcf102a19..b7bc8078c6 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.8.2" +__version__ = "0.8.3" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree diff --git a/pyproject.toml b/pyproject.toml index 9cff1423c8..7b0354bdd6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.8.2" +version = "0.8.3" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index b4eed7d40c..3b6813a28b 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.8.2" +current = "0.8.3" # Example of a semver regexp. # Make sure this matches current_version before From e1f5a3887be612490b7d79fe6464c3caec674b09 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 10:52:50 -0600 Subject: [PATCH 50/56] update externals --- .gitmodules | 6 +++--- ccs_config | 2 +- components/cam | 2 +- components/cmeps | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index f337ee6818..db7831645a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,7 +30,7 @@ path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git - fxtag = ccs_config_cesm1.0.0 + fxtag = ccs_config_cesm1.0.1 fxrequired = ToplevelRequired [submodule "cime"] @@ -58,7 +58,7 @@ path = components/cam url = https://www.github.com/ESCOMP/CAM fxDONOTUSEurl = https://www.github.com/ESCOMP/CAM - fxtag = cam6_4_014 + fxtag = cam6_4_015 fxrequired = ToplevelRequired [submodule "clm"] @@ -101,7 +101,7 @@ url = https://github.com/ESCOMP/CMEPS.git fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git fxrequired = ToplevelRequired - fxtag = cmeps1.0.2 + fxtag = cmeps1.0.5 [submodule "rtm"] path = components/rtm diff --git a/ccs_config b/ccs_config index 69a958581e..97ee0d2ca1 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 69a958581ecd2d32ee9cb1c38bcd3847b8b920bf +Subproject commit 97ee0d2ca1d1a4066a492cedcafe380ad5ccc6ad diff --git a/components/cam b/components/cam index 87f3b5d774..fe60b8dd70 160000 --- a/components/cam +++ b/components/cam @@ -1 +1 @@ -Subproject commit 87f3b5d77441fdfa331075c4824ff8deacea18d2 +Subproject commit fe60b8dd70e4aa740b2b3e6917f348a9833c6113 diff --git a/components/cmeps b/components/cmeps index 1b8920c3bf..10ffcc820b 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 1b8920c3bf6c64056d6c1b1b88393617de2fefa3 +Subproject commit 10ffcc820ba1af602478c41dc51b660bcd7705fb From e705f726891b48e88af0acf9a124d8574948bef3 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 11:21:33 -0600 Subject: [PATCH 51/56] fix hash id and tag parsing --- git_fleximod/submodule.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/git_fleximod/submodule.py b/git_fleximod/submodule.py index 3abf6153fe..70a3018a42 100644 --- a/git_fleximod/submodule.py +++ b/git_fleximod/submodule.py @@ -103,7 +103,7 @@ def status(self): needsupdate = True return result, needsupdate, localmods, testfails rurl = git.git_operation("ls-remote","--get-url").rstrip() - line = git.git_operation("log", "--pretty=format:\"%h %d").partition('\n')[0] + line = git.git_operation("log", "--pretty=format:\"%h %d\"").partition('\n')[0] parts = line.split() ahash = parts[0][1:] atag = None @@ -112,12 +112,14 @@ def status(self): while idx < len(parts)-1: idx = idx+1 if parts[idx] == 'tag:': - atag = parts[idx+1][:-1] + atag = parts[idx+1] + while atag.endswith(')') or atag.endswith(',') or atag.endswith("\""): + atag = atag[:-1] if atag == self.fxtag: break - #print(f"line is {line} ahash is {ahash} atag is {atag}") + #print(f"line is {line} ahash is {ahash} atag is {atag} {parts}") # atag = git.git_operation("describe", "--tags", "--always").rstrip() # ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] @@ -129,7 +131,7 @@ def status(self): result = f" {self.name:>20} at tag {self.fxtag}" recurse = True testfails = False - elif self.fxtag and ahash[: len(self.fxtag)] == self.fxtag: + elif self.fxtag and (ahash[: len(self.fxtag)] == self.fxtag or (self.fxtag.find(ahash)==0)): result = f" {self.name:>20} at hash {ahash}" recurse = True testfails = False From 548e0b3195a9901f727cf7035ba415ab38d9fe08 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 11:27:16 -0600 Subject: [PATCH 52/56] update cam external --- .gitmodules | 2 +- components/cam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index db7831645a..ad2624242d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,7 +58,7 @@ path = components/cam url = https://www.github.com/ESCOMP/CAM fxDONOTUSEurl = https://www.github.com/ESCOMP/CAM - fxtag = cam6_4_015 + fxtag = cam6_4_016 fxrequired = ToplevelRequired [submodule "clm"] diff --git a/components/cam b/components/cam index fe60b8dd70..3e9a281e58 160000 --- a/components/cam +++ b/components/cam @@ -1 +1 @@ -Subproject commit fe60b8dd70e4aa740b2b3e6917f348a9833c6113 +Subproject commit 3e9a281e580d1c370d09e591ac9e4926c8e7cd48 From 7fc2aef78dc1a6d332e64588a0b383940a532228 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 11:40:25 -0600 Subject: [PATCH 53/56] update fully coupled test list --- cime_config/testlist_allactive.xml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/cime_config/testlist_allactive.xml b/cime_config/testlist_allactive.xml index 5de0a80012..54f6a61180 100644 --- a/cime_config/testlist_allactive.xml +++ b/cime_config/testlist_allactive.xml @@ -1,6 +1,6 @@ - + @@ -8,7 +8,16 @@ - + + + + + + + + + + @@ -17,7 +26,7 @@ - + @@ -34,7 +43,7 @@ - + @@ -42,7 +51,7 @@ - + @@ -85,7 +94,7 @@ - + @@ -104,7 +113,7 @@ - + @@ -125,7 +134,7 @@ - + From 8f78adcb0386cf496de377b9a92705e44f3f9a37 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 11:42:28 -0600 Subject: [PATCH 54/56] Bump to 0.8.4 --- git_fleximod/cli.py | 2 +- pyproject.toml | 2 +- tbump.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index b7bc8078c6..b6f728f881 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.8.3" +__version__ = "0.8.4" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree diff --git a/pyproject.toml b/pyproject.toml index 7b0354bdd6..850e57d59d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.8.3" +version = "0.8.4" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index 3b6813a28b..bd82c557ad 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.8.3" +current = "0.8.4" # Example of a semver regexp. # Make sure this matches current_version before From 4cac3e5a2c74de05727bec1f3e560e55adc53cee Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Jul 2024 14:05:43 -0600 Subject: [PATCH 55/56] update cmeps --- .gitmodules | 2 +- components/cmeps | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ad2624242d..c9571cf782 100644 --- a/.gitmodules +++ b/.gitmodules @@ -101,7 +101,7 @@ url = https://github.com/ESCOMP/CMEPS.git fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git fxrequired = ToplevelRequired - fxtag = cmeps1.0.5 + fxtag = cmeps1.0.6 [submodule "rtm"] path = components/rtm diff --git a/components/cmeps b/components/cmeps index 10ffcc820b..452005149d 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 10ffcc820ba1af602478c41dc51b660bcd7705fb +Subproject commit 452005149deea59768410c296b09b8457fd06bcd From 66e11fc136f6e6b224932cf193208af74eb3d43f Mon Sep 17 00:00:00 2001 From: Chris Fischer Date: Mon, 29 Jul 2024 16:36:17 -0600 Subject: [PATCH 56/56] Update for cesm3_0_alpha02b --- ChangeLog | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) diff --git a/ChangeLog b/ChangeLog index 540de01a7f..244cb5e053 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,157 @@ +============================================================== +Tag name: cesm3_0_alpha02b +Originator(s): CSEG +Date: 29 July 2024 +One-line Summary: CAM answer changing tag + +components/cam https://github.com/ESCOMP/CAM/cam6_4_016 ** +components/cice https://github.com/ESCOMP/CESM_CICE/tree/cesm_cice6_5_0_12 ** +cime https://github.com/ESMCI/cime/tree/cime6.1.0 -- +share https://github.com/ESCOMP/CESM_share/tree/share1.1.2 -- +ccs_config https://github.com/ESMCI/ccs_config_cesm/tree/ccs_config_cesm1.0.1 ** +components/cmeps https://github.com/ESCOMP/CMEPS/tree/cmeps1.0.6 ** +components/cdeps https://github.com/ESCOMP/CDEPS/tree/cdeps1.0.43 -- +components/cism https://github.com/ESCOMP/cism-wrapper/tree/cismwrap_2_2_002 -- +components/clm https://github.com/ESCOMP/ctsm/tree/ctsm5.2.009 -- +components/fms https://github.com/ESCOMP/FMS_interface/tree/fi_240516 -- +components/mizuroute https://github.com/ESCOMP/mizuRoute/tree/cesm-coupling.n02_v2.1.3 -- +components/mom https://github.com/ESCOMP/MOM_interface/mi_240705 -- +components/mosart https://github.com/ESCOMP/mosart/tree/mosart1_1_02 -- +components/rtm https://github.com/ESCOMP/rtm/tree/rtm1_0_80 -- +components/ww3 https://github.com/ESCOMP/WW3-CESM/tree/ww3i_0.0.2 -- +libraries/parallelio https://github.com/NCAR/ParallilIO/tree/pio2_6_2 -- + +cam + Cheryl Craig 2024-07-23 - cam6_4_016 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_xxx + + Modify RRTMGP interface for MT configurations. Answers also change + for LT and cam6 tests using RRTMGP. + + + Cheryl Craig 2024-07-23 - cam6_4_015 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_015 + + For Brian Eaton + + Misc bug fixes, buildcpp reports errors in CAM configure, SILHS outputting subcolumns with zeroes fix, remove solar_htng_spctrl_scl from aquaplanet case + + + Francis Vitt 2024-07-22 - cam6_4_014 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_014 + + Clean up WACCMX use of ESMF gridded component + + + Francis Vitt 2024-07-21 - cam6_4_013 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_013 + + Aerosol wet removal bug fixes + + + Francis Vitt 2024-07-19 - cam6_4_012 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_012 + + Add climate-chemistry compset + + + Cheryl Craig 2024-07-19 - cam6_4_011 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_011 + + For Brian Eaton and Cheryl Craig + + Update submodules, git-fleximod; fix fv3 build; remove mct reference + + + Cheryl Craig 2024-07-16 - cam6_4_010 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_010 + + GW moving mountains + + Answer changing for CAM7 + + + Brian Dobbins 2024-07-11 - cam6_4_009 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_009 + + Changes older log-gamma function for an F2008 intrinsic. This is answer-changing, but only in certain WACCMX configurations. + + + Cheryl Craig 2024-07-10 - cam6_4_008 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_008 + + HB mods + dycore mods + + Answer changing for all SE dycore and CLUBB runs + + + Michael Waxmonsky 2024-07-10 - cam6_4_007 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_007 + + CCPP-ized TJ2016 #1070 + + + Brian Eaton 2024-07-03 - cam6_4_006 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_006 + + Fix CLUBB interface bug. + + + Brian Eaton 2024-07-01 - cam6_4_005 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_005 + + Limit vertical domain used by COSP + + + Francis Vitt 2024-06-29 - cam6_4_004 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_004 + + Misc corrections for WACCMX + + + Brian Eaton 2024-06-26 - cam6_4_002 - components/cam (cesm3_0_beta02) + https://github.com/ESCOMP/CAM/tags/cam6_4_002 + + Activate additional clubb diffusion in cam6. + + +ccs_config + James Edwards 2024-07-25 - ccs_config_cesm1.0.1 - ccs_config (cesm3_0_beta02) + https://github.com/ESMCI/ccs_config_cesm/tags/ccs_config_cesm1.0.1 + + Removes some obsolete grid definitions + + +cesm + James Edwards 2024-07-25 - cesm3_0_alpha02b - (cesm3_0_beta02) + https://github.com/ESCOMP/cesm/tags/cesm3.0.beta02 - not sure what this should be? + + Add pelayout for B1850MT. Update git-fleximod to v0.8.4 + + +cice + David Bailey 2024-07-02 - cesm_cice6_5_0_12 - components/cice (cesm3_0_beta02) + https://github.com/ESCOMP/CESM_CICE/tags/cesm_cice6_5_0_11 + + This fixes some of the git-fleximod stuff and updates the CICE version + from cice6_5_0_20231221 to cice6_5_0_20240702. + + Also removes the annual restarts from CICE. + + +cmeps + James Edwards 2024-07-25 - cmeps1.0.6 - src/drivers/nuopc/ (cesm3_0_beta02) + https://github.com/ESCOMP/CMEPS/tags/cmeps1.0.6 + + Fix merge error in med_phases_aoflux_mod.F90 + + + James Edwards 2024-07-25 - cmeps1.0.5 - src/drivers/nuopc/ (cesm3_0_beta02) + https://github.com/ESCOMP/CMEPS/tags/cmeps1.0.5 + + Declare cnt variable needed with ESMF_AWARE_THREADING + + ============================================================== Tag name: cesm3_0_alpha02a Originator(s): CSEG