Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the amf-check-writer README file #59

Open
agstephens opened this issue Sep 21, 2021 · 1 comment
Open

Update the amf-check-writer README file #59

agstephens opened this issue Sep 21, 2021 · 1 comment
Assignees

Comments

@agstephens
Copy link
Contributor

Bring up to date with current state.

@agstephens
Copy link
Contributor Author

@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

  • $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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants