Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove manage_externals and update based on ESCOMP/CESM tag 'cesm3_0_beta01' #69

Merged
merged 12 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# managed directories that are checked out by the externals tool
cime/
components/
libraries/
share/
ccs_config/
tools/statistical_ensemble_test/

# generated local files
*.log

Expand All @@ -15,3 +7,4 @@ tools/statistical_ensemble_test/

# generated python files
*.pyc
__pycache__
197 changes: 197 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
# This is a git submodule file with additional support for
# git-fleximod (https://github.com/jedwards4b/git-fleximod)
#
# The additional flags supported by git-fleximod are
# fxtag - the tag associated with the submodule, this tag can be tested for
# consistancy with the submodule hash using git-fleximod status
# the hash can be updated to the tag using git-fleximod update
#
# fxrequired - indicates if a given submodule should be checked out on install
# submoudules can be toplevel or internal and required or optional
# toplevel means that the submodule should only be checked out if the
# module is the toplevel of the git repo (is not a submodule itself)
# internal means that the submodule is needed by the component whether
# the component is toplevel or the submodule of another repo
# required means that the submodule should always be checked out
# optional means that the submodule should only be checked out if the
# optional flag is provided to git-fleximod or the submodule name is
# explicitly listed on the git-fleximod command line.
#
# fxsparse - this is a path to a git sparse checkout file indicating that the
# submodule should be checked out in sparse mode
#
# fxDONOTUSEurl - this field is used by git-fleximod test to insure that the url is pointing
# to the official url of the repo and not to an unofficial fork.
# It is intended for use of github workflows to test commits to protected
# repository branches.
#


[submodule "ccs_config"]
path = ccs_config
url = https://github.com/EarthWorksOrg/ccs_config_cesm.git
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
fxtag = ccs_config-ew2.3.003
fxrequired = ToplevelRequired

[submodule "share"]
path = share
url = https://github.com/ESCOMP/CESM_share
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share
fxtag = share1.0.19
fxrequired = ToplevelRequired

[submodule "cime"]
path = cime
url = https://github.com/EarthWorksOrg/cime
fxDONOTUSEurl = https://github.com/ESMCI/cime
fxtag = cime-ew2.3.002
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
fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial
fxtag = MPIserial_2.5.0
fxrequired = ToplevelRequired

[submodule "cam"]
path = components/cam
url = https://www.github.com/EarthWorksOrg/CAM
fxDONOTUSEurl = https://www.github.com/ESCOMP/CAM
fxtag = cam-ew2.3.002
fxrequired = ToplevelRequired

# EarthWorks is not using ww3
# [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

# EarthWorks is not using rtm
# [submodule "rtm"]
# path = components/rtm
# url = https://github.com/ESCOMP/RTM
# fxDONOTUSEurl = https://github.com/ESCOMP/RTM
# fxrequired = ToplevelRequired
# fxtag = rtm1_0_79

[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
fxrequired = ToplevelRequired
fxtag = mosart1_0_49

# EarthWorks is not using mizuroute
# [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

# EarthWorks is not using fms
# [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 "parallelio"]
path = libraries/parallelio
url = https://github.com/NCAR/ParallelIO
fxDONOTUSEurl = https://github.com/NCAR/ParallelIO
fxrequired = ToplevelRequired
fxtag = pio2_6_2

[submodule "cdeps"]
path = components/cdeps
url = https://github.com/ESCOMP/CDEPS
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS
fxrequired = ToplevelRequired
fxtag = cdeps1.0.37

[submodule "cmeps"]
path = components/cmeps
url = https://github.com/EarthWorksOrg/CMEPS.git
fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git
fxrequired = ToplevelRequired
fxtag = cmeps-ew2.3.002

[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

# EarthWorks is not using cism
# [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_001
# fxrequired = ToplevelRequired

[submodule "clm"]
path = components/clm
url = https://github.com/EarthWorksOrg/CTSM
fxDONOTUSEurl = https://github.com/ESCOMP/CTSM
fxrequired = ToplevelRequired
fxtag = ctsm-ew2.3.002

# EarthWorks is not using mom
# [submodule "mom"]
# path = components/mom
# url = https://github.com/ESCOMP/MOM_interface
# fxDONOTUSEurl = https://github.com/ESCOMP/MOM_interface
# fxrequired = ToplevelRequired
# fxtag = mi_240522

# EarthWorks-specific
[submodule "mpas-ocean"]
path = components/mpas-ocean
url = https://github.com/EarthWorksOrg/mpas-ocean.git
fxDONOTUSEurl = https://github.com/EarthWorksOrg/mpas-ocean.git
fxrequired = ToplevelRequired
fxtag = mpaso-ew2.3.000

[submodule "mpas-seaice"]
path = components/mpas-seaice
url = https://github.com/EarthWorksOrg/mpas-seaice.git
fxDONOTUSEurl = https://github.com/EarthWorksOrg/mpas-seaice.git
fxrequired = ToplevelRequired
fxtag = mpassi-ew2.3.000

[submodule "mpas-framework"]
path = components/mpas-framework
url = https://github.com/EarthWorksOrg/mpas-framework.git
fxDONOTUSEurl = https://github.com/EarthWorksOrg/mpas-framework.git
fxrequired = ToplevelRequired
fxtag = mpasfrwk-ew2.3.000

[submodule "ewms-diags"]
path = tools/ewms-diags
url = https://github.com/EarthWorksOrg/EarthWorks_diags
fxDONOTUSEurl = https://github.com/EarthWorksOrg/EarthWorks_diags
fxrequired = ToplevelRequired
fxtag = diags-ew1.0.000

13 changes: 13 additions & 0 deletions .lib/git-fleximod/.github/workflows/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: pre-commit
on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
77 changes: 77 additions & 0 deletions .lib/git-fleximod/.github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Run this job on pushes to `main`, and for pull requests. If you don't specify
# `branches: [main], then this actions runs _twice_ on pull requests, which is
# annoying.

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# If you wanted to use multiple Python versions, you'd have specify a matrix in the job and
# reference the matrixe python version here.
- uses: actions/setup-python@v5
with:
python-version: '3.9'

# Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow
# from installing Poetry every time, which can be slow. Note the use of the Poetry version
# number in the cache key, and the "-0" suffix: this allows you to invalidate the cache
# manually if/when you want to upgrade Poetry, or if something goes wrong. This could be
# mildly cleaner by using an environment variable, but I don't really care.
- name: cache poetry install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-1.7.1

# Install Poetry. You could do this manually, or there are several actions that do this.
# `snok/install-poetry` seems to be minimal yet complete, and really just calls out to
# Poetry's default install script, which feels correct. I pin the Poetry version here
# because Poetry does occasionally change APIs between versions and I don't want my
# actions to break if it does.
#
# The key configuration value here is `virtualenvs-in-project: true`: this creates the
# venv as a `.venv` in your testing directory, which allows the next step to easily
# cache it.
- uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`). Note the cache
# key: if you're using multiple Python versions, or multiple OSes, you'd need to include
# them in the cache key. I'm not, so it can be simple and just depend on the poetry.lock.
- name: cache deps
id: cache-deps
uses: actions/cache@v4
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

# Install dependencies. `--no-root` means "install all dependencies but not the project
# itself", which is what you want to avoid caching _your_ code. The `if` statement
# ensures this only runs on a cache miss.
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'

# Now install _your_ project. This isn't necessary for many types of projects -- particularly
# things like Django apps don't need this. But it's a good idea since it fully-exercises the
# pyproject.toml and makes that if you add things like console-scripts at some point that
# they'll be installed and working.
- run: poetry install --no-interaction

# And finally run tests. I'm using pytest and all my pytest config is in my `pyproject.toml`
# so this line is super-simple. But it could be as complex as you need.
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
poetry run pytest

18 changes: 18 additions & 0 deletions .lib/git-fleximod/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
exclude: ^utils/.*$

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/pylint
rev: v2.11.1
hooks:
- id: pylint
args:
- --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
Loading