diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96bb5cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__ +**/*.xsd \ No newline at end of file diff --git a/v2.0pr1-to-v2.0/.gitkeep b/BRICR-to-v2.0/.gitkeep similarity index 100% rename from v2.0pr1-to-v2.0/.gitkeep rename to BRICR-to-v2.0/.gitkeep diff --git a/BRICR-to-v2.0/README.md b/BRICR-to-v2.0/README.md new file mode 100644 index 0000000..6a77ff2 --- /dev/null +++ b/BRICR-to-v2.0/README.md @@ -0,0 +1,68 @@ +## Setup +``` +python3 -m pip install -r requirements.txt +``` +For validation, might need to install [xmllint](https://linux.die.net/man/1/xmllint) if not on a Mac or Ubuntu machine. +Download the v2.0 schema locally +```bash +curl -o schema_2_0.xsd https://raw.githubusercontent.com/BuildingSync/schema/v2.0/BuildingSync.xsd +``` +## Steps +Overview: +- generate validation errors for original files +- using those errors, fix the files +- validate the fixed files +- replace the original files with the fixed files + +First step is to generate validation errors for the files. +```bash +# stdin: line separated paths to files to validate +# arg1: label for this validation run - e.g. initial_validation +# arg2: path to the local v2.0 xsd +# output: +# the names of files that failed validation are put in failed_