Skip to content

Commit bbbf65b

Browse files
authored
Merge pull request #210 from NOAA-GFDL/rename-split
Use fre-cli rename-split
2 parents b58cc89 + 4c1e5b4 commit bbbf65b

File tree

50 files changed

+90
-1419411
lines changed

Some content is hidden

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

50 files changed

+90
-1419411
lines changed

.github/workflows/create_test_conda_env.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -92,38 +92,6 @@ jobs:
9292
run: |
9393
pylint -v --rcfile ./pylintrc --fail-under 10.0 ./app/combine-statics
9494
95-
- name: rename-split-to-pp pytest
96-
run: |
97-
pytest -vv -rx app/rename-split-to-pp/tests
98-
99-
- name: rename-split-to-pp pylint
100-
run: |
101-
pylint -v --rcfile ./pylintrc --fail-under 3.2 ./app/rename-split-to-pp
102-
103-
- name: combine-timeavgs pytest (STEP CONTINUES ON FAILURE)
104-
continue-on-error: true
105-
run: |
106-
echo "i have no tests yet"
107-
pytest -vv -rx app/combine-timeavgs/tests
108-
109-
- name: combine-timeavgs pylint (STEP CONTINUES ON FAILURE)
110-
continue-on-error: true
111-
run: |
112-
echo "i am not python in any part yet"
113-
pylint -v --rcfile ./pylintrc --fail-under 0.0 ./app/combine-timeavgs
114-
115-
- name: make-timeavgs pytest (STEP CONTINUES ON FAILURE)
116-
continue-on-error: true
117-
run: |
118-
echo "i have no tests yet"
119-
pytest -vv -rx app/make-timeavgs/tests
120-
121-
- name: make-timeavgs pylint (STEP CONTINUES ON FAILURE)
122-
continue-on-error: true
123-
run: |
124-
echo "i am not python in any part yet"
125-
pylint -v --rcfile ./pylintrc --fail-under 0.0 ./app/make-timeavgs
126-
12795
- name: analysis pytest (STEP CONTINUES ON FAILURE)
12896
continue-on-error: true
12997
run: |

.github/workflows/test_cloud_runner.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -297,38 +297,6 @@ jobs:
297297
exit 2
298298
fi
299299
300-
- name: Print rename-split-to-pp successes or failures (FAILURE-GUARDED)
301-
continue-on-error: true
302-
run: |
303-
set +e
304-
# Successes
305-
success=$(grep -E "CYLC_JOB_EXIT=SUCCEEDED" /contrib-efs/container-test/ppp-setup/cylc-run/test_pp__ptest__ttest/log/job/*/rename-split-to-pp*/0[1-3]/job.status)
306-
exit_status_1=$?
307-
308-
# Failures
309-
failure=$(grep -E "CYLC_JOB_EXIT=ERR" /contrib-efs/container-test/ppp-setup/cylc-run/test_pp__ptest__ttest/log/job/*/rename-split-to-pp*/0[1-3]/job.status)
310-
exit_status_2=$?
311-
312-
if [ $exit_status_1 -eq 0 ]; then
313-
echo $success | sed 's/ /\n/g' #split string by spaces
314-
elif [ $exit_status_1 -eq 1 ]; then
315-
echo "No succeeded tasks found"
316-
else
317-
echo "WARNING: error with grep execution"
318-
exit 2
319-
fi
320-
321-
if [ $exit_status_2 -eq 0 ]; then
322-
echo "Failures found"
323-
echo $failure | sed 's/ /\n/g' #split string by spaces
324-
exit 1 #exit with error
325-
elif [ $exit_status_2 -eq 1 ]; then
326-
echo "No task failures found."
327-
else
328-
echo "WARNING: error with grep execution"
329-
exit 2
330-
fi
331-
332300
- name: Print split-netcdf successes or failures
333301
run: |
334302
set +e

Jinja2Filters/form_remap_dep.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def form_remap_dep(grid_type: str,
6363
# and omitted for secondary chunk generation.
6464
if output_type == "ts":
6565
if str(history_segment) == str(chunk):
66-
prereq_task = "rename-split-to-pp"
66+
prereq_task = "split-netcdf"
6767
else:
6868
prereq_task = "make-timeseries"
6969
elif output_type== "av":
@@ -151,13 +151,13 @@ def form_remap_dep(grid_type: str,
151151
for src in value:
152152
if makets_stmt != '':
153153
# make-timeseries and make-timeavgs tasks have the chunksize in the task name,
154-
# but rename-split-to-pp does not
155-
if prereq_task == 'rename-split-to-pp':
154+
# but split-netcdf does not
155+
if prereq_task == 'split-netcdf':
156156
makets_stmt = f"{makets_stmt} & {prereq_task}-{grid}_{src}"
157157
else:
158158
makets_stmt = f"{makets_stmt} & {prereq_task}-{grid}-{chunk}_{src}"
159159
else:
160-
if prereq_task == 'rename-split-to-pp':
160+
if prereq_task == 'split-netcdf':
161161
makets_stmt = f"{prereq_task}-{grid}_{src}"
162162
else:
163163
makets_stmt = f"{prereq_task}-{grid}-{chunk}_{src}"

Jinja2Filters/get_climatology_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ def graph(self, history_segment, clean_work):
8080
connector = " & "
8181
if count == 0:
8282
if self.pp_chunk == history_segment:
83-
graph += f"{connector}rename-split-to-pp-{grid}_{source}"
83+
graph += f"{connector}split-netcdf-{grid}_{source}"
8484
else:
8585
graph += f"{connector}make-timeseries-{grid}-{self.pp_chunk}_{source}"
8686
else:
8787
offset = count * self.pp_chunk
8888
if self.pp_chunk == history_segment:
89-
graph += f" & rename-split-to-pp-{grid}_{source}[{offset}]"
89+
graph += f" & split-netcdf-{grid}_{source}[{offset}]"
9090
else:
9191
graph += f" & make-timeseries-{grid}-{self.pp_chunk}_{source}[{offset}]"
9292
count += 1

Jinja2Filters/tests/form_remap_dep_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def sample_yaml(tmp_path):
4040

4141
def test_regrid_one_one(sample_yaml):
4242
"""atmos regrid 1-year history to 1-year timeseries"""
43-
result = "rename-split-to-pp-regrid_atmos_daily & rename-split-to-pp-regrid_atmos_month => remap-pp-components-ts-P1Y_atmos\n"
43+
result = "split-netcdf-regrid_atmos_daily & split-netcdf-regrid_atmos_month => remap-pp-components-ts-P1Y_atmos\n"
4444
assert result == form_remap_dep.form_remap_dep(grid_type='regrid-xy',
4545
temporal_type='temporal',
4646
chunk='P1Y',
@@ -74,7 +74,7 @@ def test_regrid_two_one(sample_yaml):
7474

7575
def test_native_one_one(sample_yaml):
7676
"""land native 1-year history to 1-year timeseries"""
77-
result = "rename-split-to-pp-native_land_daily & rename-split-to-pp-native_land_month & rename-split-to-pp-native_river => remap-pp-components-ts-P1Y_land_cubic\n"
77+
result = "split-netcdf-native_land_daily & split-netcdf-native_land_month & split-netcdf-native_river => remap-pp-components-ts-P1Y_land_cubic\n"
7878
assert result == form_remap_dep.form_remap_dep(grid_type='native',
7979
temporal_type='temporal',
8080
chunk='P1Y',

app/combine-timeavgs/bin/combine-timeavgs

Lines changed: 0 additions & 127 deletions
This file was deleted.

app/combine-timeavgs/rose-app.conf

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/make-timeavgs/bin/make-timeavgs

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)