Skip to content
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

New module build_schema #273

Draft
wants to merge 25 commits into
base: develop
Choose a base branch
from
Draft

Conversation

Daniel-VM
Copy link
Member

@Daniel-VM Daniel-VM commented Jun 19, 2024

PR Description

This pull request introduces a new module, build_schema.py, designed to parse a database definition in XLSX format and convert it into two files simultaneously: relecov schema definition (relecov_tools/schema/relecov_schema.json) and Metadata-Lab Template (XLSX file template for entering lab metadata).

Additionally, this module will generate and save a report that compares the updated version of relecov_schema.json with its previous version after each execution of the module, while also tracking versioning.

Major features and Implementations::

  1. Schema Draft Template Creation: Loads a JSON schema draft template based on the specified version.
  2. Base schema retrieval: get the in-use schema (relecov_tools/schema/relecov_schema.json).
  3. Building a New Schema: Constructs a new json schema based on the database definitions and the draft skeleton. It is able to handle various schema properties.
  4. Validation of the new schema: Ensures that the new schema follows JSON schema definition based on version draft.
  5. Create new Schema and prints diff: Compares and prints differences between the base schema and the new schema. If allowed, this method will generate the new JSON Schema.
  6. Handling schema building process: Orchestrates the schema building process.

Utility functions

  1. Creates JSON schema draft/template version.
  2. Checks if JSON schema draft version is available.
  3. Validates whether the JSON schema follows the JSON meta-schema specification rules (according to the selected version).

Closes #259

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.

Create new module to generate, update and track JSON schema versions
2 participants