Skip to content

Commit

Permalink
Update zenodo json template and report_results script (CICE-Consortiu…
Browse files Browse the repository at this point in the history
…m#370)

* update zenodo json template and report_results script

* update .gitignore add testsuite*

* update zenodo json file

* update gitignore again and add ciceexe cleanup
  • Loading branch information
apcraig authored Oct 22, 2019
1 parent 333a5a2 commit 2a2b107
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 62 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ doc/build

# Ignore macOS cache files
.DS_Store

# Ignore testsuite file/directories
testsuite*
caselist*
10 changes: 4 additions & 6 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"license": "other-open",
"description": "No description provided",
"language": "English",
"language": "eng",
"title": "CICE-Consortium/CICE: CICE Version m.n.p",
"keywords": [
"sea ice model, CICE, Icepack"
Expand Down Expand Up @@ -37,7 +37,7 @@
},
{
"affiliation": "National Oceanographic and Atmospheric Administration (CTR)",
"name": "Tony Craig"
"name": "Anthony Craig"
},
{
"affiliation": "Environment and Climate Change Canada",
Expand Down Expand Up @@ -80,7 +80,7 @@
"name": "Andrew Roberts"
},
{
"affiliation": "Naval Research Laboratory Stennis Space Center (CTR)",
"affiliation": "Los Alamos National Laboratory",
"name": "Matthew Turner"
},
{
Expand All @@ -91,14 +91,12 @@
"access_right": "open",
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/CICE-Consortium/CICE/tree/CICE6.0.1",
"relation": "isSupplementTo"
},
{
"scheme": "doi",
"identifier": "10.5281/zenodo.1205674",
"relation": "isVersionOf"
"relation": "isNewVersionOf"
}
]
}
9 changes: 9 additions & 0 deletions cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,15 @@ end
if ( ${dosuite} == 1 ) then
# Delete reused ciceexe files at the end to save space
foreach file (${tsdir}/suite.run ${tsdir}/suite.submit)
cat >> $file << EOF0
set nonomatch && rm -f ciceexe.* && unset nonomatch
EOF0
end
# Add code to results.csh to count the number of failures
cat >> ${tsdir}/results.csh << EOF
cat ./results.log
Expand Down
58 changes: 2 additions & 56 deletions configuration/scripts/tests/report_results.csh
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,17 @@ set compilers = `grep -v "#" results.log | grep ${mach}_ | cut -d "_" -f 2 | sor
#echo "debug ${fail}"
#echo "debug ${cases}"

set xcdat = `echo $cdat | sed 's|-||g' | cut -c 3-`
set xcdat = `echo $cdat | cut -c 3-`
set xctim = `echo $ctim | sed 's|:||g'`
set shrepo = `echo $repo | tr '[A-Z]' '[a-z]'`

set tsubdir = cice_master
set hfile = "cice_by_hash"
set mfile = "cice_by_mach"
set vfile = "cice_by_vers"
set bfile = "cice_by_bran"
if ("${shrepo}" !~ "*cice-consortium*") then
set tsubdir = cice_dev
set hfile = {$hfile}_forks
set mfile = {$mfile}_forks
set vfile = {$vfile}_forks
set bfile = {$bfile}_forks
endif

set noglob
Expand Down Expand Up @@ -287,10 +283,8 @@ EOF
set hashfile = "${wikiname}/${tsubdir}/${hfile}.md"
set machfile = "${wikiname}/${tsubdir}/${mfile}.md"
set versfile = "${wikiname}/${tsubdir}/${vfile}.md"
set branfile = "${wikiname}/${tsubdir}/${bfile}.md"
foreach xfile ($hashfile $machfile $versfile $branfile)
foreach xfile ($hashfile $machfile)
if (-e ${xfile}) then
cp -f ${xfile} ${xfile}.prev
endif
Expand Down Expand Up @@ -319,29 +313,6 @@ else
sed -i "$nline a | ${mach} | ${compiler} | ${vers} | ${cdat} | ${tcolor} ${tfail}, ${tunkn} | ${rcolor} ${rfail}, ${rothr} | [${ttotl}](${ofile}) | " ${hashfile}
endif
#=====================
# update versfile
#=====================
set chk = 0
if (-e ${versfile}) set chk = `grep "\*\*${vers}" ${versfile} | wc -l`
if ($chk == 0) then
cat >! ${versfile} << EOF
**${vers}** :
| machine | compiler | hash | date | test fail | comp fail | total |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| ${mach} | ${compiler} | ${shhash} | ${cdat} | ${tcolor} ${tfail}, ${tunkn} | ${rcolor} ${rfail}, ${rothr} | [${ttotl}](${ofile}) |
EOF
if (-e ${versfile}.prev) cat ${versfile}.prev >> ${versfile}
else
set oline = `grep -n "\*\*${vers}" ${versfile} | head -1 | cut -d : -f 1`
@ nline = ${oline} + 3
sed -i "$nline a | ${mach} | ${compiler} | ${shhash} | ${cdat} | ${tcolor} ${tfail}, ${tunkn} | ${rcolor} ${rfail}, ${rothr} | [${ttotl}](${ofile}) | " ${versfile}
endif
#=====================
# update machfile
#=====================
Expand All @@ -365,29 +336,6 @@ else
sed -i "$nline a | ${vers} | ${shhash} | ${compiler} | ${cdat} | ${tcolor} ${tfail}, ${tunkn} | ${rcolor} ${rfail}, ${rothr} | [${ttotl}](${ofile}) | " ${machfile}
endif
#=====================
# update branfile
#=====================
set chk = 0
if (-e ${branfile}) set chk = `grep "\*\*${bran}" ${branfile} | wc -l`
if ($chk == 0) then
cat >! ${branfile} << EOF
**${bran}** **${repo}**:
| machine | compiler | hash | date | test fail | comp fail | total |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| ${mach} | ${compiler} | ${shhash} | ${cdat} | ${tcolor} ${tfail}, ${tunkn} | ${rcolor} ${rfail}, ${rothr} | [${ttotl}](${ofile}) |
EOF
if (-e ${branfile}.prev) cat ${branfile}.prev >> ${branfile}
else
set oline = `grep -n "\*\*${bran}" ${branfile} | head -1 | cut -d : -f 1`
@ nline = ${oline} + 3
sed -i "$nline a | ${mach} | ${compiler} | ${shhash} | ${cdat} | ${tcolor} ${tfail}, ${tunkn} | ${rcolor} ${rfail}, ${rothr} | [${ttotl}](${ofile}) | " ${branfile}
endif
#foreach compiler
end
Expand All @@ -400,8 +348,6 @@ git add ${tsubdir}/${shhash}.${mach}*.md
git add ${tsubdir}/${ofile}.md
git add ${tsubdir}/${hfile}.md
git add ${tsubdir}/${mfile}.md
git add ${tsubdir}/${vfile}.md
git add ${tsubdir}/${bfile}.md
git commit -a -m "update $hash $mach"
git push origin master
cd ../
Expand Down

0 comments on commit 2a2b107

Please sign in to comment.