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: Make it easier to test migrators against a Mongo database #2067

Open
eecavanna opened this issue Jun 14, 2024 · 0 comments
Open
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request X SMALL Less than 8 hours, less than 1 day

Comments

@eecavanna
Copy link
Collaborator

eecavanna commented Jun 14, 2024

Today, there are several ways that people can test a migrator.

First, they can run the doctests in the migrator. That does not involve a Mongo database.

Second, they can use the "migration recursion" script that exists somewhere in this repo. That, too, does not involve a Mongo database.

Finally, they can create a python notebook (or any arbitrary Python script) and, within that script, import the migrator module, instantiate the migrator and the relevant adapter, set up a Mongo server, load original data into the database, and run the migrator. They could try and replicate the production notebooks in the nmdc-runtime repo in order to do this. As a result, they would be testing the migrator with a real Mongo database.

A team member asked me, today, how I recommend she test a specific migrator if she wanted to test it with a Mongo database.

As I was describing something like the third option above, I realized I haven't set things up to facilitate that type of testing yet. I do that type of testing often, but it is in an ad hoc way.

I'm creating this ticket to represent the task of simplifying the process by which team members can test migrators with a real Mongo database.

@eecavanna eecavanna added documentation Improvements or additions to documentation enhancement New feature or request X SMALL Less than 8 hours, less than 1 day labels Jun 14, 2024
@eecavanna eecavanna self-assigned this Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request X SMALL Less than 8 hours, less than 1 day
Projects
Status: No status
Development

No branches or pull requests

1 participant