Skip to content

3482 Add schema verification for metadata #3865

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

Merged
merged 34 commits into from
Mar 14, 2022

Conversation

Nic-Ma
Copy link
Contributor

@Nic-Ma Nic-Ma commented Feb 28, 2022

Task step 5 of #3482 .

Description

This PR added the utility to download schema and verify the metadata in a manifest.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma Nic-Ma mentioned this pull request Feb 28, 2022
17 tasks
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 28, 2022

Steps that generated the schema:

  1. Generate a draft schema with online tool:
    https://www.liquid-technologies.com/online-json-to-schema-converter
  2. Modify unnecessary or incorrect items in the schema.
  3. Add descriptions to the main items.

Thanks.

Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma mentioned this pull request Feb 28, 2022
7 tasks
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 28, 2022

It depends on PR #3832.

Thanks.

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 1, 2022

Hi @ericspod @wyli @rijobro ,

Due to the Blossom CI issue, we can't merge any PRs recently, this PR depends on #3832 (marked the dependency logic with FIXME in the code) but it's almost ready for review. Could you please help review this draft PR first?

Thanks in advance.

@Nic-Ma Nic-Ma requested review from rijobro, ericspod and wyli March 1, 2022 07:59
Copy link
Member

@ericspod ericspod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good to me, the DS_Store files need to be removed, and some pattern modified in .gitignore so that they don't show up again. We should discuss if adding the jsonschema dependency is a problem but I think it's fine as an optional.

Nic-Ma added 3 commits March 7, 2022 12:27
Signed-off-by: Nic Ma <nma@nvidia.com>
…2-add-schema-verify

Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma requested a review from wyli March 11, 2022 17:05
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 11, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 11, 2022

/build

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 12, 2022

/build

1 similar comment
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 12, 2022

/build

@Nic-Ma Nic-Ma force-pushed the 3482-add-schema-verify branch from bd35493 to 9be9daa Compare March 13, 2022 02:13
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 13, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 13, 2022

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 13, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 13, 2022

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 14, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 14, 2022

/build

Copy link
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looks good, could you move the schema.json to the testing data repository. Cc @ericspod in case there are more comments

Nic-Ma added 2 commits March 14, 2022 20:10
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma force-pushed the 3482-add-schema-verify branch from 0b182fa to 7e4c506 Compare March 14, 2022 13:21
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 14, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 14, 2022

/build

1 similar comment
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 14, 2022

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 14, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Mar 14, 2022

/build

@Nic-Ma Nic-Ma enabled auto-merge (squash) March 14, 2022 15:30
@Nic-Ma Nic-Ma merged commit f15ff93 into Project-MONAI:dev Mar 14, 2022
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

Successfully merging this pull request may close these issues.

3 participants