Skip to content

Commit d58c5ea

Browse files
committed
Merge branch 'master' into add_postprocessing_env_file
2 parents b1f8a44 + 1a161a5 commit d58c5ea

File tree

6 files changed

+41
-15
lines changed

6 files changed

+41
-15
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929
with:
3030
ref: 'gh-pages'
3131
fetch-depth: 0
@@ -64,17 +64,17 @@ jobs:
6464
name: Build and deploy documentation
6565
runs-on: ubuntu-latest
6666
steps:
67-
- uses: actions/checkout@v3
67+
- uses: actions/checkout@v4
6868
with:
6969
fetch-depth: 0
7070
lfs: true
7171
- name: Install python 3.x
72-
uses: actions/setup-python@v2
72+
uses: actions/setup-python@v5
7373
with:
7474
python-version: '3.x'
7575
# https://github.com/actions/cache/blob/main/examples.md#python---pip
7676
- name: Cache pip
77-
uses: actions/cache@v3
77+
uses: actions/cache@v4
7878
with:
7979
path: ~/.cache/pip
8080
key: ${{ runner.os }}-pip-${{ hashFiles('doc/requirements.txt') }}
@@ -91,7 +91,7 @@ jobs:
9191
if: |
9292
github.event_name == 'pull_request' &&
9393
github.event.pull_request.head.repo.full_name == github.repository
94-
uses: peaceiris/actions-gh-pages@v3
94+
uses: peaceiris/actions-gh-pages@v4
9595
with:
9696
github_token: ${{secrets.GITHUB_TOKEN}}
9797
publish_dir: './_build/html'

CIME/Tools/case.setup

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ def parse_command_line(args, description):
7272
"Use should use this if you have local modifications to these files that you want to keep.",
7373
)
7474

75+
parser.add_argument(
76+
"--disable-git",
77+
action="store_true",
78+
help="Disable the interface to git, this will result in reduced provenance for your case.",
79+
)
80+
7581
parser.add_argument(
7682
"-N",
7783
"--non-local",
@@ -88,18 +94,31 @@ def parse_command_line(args, description):
8894
args.test_mode,
8995
args.reset,
9096
args.keep,
97+
args.disable_git,
9198
args.non_local,
9299
)
93100

94101

95102
###############################################################################
96103
def _main_func(description):
97104
###############################################################################
98-
caseroot, clean, test_mode, reset, keep, non_local = parse_command_line(
99-
sys.argv, description
100-
)
105+
(
106+
caseroot,
107+
clean,
108+
test_mode,
109+
reset,
110+
keep,
111+
disable_git,
112+
non_local,
113+
) = parse_command_line(sys.argv, description)
101114
with Case(caseroot, read_only=False, record=True, non_local=non_local) as case:
102-
case.case_setup(clean=clean, test_mode=test_mode, reset=reset, keep=keep)
115+
case.case_setup(
116+
clean=clean,
117+
test_mode=test_mode,
118+
reset=reset,
119+
keep=keep,
120+
disable_git=disable_git,
121+
)
103122

104123

105124
if __name__ == "__main__":

CIME/XML/env_mach_specific.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from CIME.XML.env_base import EnvBase
77
from CIME import utils
88
from CIME.utils import transform_vars, get_cime_root
9-
import string, resource
9+
import string, resource, platform
1010
from collections import OrderedDict
1111

1212
logger = logging.getLogger(__name__)
@@ -151,6 +151,10 @@ def load_env(self, case, force_method=None, job=None, verbose=False):
151151
def _get_resources_for_case(self, case):
152152
resource_nodes = self.get_children("resource_limits")
153153
if resource_nodes is not None:
154+
expect(
155+
platform.system() != "Darwin",
156+
"Mac OS does not support setting resource limits",
157+
)
154158
nodes = self._compute_resource_actions(resource_nodes, case)
155159
for name, val in nodes:
156160
attr = getattr(resource, name)

CIME/case/case_setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,9 @@ def _case_setup_impl(
521521

522522

523523
###############################################################################
524-
def case_setup(self, clean=False, test_mode=False, reset=False, keep=None):
524+
def case_setup(
525+
self, clean=False, test_mode=False, reset=False, keep=None, disable_git=False
526+
):
525527
###############################################################################
526528
caseroot, casebaseid = self.get_value("CASEROOT"), self.get_value("CASEBASEID")
527529
phase = "setup.clean" if clean else "case.setup"
@@ -565,7 +567,8 @@ def case_setup(self, clean=False, test_mode=False, reset=False, keep=None):
565567
caseroot=caseroot,
566568
is_batch=is_batch,
567569
)
568-
self._create_case_repo(caseroot)
570+
if not disable_git and not reset:
571+
self._create_case_repo(caseroot)
569572

570573

571574
def _create_case_repo(self, caseroot):

CIME/tests/test_sys_cime_case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ def test_cime_case_test_walltime_mgmt_8(self):
512512
# Frontier has 56 MAX_MPITASKS_PER_NODE so 5600 should require 100 nodes
513513
# which should land us in 6 hour queue
514514
test_name = "SMS_P5600.f19_g16_rx1.A"
515-
machine, compiler = "frontier", "gnu"
515+
machine, compiler = "frontier", "craygnu"
516516
casedir = self._create_test(
517517
[
518518
"--no-setup",
@@ -530,7 +530,7 @@ def test_cime_case_test_walltime_mgmt_8(self):
530530
"./xmlquery JOB_WALLCLOCK_TIME -N --subgroup=case.test --value",
531531
from_dir=casedir,
532532
)
533-
self.assertEqual(result, "06:00:00")
533+
self.assertEqual(result, "12:00:00")
534534

535535
result = self.run_cmd_assert_result(
536536
"./xmlquery JOB_QUEUE -N --subgroup=case.test --value", from_dir=casedir

0 commit comments

Comments
 (0)