Skip to main content

migrates multibeam metadata from mb schema to cruise schema

Project description

mb-cruise-migration

Migration scripts for migrating multibeam metadata from MB schema to CRUISE schema.

Usage: Migration Instructions

  1. Create a python file and import the ci-cmg-mb-cruise-migration package.
  2. Create an instance of the "Migrator" class, passing in the path to your config file as the only parameter.
  3. Run the "migrate" method.
  • An example run and start_background shell script is provided, which should be used to run the python script in the background.
  • The package and it's dependencies will need to be installed prior to usage. This can be done with python -m pip install ci-cmg-mb-cruise-migration.

NOTE: if enabling pooled connections for cruise db in config, oracle client libraries need to also be installed: https://python-oracledb.readthedocs.io/en/latest/user_guide/installation.html#optionally-install-oracle-client

Developing Project

Setup virtual environment

  1. setup virtualenv
  2. specify python installation for virtualenv to use
  3. activate the virtual environment
  4. verify python version and virtualenv
  5. install required modules
  6. verify they were installed with pip list
  7. deactivate the virtual environment
virtualenv migenv

virtualenv --python=</path/to/python> </path/to/new/virtualenv/>

source ./migenv/bin/activate

which python
python -V

python -m pip install --upgrade poetry
poetry install

pip list

deactivate

run tests

Many (most) tests are integration tests and require either one or both the MB or CRUISE schema docker containers be running.

To start docker containers:

from test dir:

./start-it.sh

To run tests (outside env):

from project root:

# runs all tests
./run_tests 

# runs a test file
./run_tests <test filename>

To run tests (inside env):

cd tests
./start-it.sh
pytest

To stop docker containers:

from test dir:

./stop-it.sh

build project

  1. Update version in pyproject.toml either before or after release.
  2. If not already installed: python -m pip install --upgrade build
  3. Build distribution: python -m build
  4. If not already installed: python -m pip install --upgrade twine
  5. Upload to pypi: twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ci_cmg_mb_cruise_migration-1.28.1.tar.gz (714.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ci_cmg_mb_cruise_migration-1.28.1-py3-none-any.whl (87.9 kB view details)

Uploaded Python 3

File details

Details for the file ci_cmg_mb_cruise_migration-1.28.1.tar.gz.

File metadata

File hashes

Hashes for ci_cmg_mb_cruise_migration-1.28.1.tar.gz
Algorithm Hash digest
SHA256 6a068f8b127b4240503d55183409e726608d59cc37ca06d74389eb0b29c21429
MD5 50b4cf0f966ce1bdae803a6dd71c453f
BLAKE2b-256 f753e0c1322f4a30cac0ab174fcacf37ffb931fb35dc6815a38a57a78f27ee62

See more details on using hashes here.

File details

Details for the file ci_cmg_mb_cruise_migration-1.28.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ci_cmg_mb_cruise_migration-1.28.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe75ab04db343ba377945a9855135cec055667aaefc3df2d457bcaf9c61d2651
MD5 d4327d0e8c69097bacca4b85beefab6e
BLAKE2b-256 a0bfec06043941da7812f75fc11ebdad1c517678f9519dc635a783b9c26dbda2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page