ncasuk / amf-check-writer

Library to write AMF compliance checks
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Update the amf-check-writer README file #59

Open agstephens opened 3 years ago

agstephens commented 3 years ago

Bring up to date with current state.

agstephens commented 3 years ago

@gapintheclouds, here are some of my notes from elsewhere...

New workflow

The create yaml and CSV file scripts need to be made properly aware of dataset versions.

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

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.

Simplified workflow: (1) download, (2) make checks, (3) make CVs

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