Skip to content

Commit

Permalink
Move migration-related files into new top-level db/migrations/ folder
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna committed Dec 6, 2024
1 parent 55c7f94 commit a04a949
Show file tree
Hide file tree
Showing 24 changed files with 6 additions and 6 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pymongo.database import Database
from nmdc_schema.migrators.migrator_base import MigratorBase

from demo.metadata_migration.notebooks.bookkeeper import Bookkeeper, MigrationEvent
from db.migrations.notebooks.bookkeeper import Bookkeeper, MigrationEvent

# Consume environment variables.
MONGO_HOST: str = os.getenv("MONGO_HOST", "localhost")
Expand All @@ -36,7 +36,7 @@ class TestBookkeeper(unittest.TestCase):
Tests targeting the `Bookkeeper` class.
You can format this file like this:
$ python -m black demo/metadata_migration/notebooks/manual_test_bookkeeper.py
$ python -m black db/migrations/notebooks/manual_test_bookkeeper.py
You can start up a containerized MongoDB server like this:
$ docker run --rm --detach --name mongo-test-migration-bookkeeper -p 27017:27017 mongo
Expand All @@ -45,7 +45,7 @@ class TestBookkeeper(unittest.TestCase):
- host.docker.internal:27017
You can run these tests like this:
$ python -m unittest -v demo/metadata_migration/notebooks/manual_test_bookkeeper.py
$ python -m unittest -v db/migrations/notebooks/manual_test_bookkeeper.py
Reference: https://docs.python.org/3/library/unittest.html#basic-example
"""
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
from tempfile import NamedTemporaryFile as TempFile, mkdtemp
import shutil

from demo.metadata_migration.notebooks.helpers import Config
from db.migrations.notebooks.helpers import Config


class TestConfig(unittest.TestCase):
r"""
Tests targeting the `Config` class.
You can format this file like this:
$ python -m black demo/metadata_migration/notebooks/test_helpers.py
$ python -m black db/migrations/notebooks/test_helpers.py
You can run these tests like this:
$ python -m unittest -v demo/metadata_migration/notebooks/test_helpers.py
$ python -m unittest -v db/migrations/notebooks/test_helpers.py
Reference: https://docs.python.org/3/library/unittest.html#basic-example
"""
Expand Down

0 comments on commit a04a949

Please sign in to comment.