Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
d65e328
Add EXCL_STRIDE to XML PE configs
amametjanov Oct 21, 2025
c06e4fb
Format with black
amametjanov Oct 22, 2025
0367522
Allow the allactive "component" to define system tests
billsacks Nov 7, 2025
466f7bc
Allow extensions of FUNIT test to add arguments to run_tests.py
billsacks Nov 7, 2025
a5ec807
Fix test_unit_xml_tests for new case.get_value call
billsacks Nov 8, 2025
2d14723
Don't error if multiple CONFIG_TESTS_FILEs resolve to the same path
billsacks Nov 8, 2025
a89f680
git ignore all files of form *.o\d+ (all pbs output)
jedwards4b Nov 13, 2025
2f3f221
Merge pull request #4897 from jedwards4b/gitignore_more
jedwards4b Nov 14, 2025
14f3b15
Made ERI F1850C test work with gregorian calendar.
kdraeder Nov 18, 2025
82240cf
Update eri.py
kdraeder Nov 19, 2025
8b13390
fix black formatting
jedwards4b Nov 19, 2025
0afcb5f
Use _cG instead of _CG for Gregorian calendar
billsacks Nov 23, 2025
aee737f
Merge branch 'ESMCI:master' into gregorian_ERI
kdraeder Nov 25, 2025
e2cf677
Merge pull request #4895 from billsacks/allow_allactive_systests
billsacks Dec 1, 2025
5078565
Made ERI outfrq9s_leapday test work for HIST compsets
kdraeder Dec 3, 2025
68d2197
Update test_scheduler.py
jedwards4b Dec 3, 2025
cc3d9c4
black reformat file
jedwards4b Dec 3, 2025
df9b0c7
when using wget on a system with spider mode disabled you may get an …
jedwards4b Dec 3, 2025
835583c
black and pylint fixes
jedwards4b Dec 3, 2025
6d6e275
tighter control string
jedwards4b Dec 4, 2025
d2ddac6
more informative warning
jedwards4b Dec 4, 2025
0fc24ba
Merge pull request #4901 from jedwards4b/fix/spider_mode_disabled
jedwards4b Dec 4, 2025
33b54d8
Remove the consistency check of Gregorian and compset
kdraeder Dec 4, 2025
82493b1
Merge remote-tracking branch 'esmci/master' into gregorian_ERI
billsacks Dec 5, 2025
d5e1e03
Merge pull request #4899 from kdraeder/gregorian_ERI
billsacks Dec 5, 2025
b91c796
Fix issue with true/false enum if C standard >= C23
bartgol Dec 9, 2025
87be616
pass non-local option to cam.case_setup
alperaltuntas Dec 15, 2025
256c224
Black with python/3.10
amametjanov Dec 16, 2025
d1acd48
Merge pull request #4884 from ESMCI/azamat/pes/add-xstrid-to-xml
jgfouca Dec 16, 2025
4366fa7
Adds test for invalid case directories
jasonb5 Dec 22, 2025
8972fb6
make sure that when a refcase is set the drv_restart_pointer filename…
jedwards4b Dec 22, 2025
915c5bf
clean up new code
jedwards4b Dec 22, 2025
ed13d79
Fixes handling errors when test has invalid case directory
jasonb5 Dec 22, 2025
c361040
Merge pull request #4905 from jedwards4b/fix/drv_restart_pointer
jedwards4b Dec 29, 2025
3ef4096
Merge pull request #4906 from ESMCI/fix_bless_test
jgfouca Dec 30, 2025
56b4666
initialize timestep
jedwards4b Jan 2, 2026
37a17ea
fix all pylint issues for pylint v4.0.4
jedwards4b Jan 2, 2026
b281118
fix some spelling errors
jedwards4b Jan 2, 2026
eede122
Update .github/pull_request_template.md
jedwards4b Jan 2, 2026
9f635b0
response to reviewer comments
jedwards4b Jan 2, 2026
8d89e28
replace RuntimeError with CIMEError
jedwards4b Jan 2, 2026
9793fa2
replace RuntimeError with CIMEError
jedwards4b Jan 2, 2026
3ae3808
futher revisions provided by reviewer
jedwards4b Jan 2, 2026
2144f3b
fix issue in utils
jedwards4b Jan 5, 2026
2fcecc9
the issue was in case_run, not utils
jedwards4b Jan 5, 2026
b638325
another issue
jedwards4b Jan 5, 2026
f4514f2
down the rabbit hole
jedwards4b Jan 5, 2026
0894a07
update mock
jedwards4b Jan 5, 2026
40fffd9
Cmake build: do not set offload stuff in the cmake command if they ar…
jgfouca Jan 5, 2026
7ca0280
Merge pull request #4910 from ESMCI/jgfouca/fix_gpu_setting_build
jgfouca Jan 6, 2026
73fdf2b
update minimum required python version and update pylint to lastest
jedwards4b Jan 7, 2026
1287c08
Merge pull request #4908 from jedwards4b/update/pylint
jedwards4b Jan 7, 2026
e752d03
Merge pull request #4904 from alperaltuntas/fix_nonlocal_cam
jedwards4b Jan 7, 2026
1df1663
allow a potential python version warning in tests
jedwards4b Jan 12, 2026
cbc691e
fix more tests
jedwards4b Jan 12, 2026
71dbce3
fix more tests
jedwards4b Jan 12, 2026
991e19b
Merge pull request #4913 from jedwards4b/fix/python_warning
jedwards4b Jan 12, 2026
b5e7289
fix issue with completion of multi-instance cases
jedwards4b Jan 13, 2026
ba1c6c2
pelayout should work with or without xstride variable
jedwards4b Jan 13, 2026
09c604b
black format file
jedwards4b Jan 13, 2026
3d14631
further refinements to print format
jedwards4b Jan 13, 2026
e7921cc
Merge pull request #4916 from jedwards4b/fix/noxstrideinlayout
jedwards4b Jan 13, 2026
e347176
add the CASEROOT file to the archive log directory
jedwards4b Jan 13, 2026
8e2a170
Merge pull request #4917 from jedwards4b/fix/multi_instanct
jedwards4b Jan 13, 2026
2934142
keep it simple
jedwards4b Jan 13, 2026
9c46b36
need to add CASEROOT to st_archive_test directory
jedwards4b Jan 14, 2026
ce1b7ad
ignore CASEROOT in testing
jedwards4b Jan 14, 2026
146a0ac
only copy if exists and needed
jedwards4b Jan 14, 2026
667a6d9
Merge pull request #4919 from jedwards4b/enhance/add_caseroot_to_arch…
jedwards4b Jan 16, 2026
f4ecd1d
Use different suffixes for the two ERI comparisons
billsacks Jan 16, 2026
12a38af
ERI test: give the branch case a "branch" suffix
billsacks Jan 16, 2026
800e2d7
Reorder suffixes in ERI comparisons
billsacks Jan 16, 2026
e2e4150
Merge pull request #4903 from bartgol/bartgol/fix-std-c23-error
jedwards4b Jan 20, 2026
81cda06
Merge pull request #4920 from billsacks/eri_do_not_clobber_cprnc_out
billsacks Jan 24, 2026
a096098
Adds unittests for _archive_rpointer_files
jasonb5 Dec 12, 2025
17f1b84
Adds function to help mock an XML environment class
jasonb5 Dec 13, 2025
7c6671d
Updates tests to use mock_env and updated EnvArchive methods
jasonb5 Dec 13, 2025
a212904
Refactors _archive_rpointer_files
jasonb5 Dec 18, 2025
7de43bc
Fixes latest rpointer being removed from run directory
jasonb5 Dec 20, 2025
d18959b
Add baseline synopsis to teststatus.log
jgfouca Jan 26, 2026
834b63b
black format
jgfouca Jan 26, 2026
266badb
Add newlines
jgfouca Jan 26, 2026
635ea76
Removes unused functions
jasonb5 Jan 26, 2026
52c1103
Move archive spec and rpointer parsing methods to ArchiveBase
jasonb5 Jan 27, 2026
39fe6a0
Merge pull request #4921 from ESMCI/jgfouca/add_baseline_synopsis
jgfouca Jan 27, 2026
3f0f872
wait_for_tests: Refactor and restore commit/time upload
jgfouca Jan 29, 2026
70ddd2d
Fix
jgfouca Jan 29, 2026
4a4e1d0
Fix
jgfouca Jan 29, 2026
93bea97
Fixes
jgfouca Jan 29, 2026
5214b17
black
jgfouca Jan 29, 2026
e43b9ac
Fixes from copilot
jgfouca Jan 30, 2026
7d7b7b7
Add support for picking a tmproot. Add support for testing
jgfouca Jan 30, 2026
303fe74
black
jgfouca Jan 30, 2026
8831bb4
Fix copilot review items
jgfouca Jan 30, 2026
b8f7125
black
jgfouca Jan 30, 2026
66dd00b
Merge pull request #4922 from ESMCI/jgfouca/wait_for_tests_refactor
jgfouca Jan 30, 2026
98b9432
Change py version warning message from print to warn
jgfouca Feb 4, 2026
ca9baa4
Copilot recs
jgfouca Feb 4, 2026
6960e1d
Move logging import
jgfouca Feb 4, 2026
4776faa
Merge pull request #4927 from ESMCI/jgfouca/fix_py_warn
jgfouca Feb 4, 2026
fc2de6d
Revert "Merge pull request #4913 from jedwards4b/fix/python_warning"
billsacks Feb 5, 2026
27aa9df
Merge pull request #4928 from billsacks/revert_unnecessary_warning_re…
billsacks Feb 5, 2026
87d67c2
Merge pull request #4907 from ESMCI/fix_rpointer_archive
jasonb5 Feb 5, 2026
9b339c3
Change version warning output to not use logging
jgfouca Feb 11, 2026
7997bb9
Merge pull request #4931 from ESMCI/jgfouca/fix_logging
jgfouca Feb 11, 2026
718622a
Change version warning output to not use logging
jgfouca Feb 11, 2026
06da08c
Add AGENTS.md for cime
rljacob Feb 18, 2026
1c69c2d
Address reviewer comments
rljacob Feb 19, 2026
c3fa928
More reviewer comments
rljacob Feb 20, 2026
ca71253
Remove scripts_regression_tests.py mention
rljacob Feb 20, 2026
e589cb4
Merge pull request #4940 from ESMCI/rljacob/add-agentsmd
rljacob Feb 20, 2026
8ec7fdb
Fix MOM6 .ic. history file skip logic
alperaltuntas Feb 27, 2026
5444eae
Merge pull request #4944 from alperaltuntas/fix_mom_ic_skip_logic
billsacks Feb 27, 2026
bd710a3
Flip cmake macro names to match case
jgfouca Feb 27, 2026
c008a6d
Move xcpl_comps_nuopc to CMEPS
billsacks Mar 2, 2026
a80e567
Don't ignore externals directory
billsacks Nov 14, 2025
d23935c
Remove unused var
jgfouca Mar 4, 2026
e60e410
Restore support for OS in cmake macros
jgfouca Mar 4, 2026
06ff204
Allow comp_mach macros with a warning
jgfouca Mar 4, 2026
dde8438
Merge pull request #4948 from ESMCI/jgfouca/flip_cmake_macro_names
jgfouca Mar 4, 2026
97dbf7a
Merge pull request #4946 from billsacks/remove_x_comps
billsacks Mar 10, 2026
336edbf
Update Dockerfile, cime.yaml, and entrypoint.sh in docker/
jasonb5 Feb 9, 2026
db70388
Fixes base image to always use latest
jasonb5 Feb 10, 2026
3bb231c
Cleans up entrypoint
jasonb5 Feb 10, 2026
d462fce
Updates testing workflow
jasonb5 Feb 12, 2026
7e39a06
Fixes formatting
jasonb5 Feb 12, 2026
d8e7cd7
Explicitly installs wget/curl/subversion in container
jasonb5 Feb 12, 2026
9c60f90
Replaces legacy backticks
jasonb5 Feb 12, 2026
286597c
Only modify HOME if required
jasonb5 Feb 12, 2026
78eb63a
Fixes exit code
jasonb5 Feb 12, 2026
e05f5a1
Fixes exit if cprnc temp directory cannot be created
jasonb5 Feb 12, 2026
d3e06e4
Fixes forcing host over conda perl for shell and build tools
jasonb5 Feb 12, 2026
c811b10
Switches to spack for idempotent environment
jasonb5 Mar 4, 2026
a917d73
Fixes CI home directory
jasonb5 Mar 4, 2026
28c06a6
Fixes testing workflow
jasonb5 Mar 4, 2026
6fa1167
Fixes using uv pip
jasonb5 Mar 4, 2026
8191658
Fixes using uv in testing workflow
jasonb5 Mar 4, 2026
a4dd31b
Updates contributing guide
jasonb5 Mar 4, 2026
a612bcb
Fixes black formatting
jasonb5 Mar 4, 2026
7d66fe5
Fixes setting up uv python
jasonb5 Mar 4, 2026
2e730de
Fixes pip install
jasonb5 Mar 4, 2026
5ddf244
Fixes uv management
jasonb5 Mar 4, 2026
ffc660d
Fixes entrypoint and adds a default venv
jasonb5 Mar 4, 2026
88c557e
Updates documentation
jasonb5 Mar 4, 2026
2969950
Fixes not loading uv python when running in CI
jasonb5 Mar 4, 2026
9811e64
Adds missing ESMFMKFILE
jasonb5 Mar 4, 2026
124cd0f
fix: not loading uv in CI
jasonb5 Mar 4, 2026
df08a61
fix: adds debug
jasonb5 Mar 10, 2026
bcf2be4
fix: disable fixing mct ARFLAGS
jasonb5 Mar 10, 2026
a0fb2ca
fix: machine directories
jasonb5 Mar 11, 2026
1fbec24
fix: PKG_CONFIG_PATH typo and path
jasonb5 Mar 11, 2026
cf10335
fix: test requirements and build context
jasonb5 Mar 11, 2026
3a3cd4e
fix: removes debugging and unused scripting
jasonb5 Mar 11, 2026
47a0e7e
fix: updates doc
jasonb5 Mar 11, 2026
a230764
fix: build job config
jasonb5 Mar 11, 2026
cecca55
fix: sets context to current directory
jasonb5 Mar 11, 2026
4ee43c3
fix: download input data
jasonb5 Mar 11, 2026
3ff3abb
fix: archive paths for workflow failures
jasonb5 Mar 11, 2026
82929f7
fix: removes unused functions
jasonb5 Mar 12, 2026
d3fd506
fix: coalesce cime directories for easier persistence
jasonb5 Mar 12, 2026
ffbf6c5
Merge pull request #4929 from ESMCI/fix-containers
jasonb5 Mar 12, 2026
d82431b
minor improvements to the oddball HOMME cime case
ndkeen Mar 26, 2026
e143016
Merge pull request #4953 from ESMCI/ndk/improve-hommebaseclass
jgfouca Mar 26, 2026
db50465
fix: prebuild cprnc
jasonb5 Mar 26, 2026
230ae8f
fix: loading spack environment
jasonb5 Mar 27, 2026
f7c3eba
fix: move spack env variables into correct stage
jasonb5 Mar 27, 2026
dec8ca2
fix: explicit paths for cmake
jasonb5 Mar 27, 2026
a6911b0
chore: debug statement
jasonb5 Mar 27, 2026
c18e4c1
fix: missing cprnc submodule
jasonb5 Mar 27, 2026
3df94b9
chore: remove old path
jasonb5 Mar 27, 2026
23ba529
fix: add exports incase env is cleared
jasonb5 Mar 27, 2026
ca388eb
fix: remove old ESMFMKFILE
jasonb5 Mar 27, 2026
88847e3
Merge pull request #4954 from ESMCI/prebuild_cprnc
jgfouca Mar 27, 2026
56132c0
fix: container paths
jasonb5 Mar 27, 2026
d85529e
fix: pin sphinx
jasonb5 Mar 28, 2026
be0a93e
Merge pull request #4955 from ESMCI/another_container_fix
jasonb5 Mar 28, 2026
dfeac44
Improve baseline handling when regenerating baselines
jgfouca Mar 25, 2026
bd5db8e
Preserve TestStatus and bless_log
jgfouca Mar 25, 2026
632d65d
Add test for baseline preservation
jgfouca Mar 26, 2026
c359287
black
jgfouca Mar 26, 2026
025f09a
Merge pull request #4952 from ESMCI/jgfouca/imprv_baseline_handling
jgfouca Mar 30, 2026
b1a1c15
Merge remote-tracking branch 'upstream/master' into updt-to173
Apr 9, 2026
05ee216
fix mf partition memery bs in most dirty way
Apr 9, 2026
06dc97a
Update CIME/case/case_st_archive.py
mvdebolskiy Apr 10, 2026
e3fb594
add compiler attribute for olivia gnu to work on <= 4 nodes
Apr 12, 2026
7cfe715
Revert "add compiler attribute for olivia gnu to work on <= 4 nodes"
Apr 12, 2026
1d04669
add betzy to st_archive exception
mvdebolskiy Apr 21, 2026
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
11 changes: 11 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

@../AGENTS.md

# Important
This CLAUDE.md file is maintained by the project maintainers and should not be
modified by /init or any automated process. Do not overwrite, replace, or
regenerate this file. If asked to run /init, warn the user that it will
overwrite the project's curated AI instructions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Please provide a clear and concise description of what the problem is e.g. I'm a

## Describe the solution you'd like
<!--
A clear and consise description of what you want to happen.
A clear and concise description of what you want to happen.
-->

## Describe alternative solutions
Expand Down
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
- Closes #<ISSUE_NUMBER_HERE>

## Checklist
- [ ] My code follows the style guidlines of this proejct (black formatting)
- [ ] My code follows the style guidelines of this project (black formatting)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings
- [ ] I have added tests that excerise my feature/fix and existing tests continue to pass
- [ ] I have added tests that exercise my feature/fix and existing tests continue to pass
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding additions and changes to the documentation
60 changes: 26 additions & 34 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: "true"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -62,8 +64,8 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v6
with:
target: base
context: docker/
file: docker/Dockerfile
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down Expand Up @@ -99,7 +101,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10", "3.12"]
python-version: ["3.9", "3.10", "3.12", "3.13", "3.14"]
steps:
- name: Checkout model code
uses: actions/checkout@v4
Expand All @@ -123,6 +125,8 @@ jobs:
with:
path: cesm/cime
submodules: "true"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Run tests
shell: bash
working-directory: cesm/cime
Expand All @@ -132,18 +136,15 @@ jobs:
CIME_TEST_PLATFORM: "ubuntu-latest"
SKIP_ENTRYPOINT: "true"
run: |
source /opt/conda/etc/profile.d/conda.sh

conda activate cesm

mamba install -y 'python=${{ matrix.python-version }}'

pip install -r test-requirements.txt
# manually run the entrypoint
source /entrypoint.sh

# GitHub runner home is different than container
cp -rf /home/cime/.cime /github/home/
uv python install "${{ matrix.python-version }}"
uv venv
source .venv/bin/activate
uv pip install -r test-requirements.txt

pytest -vvv --cov=CIME --cov-branch --cov-report=xml --machine docker CIME/tests/test_unit*
uv run pytest -vvv --cov=CIME --cov-branch --cov-report=xml --machine docker CIME/tests/test_unit*
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down Expand Up @@ -212,8 +213,12 @@ jobs:
- name: Cache inputdata
uses: actions/cache@v3
with:
path: /home/cime/inputdata
path: /root/storage/inputdata
key: inputdata-2
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.10"
- name: Run tests
shell: bash
working-directory: ${{ matrix.model.name }}/cime
Expand All @@ -223,31 +228,18 @@ jobs:
CIME_TEST_PLATFORM: ubuntu-latest
SKIP_ENTRYPOINT: "true"
run: |
source /opt/conda/etc/profile.d/conda.sh

conda activate ${{ matrix.model.name }}

pip install -r test-requirements.txt

# manually run the entrypoint
source /entrypoint.sh

if [[ "${{ matrix.model.name }}" == "e3sm" ]]; then
fix_mct_makefiles ../externals/mct
fi

# GitHub runner home is different than container
cp -rf /home/cime/.cime /github/home/

if [[ "${CIME_MODEL}" == "e3sm" ]]; then
ln -sf /github/home/.cime/config_machines.v2.xml /github/home/.cime/config_machines.xml
else
ln -sf /github/home/.cime/config_machines.v3.xml /github/home/.cime/config_machines.xml
fi
uv python install 3.10
uv venv
source .venv/bin/activate
uv pip install -r test-requirements.txt

git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"

pytest -vvv --cov=CIME --cov-branch --cov-report=xml --machine docker --no-fortran-run --no-teardown CIME/tests/test_sys*
uv run pytest -vvv --cov=CIME --cov-branch --cov-report=xml --machine docker --no-fortran-run --no-teardown CIME/tests/test_sys*
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
Expand All @@ -259,7 +251,7 @@ jobs:
- name: Create testing log archive
if: ${{ failure() }}
shell: bash
run: tar -czvf /testing-logs-${GITHUB_RUN_NUMBER}-${{ matrix.model.name }}-${{ matrix.driver }}.tar.gz /home/cime/cases /home/cime/baselines /home/cime/archive
run: tar -czvf /testing-logs-${GITHUB_RUN_NUMBER}-${{ matrix.model.name }}-${{ matrix.driver }}.tar.gz /root/storage/cases /root/storage/baselines /root/storage/archive
# How to download artifacts:
# https://docs.github.com/en/actions/managing-workflow-runs/downloading-workflow-artifacts
- name: Upload testing logs
Expand Down
15 changes: 11 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ scripts/Tools/JENKINS*
# Ignore anything that are produced under scripts "cases" directory
/scripts/cases/

#Ignore Externals
components
libraries
share
# Ignore some other files
test_coverage/**
*.bak

# AI coding tool local state
.gemini/
.codex/

# Special for Claude Code user config
.claude/*
!.claude/CLAUDE.md
CLAUDE.md
CLAUDE.local.md
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: black
files: CIME
- repo: https://github.com/PyCQA/pylint
rev: v2.11.1
rev: v4.0.4
hooks:
- id: pylint
args:
Expand Down
173 changes: 173 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# AGENTS.md

This file provides guidance to AI agents when working with code in this repository.

## Note to AI agents

This AGENTS.md is maintained by the CIME project. Do not overwrite or
regenerate this file with init commands.

## Note to claude code users

A CLAUDE.md file is in .claude directory. It includes
this file. Ignore tips to run init.

## Project Overview

CIME (Common Infrastructure for Modeling the Earth) provides a Case Control System (CCS) for configuring, compiling, and executing Earth System Models, plus a framework for system testing. CIME is a Python-based infrastructure currently used by CESM, E3SM, NorESM and other models. It does NOT contain model source code itself, but provides the infrastructure to manage model runs.

## Running Tests

### Unit and System Tests

From the repository root, run tests using either:

```bash
# Using pytest (recommended)
pytest CIME/tests

# Run specific test file
pytest CIME/tests/test_unit_foo.py

# Run specific test class
pytest CIME/tests/test_unit_foo.py::TestClass

# Run specific test case
pytest CIME/tests/test_unit_foo.py::TestClass::test_method
```

Test files follow a naming convention:
- Unit tests: `test_unit_*.py`
- System tests: `test_sys_*.py`

### Pre-commit Hooks

Before committing, always run:

```bash
pip install pre-commit
pre-commit run -a
```

This runs:
- `black` formatter on CIME code
- `pylint` with project-specific configuration
- XML validation on config files
- End-of-file and trailing whitespace checks

## Code Quality

- Code is formatted with `black`
- Linted with `pylint` (see `.pre-commit-config.yaml` for disabled checks)
- Python 3.9+ required
- Follow PEP8 style guidelines

## Key Architecture Concepts

### Case Control System (CCS)

The heart of CIME is the `Case` class (`CIME/case/case.py`), which manages all interactions with a CIME case. The Case class coordinates between:

1. **Config XML Classes** (readonly) - Located in `CIME/XML/`, these read CIME distribution config files like `config_*.xml`. Python classes are named after the XML they read (e.g., `Machines` reads machine configs).

2. **Env XML Classes** (read/write) - Also in `CIME/XML/`, these manage case-specific `env_*.xml` files. Classes are named `Env*` (e.g., `EnvRun`, `EnvBuild`).

The Case class contains an array of Env classes and uses Config classes to populate them during case creation/configuration.

### Directory Structure

```
CIME/
├── case/ # Case control modules (setup, run, submit, etc.)
├── XML/ # XML parsers for config and env files
├── SystemTests/ # System test implementations (ERS, ERT, etc.)
├── Tools/ # Case manipulation tools (xmlchange, xmlquery, etc.)
├── scripts/ # Top-level user-facing scripts
├── data/ # Config files, XML schemas
├── tests/ # Unit and system tests
├── BuildTools/ # Build system utilities
└── non_py/ # Non-Python components (C/Fortran)

scripts/
├── create_newcase # Create new case
├── create_test # Create and run tests
├── create_clone # Clone existing case
├── query_config # Query available configurations
└── query_testlists # Query test lists

tools/
└── mapping/ # Grid mapping file generation tools
```

### Common Workflows

**Create a case** (requires machine configuration):
```bash
./scripts/create_newcase --case CASENAME --compset COMPSET --res GRID [--machine MACHINE]
```

**Create and run tests**:
```bash
./scripts/create_test TESTNAME
./scripts/create_test TESTNAME1 TESTNAME2 ...
./scripts/create_test -f TESTFILE # from file
```

**Query configurations**:
```bash
./scripts/query_config --compsets
./scripts/query_config --grids
./scripts/query_config --machines
```

### Model System Tests

These are tests of properties of the model CIME is included in.
System tests inherit from `SystemTestsCommon` base class (`CIME/SystemTests/system_tests_common.py`). Common test types:
- **ERS**: Exact restart test
- **ERT**: Exact restart with different threading
- **SMS**: Smoke test
- **SEQ**: Sequencing test

Each test type has its own module in `CIME/SystemTests/`.

### XML-Based Configuration

CIME is heavily XML-driven. Key concepts:
- Generic XML handling is in `CIME/XML/generic_xml.py`
- All XML classes inherit from `GenericXML`
- XML schemas are in `CIME/data/config/xml_schemas/`
- Config files define machines, compsets, grids, tests

### Case Management Tools

Located in `CIME/Tools/`, these are executable scripts:
- `xmlchange`: Modify case XML variables
- `xmlquery`: Query case XML variables
- `case.setup`: Setup case directory structure
- `case.build`: Build the case
- `case.submit`: Submit case to batch system
- `preview_namelists`: Generate and preview namelists

## Documentation

Build Sphinx documentation:
```bash
cd doc
make clean
make api
make html
```

Requires: `sphinx`, `sphinxcontrib-programoutput`, and custom theme (see `doc/README`).

Online documentation: https://esmci.github.io/cime

## Development Notes

- When modifying Case env classes, changes affect the case's XML files
- The Case class extends across multiple files using imports (see imports at end of `case.py`)
- CIME must be integrated with host models (CESM, E3SM, NorESM) to run Model System Tests
on a supported machine (found using `./scripts/query_config --machines`)/
- Machine-specific configurations are in XML files, not hardcoded
- Git submodules may need initialization: `git submodule update --init`
17 changes: 9 additions & 8 deletions CIME/Servers/wget.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,21 @@ def wget_login(cls, address, user="", passwd=""):
args += "--password {} ".format(passwd)

try:
err = run_cmd("wget {} --spider {}".format(args, address), timeout=60)[0]
except:
err, _, errstr = run_cmd(
"wget {} --spider {}".format(args, address), timeout=60
)
except RuntimeError:
logger.warning(
"Could not connect to repo '{0}'\nThis is most likely either a proxy, or network issue .(location 1)".format(
"Could not connect to repo '{0}'\nThis is most likely either a proxy, or network issue .".format(
address
)
)
return None

if err and not "storage.neonscience.org" in address:
if "Connecting to " in errstr and "... connected" in errstr:
logger.warning("Connection established with nonzero code %s", err)
elif err:
logger.warning(
"Could not connect to repo '{0}'\nThis is most likely either a proxy, or network issue .(location 2)".format(
address
)
"Could not connect to repo '{0}'\n{1}".format(address, errstr)
)
return None

Expand Down
Loading