Validate input-files with Pydantic and add CLI for validation #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary (WIP)
Warning⚠️ ☢️ Because I only have implemented this for CTGAN merging to develop will break the whole pipeline. So should only merge once/if every input type has a schema implemented. Also requires additional info for CTGAN for complete validation
I was going to point this at #45 but as it's behind
develop
its impossible to see diffs.schema
for defining schema for input-json files using Pydantic. Pydantic can also generate JSON Schemasynthesize.py
using the moduleDependencies
I added these to
env-configurations
but maybe this is not the best place. If we like the CLI maybe it should be a package.Reviewer notes
Test out the CLI:
Docs
Validate an input file (mess with the file to see errors)
But only implemented for CTGAN at the moment (see error)
Get JSON Schema for a given method
Create an input file in a browser (from @ots22 )
May want better command names. Because I haven't added any info for validating beyond field names and types the webform is quite minimal.
I thought one form per method type might be best? Thoughts @ots22 ?