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

Migrations: Update notebook to perform LinkML validation and allow database name configuration #750

Conversation

eecavanna
Copy link
Collaborator

@eecavanna eecavanna commented Nov 2, 2024

In this branch:

  1. I made it so the migration notebook gets the database name from the notebook configuration file instead of from strings hard-coded in the notebook. This will allow people to use a single MongoDB server when running the notebook, instead of requiring them to use two separate MongoDB servers.
  2. I made it so the migration notebook uses LinkML's Validator class instead of using the jsonschema package directly, to validate the transformed data.
  3. Delete some obsolete variables from a test.

Fixes #749 and #746

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • I performed a migration locally, using a single MongoDB server as both the origin and transformation server

Definition of Done (DoD) Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works, incl. considering downstream usage (e.g. https://github.com/microbiomedata/notebook_hackathons) if applicable.

That's because it cannot be used when restoring into the same
server as that on which the dumped database resides.
@eecavanna eecavanna changed the title Update migration notebook so database name is configurable (not hard coded to nmdc) Migrations: Update notebook so database name is configurable and LinkML validation is used Nov 2, 2024
@eecavanna eecavanna marked this pull request as ready for review November 2, 2024 07:03
@eecavanna eecavanna changed the title Migrations: Update notebook so database name is configurable and LinkML validation is used Migrations: Update notebook to perform LinkML validation and allow database name configuration Nov 2, 2024
@eecavanna eecavanna merged commit 6463463 into main Nov 2, 2024
2 checks passed
@eecavanna eecavanna deleted the 749-migrations-update-migration-notebook-so-database-name-is-configurable-not-hard-coded-to-nmdc branch November 2, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant