Skip to content

Commit

Permalink
refactor: make QA env variable names consistent (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks authored Aug 1, 2023
1 parent fd821be commit c774b05
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions qa-physics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ Data monitoring tools for CLAS12 physics-level QA and [QADB](https://github.com/
* some primary run scripts do this automatically, in case the user forgets
* note: `JYPATH` is added to the classpath for groovy called via
`run-groovy`, from `coatjava`
* the variable `CLASQAWWW` is the webserver directory to which the output
* the variable `TIMELINEDIR` is the webserver directory to which the output
hipo files will be copied; this is a directory which the front-end will
read in order to produce the web page version of the timelines. If you are
not using this feature, change `CLASQAWWW` to any local directory; if you
not using this feature, change `TIMELINEDIR` to any local directory; if you
don't want to edit `env.sh`, then simply create the directory `../www`,
which is the default value of `CLASQAWWW`
which is the default value of `TIMELINEDIR`

## PASS1 Procedure for Automatic QA
* prepare run-group dependent settings in `monitorRead.groovy`
Expand Down Expand Up @@ -88,7 +88,7 @@ Data monitoring tools for CLAS12 physics-level QA and [QADB](https://github.com/
* perform the manual QA (see QA procedure below)
* if this is the **FINAL** version of the timeline:
* release timeline to main run group's directory: use `releaseTimelines.sh`
* the variable `$CLASQAWWW` should point to the webserver directory
* the variable `$TIMELINEDIR` should point to the webserver directory
* **WARNING:** this is where we store "final" versions of QA timelines; only run
`releaseTimelines.sh` if you are certain they are ready for release

Expand Down
2 changes: 1 addition & 1 deletion qa-physics/deployTimelines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
dataset=$1
destdir=$2

wwwdir="${CLASQAWWW}/$(whoami)"
wwwdir="${TIMELINEDIR}/$(whoami)"

mkdir -p ${wwwdir}/${destdir}
rm -r ${wwwdir}/${destdir}
Expand Down
5 changes: 2 additions & 3 deletions qa-physics/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ else
export CLASQA=$(dirname $(realpath ${BASH_SOURCE[0]}))
fi

export CLASQAWWW="/u/group/clas/www/clas12mon/html/hipo"
export TIMELINEDIR="/u/group/clas/www/clas12mon/html/hipo"
JYPATH="${JYPATH}:${CLASQA}"
export JYPATH=$(echo $JYPATH | sed 's/^://')
export CLASQA_JAVA_OPTS="-Djava.awt.headless=true"

echo """
--- Environment ---
COATJAVA = $COATJAVA
CLASQA = $CLASQA
CLASQAWWW = $CLASQAWWW
TIMELINEDIR = $TIMELINEDIR
JYPATH = $JYPATH
CLASQA_JAVA_OPTS = $CLASQA_JAVA_OPTS
-------------------
Expand Down
2 changes: 1 addition & 1 deletion qa-physics/indexPage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import static groovy.io.FileType.FILES
import groovy.json.JsonOutput

def wwwDirName = System.getenv("CLASQAWWW") + "/" + System.getenv("LOGNAME")
def wwwDirName = System.getenv("TIMELINEDIR") + "/" + System.getenv("LOGNAME")
if(args.length>=1) wwwDirName = args[0]

def wwwDir = new File(wwwDirName)
Expand Down
4 changes: 2 additions & 2 deletions qa-physics/releaseTimelines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fi
dataset=$1
rungroup=$(echo $dataset|sed 's/_.*$//g')

wwwReleaseDir="${CLASQAWWW}/${rungroup}/pass1/qa"
wwwLocalDir="${CLASQAWWW}/$(whoami)"
wwwReleaseDir="${TIMELINEDIR}/${rungroup}/pass1/qa"
wwwLocalDir="${TIMELINEDIR}/$(whoami)"

echo "dataset=$dataset"
echo "rungroup=$rungroup"
Expand Down

0 comments on commit c774b05

Please sign in to comment.