Skip to content

Commit 969969d

Browse files
committed
update to cam6_4_098
2 parents e8e505d + c4abe78 commit 969969d

42 files changed

Lines changed: 4052 additions & 1222 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
[submodule "atmos_phys"]
3737
path = src/atmos_phys
3838
url = https://github.com/ESCOMP/atmospheric_physics
39-
fxtag = atmos_phys0_13_000
39+
fxtag = atmos_phys0_14_000
4040
fxrequired = AlwaysRequired
4141
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
4242

.lib/CODE_OF_CONDUCT.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Contributor Code of Conduct
2+
_The Contributor Code of Conduct is for participants in our software projects and community._
3+
4+
## Our Pledge
5+
We, as contributors, creators, stewards, and maintainers (participants), of **git-fleximod** pledge to make participation in
6+
our software, system or hardware project and community a safe, productive, welcoming and inclusive experience for everyone.
7+
All participants are required to abide by this Code of Conduct.
8+
This includes respectful treatment of everyone regardless of age, body size, disability, ethnicity, gender identity or expression,
9+
level of experience, nationality, political affiliation, veteran status, pregnancy, genetic information, physical appearance, race,
10+
religion, or sexual orientation, as well as any other characteristic protected under applicable US federal or state law.
11+
12+
## Our Standards
13+
Examples of behaviors that contribute to a positive environment include:
14+
15+
* All participants are treated with respect and consideration, valuing a diversity of views and opinions
16+
* Be considerate, respectful, and collaborative
17+
* Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism
18+
* Acknowledging the contributions of others
19+
* Avoid personal attacks directed toward other participants
20+
* Be mindful of your surroundings and of your fellow participants
21+
* Alert UCAR staff and suppliers/vendors if you notice a dangerous situation or someone in distress
22+
* Respect the rules and policies of the project and venue
23+
24+
Examples of unacceptable behavior include, but are not limited to:
25+
26+
* Harassment, intimidation, or discrimination in any form
27+
* Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested
28+
* Unwelcome sexual attention or advances
29+
* Personal attacks directed at other guests, members, participants, etc.
30+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
31+
* Alarming, intimidating, threatening, or hostile comments or conduct
32+
* Inappropriate use of nudity and/or sexual images
33+
* Threatening or stalking anyone, including a participant
34+
* Other conduct which could reasonably be considered inappropriate in a professional setting
35+
36+
## Scope
37+
This Code of Conduct applies to all spaces managed by the Project whether they be physical, online or face-to-face.
38+
This includes project code, code repository, associated web pages, documentation, mailing lists, project websites and wiki pages,
39+
issue tracker, meetings, telecons, events, project social media accounts, and any other forums created by the project team which the
40+
community uses for communication.
41+
In addition, violations of this Code of Conduct outside these spaces may affect a person's ability to participate within them.
42+
Representation of a project may be further defined and clarified by project maintainers.
43+
44+
## Community Responsibilities
45+
Everyone in the community is empowered to respond to people who are showing unacceptable behavior.
46+
They can talk to them privately or publicly.
47+
Anyone requested to stop unacceptable behavior is expected to comply immediately.
48+
If the behavior continues concerns may be brought to the project administrators or to any other party listed in the
49+
[Reporting](#reporting) section below.
50+
51+
## Project Administrator Responsibilities
52+
Project administrators are responsible for clarifying the standards of acceptable behavior and are encouraged to model appropriate
53+
behavior and provide support when people in the community point out inappropriate behavior.
54+
Project administrator(s) are normally the ones that would be tasked to carry out the actions in the [Consequences](#consequences)
55+
section below.
56+
57+
Project administrators are also expected to keep this Code of Conduct updated with the main one housed at UCAR, as listed below in
58+
the [Attribution](#attribution) section.
59+
60+
## Reporting
61+
Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action as
62+
outlined in the [Consequences](#consequences) section below.
63+
However, making a report to a project administrator is not considered an 'official report' to UCAR.
64+
65+
Instances of unacceptable behavior may also be reported directly to UCAR pursuant to [UCAR's Harassment Reporting and Complaint
66+
Procedure](https://www2.fin.ucar.edu/procedures/hr/harassment-reporting-and-complaint-procedure), or anonymously through [UCAR's
67+
EthicsPoint Hotline](https://www2.fin.ucar.edu/ethics/anonymous-reporting).
68+
69+
Complaints received by UCAR will be handled pursuant to the procedures outlined in UCAR's Harassment Reporting and Complaint
70+
Procedure.
71+
Complaints to UCAR will be held as confidential as practicable under the circumstances, and retaliation against a person who
72+
initiates a complaint or an inquiry about inappropriate behavior will not be tolerated.
73+
74+
Any Contributor can use these reporting methods even if they are not directly affiliated with UCAR.
75+
The Frequently Asked Questions (FAQ) page for reporting is [here](https://www2.fin.ucar.edu/procedures/hr/reporting-faqs).
76+
77+
## Consequences
78+
Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the
79+
circumstances.
80+
Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits, email, issues, and
81+
other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently any contributor for other
82+
behaviors that are deemed inappropriate, threatening, offensive, or harmful.
83+
Project administrators also have the right to report violations to UCAR HR and/or UCAR's Office of Diversity, Equity and Inclusion
84+
(ODEI), as well as a participant's home institution and/or law enforcement.
85+
In the event an incident is reported to UCAR, UCAR will follow its Harassment Reporting and Complaint Procedure.
86+
87+
## Process for Changes
88+
All UCAR managed projects are required to adopt this Contributor Code of Conduct.
89+
Adoption is assumed even if not expressly stated in the repository.
90+
Projects should fill in sections where prompted with project-specific information, including, project name and adoption date.
91+
92+
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
93+
[Attribution](#attribution) section below.
94+
Projects can make limited substantive changes to the Code of Conduct, however, the changes must be limited in scope and may not
95+
contradict the UCAR Contributor Code of Conduct.
96+
97+
## Attribution
98+
This Code of Conduct was originally adapted from the [Contributor Covenant](http://contributor-covenant.org/version/1/4), version
99+
1.4.
100+
We then aligned it with the UCAR Participant Code of Conduct, which also borrows from the American Geophysical Union (AGU) Code of
101+
Conduct.
102+
The UCAR Participant Code of Conduct applies to both UCAR employees as well as participants in activities run by UCAR.
103+
The original version of this for all software projects that have strong management from UCAR or UCAR staff is available on the UCAR
104+
website at https://doi.org/10.5065/6w2c-a132.
105+
The date that it was adopted by this project was **Feb/13/2018**.
106+
When responding to complaints, UCAR HR and ODEI will do so based on the latest published version.
107+
Therefore, any project-specific changes should follow the [Process for Changes](#process-for-changes) section above.

.lib/License

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright 2024 NSF 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/README.md

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

.lib/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)

.lib/doc/conf.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
9+
project = "git-fleximod"
10+
author = "Jim Edwards <jedwards@ucar.edu>"
11+
release = "0.4.0"
12+
13+
# -- General configuration ---------------------------------------------------
14+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15+
16+
extensions = ["sphinx_argparse_cli"]
17+
18+
templates_path = ["_templates"]
19+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
20+
21+
22+
# -- Options for HTML output -------------------------------------------------
23+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
24+
25+
html_theme = "alabaster"
26+
html_static_path = ["_static"]

.lib/doc/index.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. git-fleximod documentation master file, created by
2+
sphinx-quickstart on Sat Feb 3 12:02:22 2024.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to git-fleximod's documentation!
7+
========================================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
.. module:: sphinxcontrib.autoprogram
13+
.. sphinx_argparse_cli::
14+
:module: git_fleximod.cli
15+
:func: get_parser
16+
:prog: git-fleximod
17+
18+
19+
Indices and tables
20+
==================
21+
22+
* :ref:`genindex`
23+
* :ref:`modindex`
24+
* :ref:`search`

.lib/doc/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

.lib/escomp_install

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env python
2+
# updates git-fleximod in an ESCOMP model
3+
# this script should be run from the model root directory, it expects
4+
# git-fleximod to already be installed with the script in bin
5+
# and the classes in lib/python/site-packages
6+
import sys
7+
import shutil
8+
import os
9+
10+
from glob import iglob
11+
12+
fleximod_root = sys.argv[1]
13+
fleximod_path = os.path.join(fleximod_root,"src","git-fleximod")
14+
if os.path.isfile(fleximod_path):
15+
with open(fleximod_path,"r") as f:
16+
fleximod = f.readlines()
17+
with open(os.path.join(".","bin","git-fleximod"),"w") as f:
18+
for line in fleximod:
19+
f.write(line)
20+
if "import argparse" in line:
21+
f.write('\nsys.path.append(os.path.join(os.path.dirname(__file__),"..","lib","python","site-packages"))\n\n')
22+
23+
for file in iglob(os.path.join(fleximod_root, "src", "fleximod", "*.py")):
24+
shutil.copy(file,
25+
os.path.join("lib","python","site-packages","fleximod",os.path.basename(file)))

.lib/git-fleximod/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "git-fleximod"
3-
version = "0.9.4"
3+
version = "1.0.1"
44
description = "Extended support for git-submodule and git-sparse-checkout"
55
authors = ["Jim Edwards <jedwards@ucar.edu>"]
66
maintainers = ["Jim Edwards <jedwards@ucar.edu>"]
@@ -11,6 +11,7 @@ keywords = ["git", "submodule", "sparse-checkout"]
1111
packages = [
1212
{ include = "git_fleximod"},
1313
{ include = "doc"},
14+
{ include = "README.md"},
1415
]
1516

1617
[tool.poetry.scripts]

0 commit comments

Comments
 (0)