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

Implement notebook that migrates database from schema v11.1.0 to v11.2.0 #813

Merged

Conversation

eecavanna
Copy link
Collaborator

In this branch, I did two main things: (a) I implemented a migration notebook for the December NMDC release and (b) I moved all the migration-related code to a different directory in the repo.

Details

The migration notebook can be used to migrate the Mongo database from conforming to nmdc-schema version 11.1.0 to conforming to nmdc-schema version 11.2.0.

I moved all the migration-related code from demo/metadata_migration/notebooks to db/migrations/notebooks (db is a new top-level directory—a name inspired by Ruby on Rails).

Related issue(s)

Fixes #808

Related subsystem(s)

  • Runtime API (except the Minter)
  • Minter
  • Dagster
  • Project documentation (in the docs directory)
  • Translators (metadata ingest pipelines)
  • MongoDB migrations
  • Other

Testing

  • I tested these changes (explain below)
  • I did not test these changes

The destination schema has not been released yet. I'll test this once it has. The notebook is a copy/paste of the previous notebook, with a couple cells removed and a couple strings updated.

Documentation

  • I have not checked for relevant documentation yet (e.g. in the docs directory)
  • I have updated all relevant documentation so it will remain accurate
  • Other (explain below)

Maintainability

  • Every Python function I defined includes a docstring (test functions are exempt from this)
  • Every Python function parameter I introduced includes a type hint (e.g. study_id: str)
  • All "to do" or "fix me" Python comments I added begin with either # TODO or # FIXME
  • I used black to format all the Python files I created/modified
  • The PR title is in the imperative mood (e.g. "Do X") and not the declarative mood (e.g. "Does X" or "Did X")

@eecavanna eecavanna self-assigned this Dec 6, 2024
@eecavanna eecavanna linked an issue Dec 6, 2024 that may be closed by this pull request
@eecavanna eecavanna merged commit 76c87ff into main Dec 6, 2024
2 checks passed
@eecavanna eecavanna deleted the 808-implement-migration-notebook-for-december-nmdc-release branch December 6, 2024 07:50
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.

Implement migration notebook for December NMDC Release
1 participant