-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add schema and config validation to jsonschema package #740
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t value to float if needed.
… Replaces load and validation in assignValuesFromFile to use these instead.
…go from template library
shreyas-goenka
changed the title
[WIP] Add schema and config validation to jsonschema package
Add schema and config validation to jsonschema package
Sep 7, 2023
note: added a unit test for LoadInstance , the PR is ready for review. |
pietern
reviewed
Sep 7, 2023
pietern
approved these changes
Sep 7, 2023
arpitjasa-db
pushed a commit
to arpitjasa-db/cli
that referenced
this pull request
Sep 7, 2023
## Changes At a high level this PR adds new schema validation and moves functionality that should be present in the jsonschema package, but resides in the template package today, to the jsonschema package. This includes for example schema validation, schema instance validation, to / from string conversion methods etc. The list below outlines all the pieces that have been moved over, and the new validation bits added. This PR: 1. Adds casting default value of schema properties to integers to the jsonschema.Load method. 2. Adds validation for default value types for schema properties, checking they are consistant with the type defined. 3. Introduces the LoadInstance and ValidateInstance methods to the json schema package. These methods can be used to read and validate JSON documents against the schema. 4. Replaces validation done for template inputs to use the newly defined JSON schema validation functions. 5. Moves to/from string and isInteger utility methods to the json schema package. ## Tests Existing and new unit tests. Signed-off-by: Arpit Jasapara <arpit.jasapara@databricks.com>
pietern
added a commit
that referenced
this pull request
Sep 11, 2023
Bundles: * Fix conversion of job parameters ([#744](#744)). * Add schema and config validation to jsonschema package ([#740](#740)). * Support Model Serving Endpoints in bundles ([#682](#682)). * Do not include empty output in job run output ([#749](#749)). * Fixed marking libraries from DBFS as remote ([#750](#750)). * Process only Python wheel tasks which have local libraries used ([#751](#751)). * Add enum support for bundle templates ([#668](#668)). * Apply Python wheel trampoline if workspace library is used ([#755](#755)). * List available targets when incorrect target passed ([#756](#756)). * Make bundle and sync fields optional ([#757](#757)). * Consolidate environment variable interaction ([#747](#747)). Internal: * Update Go SDK to v0.19.1 ([#759](#759)).
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 11, 2023
Bundles: * Fix conversion of job parameters ([#744](#744)). * Add schema and config validation to jsonschema package ([#740](#740)). * Support Model Serving Endpoints in bundles ([#682](#682)). * Do not include empty output in job run output ([#749](#749)). * Fixed marking libraries from DBFS as remote ([#750](#750)). * Process only Python wheel tasks which have local libraries used ([#751](#751)). * Add enum support for bundle templates ([#668](#668)). * Apply Python wheel trampoline if workspace library is used ([#755](#755)). * List available targets when incorrect target passed ([#756](#756)). * Make bundle and sync fields optional ([#757](#757)). * Consolidate environment variable interaction ([#747](#747)). Internal: * Update Go SDK to v0.19.1 ([#759](#759)).
hectorcast-db
pushed a commit
that referenced
this pull request
Oct 13, 2023
Bundles: * Fix conversion of job parameters ([#744](#744)). * Add schema and config validation to jsonschema package ([#740](#740)). * Support Model Serving Endpoints in bundles ([#682](#682)). * Do not include empty output in job run output ([#749](#749)). * Fixed marking libraries from DBFS as remote ([#750](#750)). * Process only Python wheel tasks which have local libraries used ([#751](#751)). * Add enum support for bundle templates ([#668](#668)). * Apply Python wheel trampoline if workspace library is used ([#755](#755)). * List available targets when incorrect target passed ([#756](#756)). * Make bundle and sync fields optional ([#757](#757)). * Consolidate environment variable interaction ([#747](#747)). Internal: * Update Go SDK to v0.19.1 ([#759](#759)).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
At a high level this PR adds new schema validation and moves functionality that should be present in the jsonschema package, but resides in the template package today, to the jsonschema package. This includes for example schema validation, schema instance validation, to / from string conversion methods etc.
The list below outlines all the pieces that have been moved over, and the new validation bits added.
This PR:
Tests
Existing and new unit tests.