This note describes the organization of LSST CCD test result files and the run-time environment in which software that implements a station or an analysis (collectively, a "test") must expect. This note is written to guide test software developers. Some details of implementation are omitted.
Production runs of a test software job execute from a well defined environment. This environment is setup1 and the job is run via the job harness. The environment defines general and specific, per-job variables that the test software must use in order to locate input and output files.
The test software must place all of its output files under the directory defined by the environment variable:
$LCATR_OUTPUT_DIR
A job will be started inside this directory and it must not produce any files outside of this directory. Any files or sub-directories that are produced should be named consistently from job to job. In particular, names should not encode specifics about the job such as CCD ID or date or time stamps.
Some test software will require as input the results from other test jobs that have run previously. The location of these files are specified external to the job and are communicated to the job through environment variables of the form:
$LCATR_<NAME>_DIR
Where <NAME> is replaced by the (capitalized) canonical name of the
test software that produced it. The test software relies on a static
naming convention for locating files or sub-directories at this
location.
Test software is installed by the software manager given a git commit identifier (tag or SHA1 hash) by the software developer. The installation is described by the environment variables:
$LCATR_<NAME>_HOME$LCATR_<NAME>_VERSION$LCATR_<NAME>_GIT_HASHIn addition variables like $PATH will be suitably modified.
See ./modulesfiles.org for how the environment is to be defined.
Some standard environment variables are defined on a per-job basis:
$LCATR_JOB_ID$LCATR_UNIT_ID$LCATR_UNITD_TYPE$LCATR_JOB$LCATR_VERSION$LCATR_STAMPAdditional environment may be provided to the job. This can consist of information derived from the environment or as a means for passing in input parameters. The test software development should communicate with the software manager what is required.
The test software jobs should not assume any understanding of the details of the file system organization except as specified by the environment described above or in test-specific static naming conventions.
That said, the file system is organized to achieve:
The file system holding the results from all test software has a single root. This root will likely differ from site to site but the structure below it must be identical between sites and as described here. The test software must not make reference to file system paths outside this root. This root is defined by the environment variable:
$LCATR_ROOT
While this variable is exposed to the jobs the test software should rely on specific variables (described below) to locate files.
The path to a location containing result files (ie,
$LCATR_OUTPUT_DIR or $LCATR_<NAME>_DIR) is constructed from
sub-directories named, in order, by these elements:
<CCD_ID> the identifier for the CCD tested.
<NAME> the canonical name for the test.
<VERSION> the version of the test software
<JOB_ID> the unique job identifer
A general output path would then be:
LCATR_<NAME>_DIR=$LCATR_ROOT/<CCD_ID>/<NAME>/<VERSION>/<JOB_ID>/
It is noted that the values ofr these individual elements are exposed to the job as described above.
Production runs of the test software execute from a well defined environment. This environment is setup and the job is run via the job harness. The environment defines general and specific, per-job variables that must be used to locate files.
The file system holding the results from all test software has a single root. This root will likely differ from site to site but the structure below it must be identical between sites and as described here. This root is defined by the environment variable:
$LCATR_ROOT
While this variable is exposed to the jobs the test software should rely on specific variables (described below) to locate files.
The test software must place all output files under the directory defined by the environment variable:
$LCATR_OUTPUT_DIR
A job should not produce any files outside of this directory.
Some test software will require the results from other test jobs that have run previously. The dependency on these files are specified external to the job and are communicated to the job through environment variables of the form:
$LCATR_<NAME>_DIR
Where <NAME> is replaced by the canonical name of the test software
that produced it.
The test software jobs should not assume any understanding of the
details of the file system organization except the
$LCATR_OUTPUT_DIR and $LCATR_<NAME>_DIR variables described
above. That said, the file system is organized to allow for
convenient browsing and self documenting discovery of its contents.
The path to an output directory under $LCATR_ROOT is constructed
from these elements:
<CCD_ID><NAME><STAMP>The test software is run by the job harness which sets the job's environment1. This environment must provide all run-time environment that the job needs including the variables described above and in this section. Test software and job harness authors must coordinate on this issue.
The test software can rely on the following environment variables:
$LCATR_<NAME>_HOME$LCATR_<NAME>_VERSIONgit commit tag)
$LCATR_<NAME>_GIT_HASHgit commit SHA1 hash
Each test software may require additional environment either derived from the variables described in this note or in order to specify job input parameters. They will be set in this same manner.
1 Environment is managed by Modules (http://modules.sf.net) or similar.
Date: 2014-10-03 11:48:51 PDT
HTML generated by org-mode 6.21b in emacs 23