ncasuk / amf-check-writer

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

Update YAML write (dump) code to use CustomDumper #31

Closed agstephens closed 3 years ago

agstephens commented 4 years ago

This code shows how to create YAML with nice line breaks and it preserves the order of components based on an OrderedDict in the order they were added:

https://github.com/roocs/roocs-utils/blob/master/roocs_utils/inventory/inventory.py#L21-L44

gapintheclouds commented 3 years ago

I think this is sorted now. Please can you check the final product, @agstephens.

agstephens commented 3 years ago

Needs checking by @agstephens, before closing. Workflow should be something like:

download-from-drive /home/hugo/checker_data

mkdir /home/hugo/checker_data/vocab-cache

export PYESSV_ARCHIVE_HOME=/home/hugo/checker_data/vocab-cache

create-cvs /home/hugo/checker_data/v2.0/spreadsheets /home/hugo/checker_data/v2.0/cvs

create-yaml-checks /home/hugo/checker_data/v2.0/spreadsheets /home/hugo/checker_data/v2.0/yaml

amf-checker --yaml-dir /home/hugo/checker_data/v2.0/yaml /home/hugo/checker_data/training-data/Data/ncas-anemometer-1_ral_29001225_mean-winds_v0.1.nc --version 2.0
agstephens commented 3 years ago

Tested, and all works!