Open agstephens opened 3 years ago
@gapintheclouds, here are some of my notes from elsewhere...
This should be more explicit so you do not have to set the output paths. Everything should be written and read to/from a standard location, such as
$D/<version>/product-definitions/spreadsheet/
# For: ncasuk/AMF_CVs/product-definitions/spreadsheet/$D/<version>/product-definitions/tsv/
# For: ncasuk/AMF_CVs/product-definitions/tsv/$D/<version>/AMF_CVs/
# For: ncasuk/AMF_CVs/AMF_CVs$D/<version>/pyessv-vocabs/
# For: ncasuk/AMF_CVs/pyessv-vocabs$D/<version>/checks/
# For: ncasuk/amf-compliance-checks/And maybe we only provide the output base directory to each script, and a separate version parameter, that would dictate <version>
and put everything in the right place.
Define a temporary output directory and create it:
export DATA_DIR=$PWD/checks-data
mkdir -p $DATA_DIR
Set the version of the checks/vocabs to use:
VERSION=v2.0
Download the content of the Google spreadsheet vocabularies/rules into local files:
download-from-drive -v $VERSION --regenerate --secrets client-secret.json $DATA_DIR
Run a script to create the YAML representation of the checks:
create-yaml-checks -s $DATA_DIR -v $VERSION
Run a script to create the Controlled Vocabularies (in JSON and PYESSV formats):
create-cvs -s $DATA_DIR -v $VERSION
Run an example check (maybe having downloaded the training data):
# Set the PYESSV DIRECTORY TO USE:
export PYESSV_ARCHIVE_HOME=$DATA_DIR/$VERSION/pyessv-vocabs
# Run the checker on some test data
TEST_FILE=../NCAS-Data-Project-Training-Data/Data/ncas-anemometer-1_ral_29001225_mean-winds_v0.1.nc
amf-checker --yaml-dir $DATA_DIR/$VERSION/checks $TEST_FILE --version $VERSION
Bring up to date with current state.