Skip to content

Commit aa54473

Browse files
committed
update submodules
1 parent 0f7d429 commit aa54473

36 files changed

+3050
-34
lines changed

.gitmodules

Lines changed: 78 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,90 @@
11
[submodule "fates"]
2-
path = src/fates
3-
url = https://github.com/NGEET/fates
2+
path = src/fates
3+
url = https://github.com/NGEET/fates
4+
fxtag = sci.1.73.0_api.35.0.0
5+
fxrequired = AlwaysRequired
6+
fxDONOTUSEurl = https://github.com/NCAR/fates-release
7+
48
[submodule "cism"]
5-
path = components/cism
6-
url = https://github.com/ESCOMP/CISM-wrapper
7-
[submodule "mosart"]
8-
path = components/mosart
9-
url = https://github.com/ESCOMP/MOSART
9+
path = components/cism
10+
url = https://github.com/ESCOMP/CISM-wrapper
11+
fxtag = cismwrap_2_2_001
12+
fxrequired = ToplevelRequired
13+
fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper
14+
1015
[submodule "rtm"]
11-
path = components/rtm
12-
url = https://github.com/ESCOMP/RTM
16+
path = components/rtm
17+
url = https://github.com/ESCOMP/RTM
18+
fxtag = rtm1_0_79
19+
fxrequired = ToplevelRequired
20+
fxDONOTUSEurl = https://github.com/ESCOMP/RTM
21+
22+
[submodule "mosart"]
23+
path = components/mosart
24+
url = https://github.com/ESCOMP/MOSART
25+
fxtag = mosart1_0_49
26+
fxrequired = ToplevelRequired
27+
fxDONOTUSEurl = https://github.com/ESCOMP/MOSART
28+
1329
[submodule "mizuRoute"]
14-
path = components/mizuRoute
15-
url = https://github.com/ESCOMP/mizuRoute
30+
path = components/mizuRoute
31+
url = https://github.com/ESCOMP/mizuRoute
32+
fxtag = cesm-coupling.n02_v2.1.2
33+
fxrequired = ToplevelRequired
34+
fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
35+
1636
[submodule "ccs_config"]
17-
path = ccs_config
18-
url = https://github.com/ESMCI/ccs_config_cesm.git
37+
path = ccs_config
38+
url = https://github.com/ESMCI/ccs_config_cesm.git
39+
fxtag = ccs_config_cesm0.0.106
40+
fxrequired = ToplevelRequired
41+
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
42+
1943
[submodule "cime"]
20-
path = cime
21-
url = https://github.com/ESMCI/cime
44+
path = cime
45+
url = https://github.com/ESMCI/cime
46+
fxtag = cime6.0.246
47+
fxrequired = ToplevelRequired
48+
fxDONOTUSEurl = https://github.com/ESMCI/cime
49+
2250
[submodule "cmeps"]
23-
path = components/cmeps
24-
url = https://github.com/ESCOMP/CMEPS.git
51+
path = components/cmeps
52+
url = https://github.com/ESCOMP/CMEPS.git
53+
fxtag = cmeps0.14.63
54+
fxrequired = ToplevelRequired
55+
fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git
56+
2557
[submodule "cdeps"]
26-
path = components/cdeps
27-
url = https://github.com/ESCOMP/CDEPS.git
58+
path = components/cdeps
59+
url = https://github.com/ESCOMP/CDEPS.git
60+
fxtag = cdeps1.0.34
61+
fxrequired = ToplevelRequired
62+
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git
63+
2864
[submodule "share"]
29-
path = share
30-
url = https://github.com/ESCOMP/CESM_share
65+
path = share
66+
url = https://github.com/ESCOMP/CESM_share
67+
fxtag = share1.0.19
68+
fxrequired = ToplevelRequired
69+
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share
70+
3171
[submodule "mct"]
32-
path = libraries/mct
33-
url = https://github.com/MCSclimate/MCT
72+
path = libraries/mct
73+
url = https://github.com/MCSclimate/MCT
74+
fxtag = MCT_2.11.0
75+
fxrequired = ToplevelRequired
76+
fxDONOTUSEurl = https://github.com/MCSclimate/MCT
77+
3478
[submodule "parallelio"]
35-
path = libraries/parallelio
36-
url = https://github.com/NCAR/ParallelIO
79+
path = libraries/parallelio
80+
url = https://github.com/NCAR/ParallelIO
81+
fxtag = pio2_6_2
82+
fxrequired = ToplevelRequired
83+
fxDONOTUSEurl = https://github.com/NCAR/ParallelIO
84+
3785
[submodule "doc-builder"]
38-
path = doc/doc-builder
39-
url = https://github.com/ESMCI/doc-builder
86+
path = doc/doc-builder
87+
url = https://github.com/ESMCI/doc-builder
88+
fxtag = v1.0.8
89+
fxrequired = ToplevelOptional
90+
fxDONOTUSEurl = https://github.com/ESMCI/doc-builder
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: pre-commit
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
pre-commit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v3
13+
- uses: pre-commit/[email protected]
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Run this job on pushes to `main`, and for pull requests. If you don't specify
2+
# `branches: [main], then this actions runs _twice_ on pull requests, which is
3+
# annoying.
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
# If you wanted to use multiple Python versions, you'd have specify a matrix in the job and
18+
# reference the matrixe python version here.
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.9'
22+
23+
# Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow
24+
# from installing Poetry every time, which can be slow. Note the use of the Poetry version
25+
# number in the cache key, and the "-0" suffix: this allows you to invalidate the cache
26+
# manually if/when you want to upgrade Poetry, or if something goes wrong. This could be
27+
# mildly cleaner by using an environment variable, but I don't really care.
28+
- name: cache poetry install
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/.local
32+
key: poetry-1.7.1
33+
34+
# Install Poetry. You could do this manually, or there are several actions that do this.
35+
# `snok/install-poetry` seems to be minimal yet complete, and really just calls out to
36+
# Poetry's default install script, which feels correct. I pin the Poetry version here
37+
# because Poetry does occasionally change APIs between versions and I don't want my
38+
# actions to break if it does.
39+
#
40+
# The key configuration value here is `virtualenvs-in-project: true`: this creates the
41+
# venv as a `.venv` in your testing directory, which allows the next step to easily
42+
# cache it.
43+
- uses: snok/install-poetry@v1
44+
with:
45+
version: 1.7.1
46+
virtualenvs-create: true
47+
virtualenvs-in-project: true
48+
49+
# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`). Note the cache
50+
# key: if you're using multiple Python versions, or multiple OSes, you'd need to include
51+
# them in the cache key. I'm not, so it can be simple and just depend on the poetry.lock.
52+
- name: cache deps
53+
id: cache-deps
54+
uses: actions/cache@v4
55+
with:
56+
path: .venv
57+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
58+
59+
# Install dependencies. `--no-root` means "install all dependencies but not the project
60+
# itself", which is what you want to avoid caching _your_ code. The `if` statement
61+
# ensures this only runs on a cache miss.
62+
- run: poetry install --no-interaction --no-root
63+
if: steps.cache-deps.outputs.cache-hit != 'true'
64+
65+
# Now install _your_ project. This isn't necessary for many types of projects -- particularly
66+
# things like Django apps don't need this. But it's a good idea since it fully-exercises the
67+
# pyproject.toml and makes that if you add things like console-scripts at some point that
68+
# they'll be installed and working.
69+
- run: poetry install --no-interaction
70+
71+
# And finally run tests. I'm using pytest and all my pytest config is in my `pyproject.toml`
72+
# so this line is super-simple. But it could be as complex as you need.
73+
- run: |
74+
git config --global user.name "${GITHUB_ACTOR}"
75+
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
76+
poetry run pytest
77+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
exclude: ^utils/.*$
2+
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.0.1
6+
hooks:
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
- repo: https://github.com/psf/black
10+
rev: 22.3.0
11+
hooks:
12+
- id: black
13+
- repo: https://github.com/PyCQA/pylint
14+
rev: v2.11.1
15+
hooks:
16+
- id: pylint
17+
args:
18+
- --disable=I,C,R,logging-not-lazy,wildcard-import,unused-wildcard-import,fixme,broad-except,bare-except,eval-used,exec-used,global-statement,logging-format-interpolation,no-name-in-module,arguments-renamed,unspecified-encoding,protected-access,import-error,no-member

.lib/git-fleximod/License

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright 2024 National Center for Atmospheric Sciences (NCAR)
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
“Software”), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

.lib/git-fleximod/README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# git-fleximod
2+
3+
Flexible, Enhanced Submodule Management for Git
4+
5+
## Overview
6+
7+
Git-fleximod is a Python-based tool that extends Git's submodule and sparse checkout capabilities, offering additional features for managing submodules in a more flexible and efficient way.
8+
9+
## Installation
10+
11+
#TODO Install using pip:
12+
# pip install git-fleximod
13+
If you choose to locate git-fleximod in your path you can access it via command: git fleximod
14+
15+
## Usage
16+
17+
Basic Usage:
18+
git fleximod <command> [options]
19+
Available Commands:
20+
status: Display the status of submodules.
21+
update: Update submodules to the tag indicated in .gitmodules variable fxtag.
22+
test: Make sure that fxtags and submodule hashes are consistant,
23+
make sure that official urls (as defined by fxDONOTUSEurl) are set
24+
make sure that fxtags are defined for all submodules
25+
Additional Options:
26+
See git fleximod --help for more details.
27+
28+
## Supported .gitmodules Variables
29+
30+
fxtag: Specify a specific tag or branch to checkout for a submodule.
31+
fxrequired: Mark a submodule's checkout behavior, with allowed values:
32+
- ToplevelRequired: Top-level and required (checked out only when this is the Toplevel module).
33+
- ToplevelOptional: Top-level and optional (checked out with --optional flag if this is the Toplevel module).
34+
- AlwaysRequired: Always required (always checked out).
35+
- AlwaysOptional: Always optional (checked out with --optional flag).
36+
fxsparse: Enable sparse checkout for a submodule, pointing to a file containing sparse checkout paths.
37+
fxDONOTUSEurl: This is the url used in the test subcommand to assure that protected branches do not point to forks
38+
**NOTE** the fxDONOTUSEurl variable is only used to identify the official project repository and should not be
39+
changed by users. Use the url variable to change to a fork if desired.
40+
41+
## Sparse Checkouts
42+
43+
To enable sparse checkout for a submodule, set the fxsparse variable
44+
in the .gitmodules file to the path of a file containing the desired
45+
sparse checkout paths. Git-fleximod will automatically configure
46+
sparse checkout based on this file when applicable commands are run.
47+
See [git-sparse-checkout](https://git-scm.com/docs/git-sparse-checkout#_internalsfull_pattern_set)
48+
for details on the format of this file.
49+
50+
## Tests
51+
52+
The git fleximod test action is designed to be used by, for example, github workflows
53+
to assure that protected branches are consistant with respect to submodule hashes and fleximod fxtags
54+
55+
## Examples
56+
57+
Here are some common usage examples:
58+
59+
Update all submodules, including optional ones:
60+
```bash
61+
git fleximod update --optional
62+
```
63+
64+
Updating a specific submodule to the fxtag indicated in .gitmodules:
65+
66+
```bash
67+
git fleximod update submodule-name
68+
```
69+
Example .gitmodules entry:
70+
```ini, toml
71+
[submodule "cosp2"]
72+
path = src/physics/cosp2/src
73+
url = https://github.com/CFMIP/COSPv2.0
74+
fxsparse = ../.cosp_sparse_checkout
75+
fxrequired = AlwaysRequired
76+
fxtag = v2.1.4cesm
77+
```
78+
Explanation:
79+
80+
This entry indicates that the submodule named cosp2 at tag v2.1.4cesm
81+
should be checked out into the directory src/physics/cosp2/src
82+
relative to the .gitmodules directory. It should be checked out from
83+
the URL https://github.com/CFMIP/COSPv2.0 and use sparse checkout as
84+
described in the file ../.cosp_sparse_checkout relative to the path
85+
directory. It should be checked out anytime this .gitmodules entry is
86+
read.
87+
88+
Additional example:
89+
```ini, toml
90+
[submodule "cime"]
91+
path = cime
92+
url = https://github.com/jedwards4b/cime
93+
fxrequired = ToplevelRequired
94+
fxtag = cime6.0.198_rme01
95+
```
96+
97+
Explanation:
98+
99+
This entry indicates that the submodule cime should be checked out
100+
into a directory named cime at tag cime6.0.198_rme01 from the URL
101+
https://github.com/jedwards4b/cime. This should only be done if
102+
the .gitmodules file is at the top level of the repository clone.
103+
104+
## Contributing
105+
106+
We welcome contributions! Please see the CONTRIBUTING.md file for guidelines.
107+
108+
## License
109+
110+
Git-fleximod is released under the MIT License.

.lib/git-fleximod/doc/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 commit comments

Comments
 (0)