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
- Create a python file and import the
ci-cmg-mb-cruise-migration
package. - Create an instance of the "Migrator" class, passing in the path to your config file as the only parameter.
- 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
- setup virtualenv
- specify python installation for virtualenv to use
- activate the virtual environment
- verify python version and virtualenv
- install required modules
- verify they were installed with pip list
- deactivate the virtual environment
virtualenv migenv
virtualenv --python=</path/to/python> </path/to/new/virtualenv/>
source ./migenv/bin/activate
python which
python -V
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
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: from project root:
python -m unittest discover tests
To stop docker containers: from test dir:
./stop-it.sh
build project
- Update version in pyproject.toml either before or after release.
- If not already installed:
python -m pip install --upgrade build
- Build distribution:
python -m build
- If not already installed:
python -m pip install --upgrade twine
- Upload to pypi:
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ci_cmg_mb_cruise_migration-1.25.tar.gz
.
File metadata
- Download URL: ci_cmg_mb_cruise_migration-1.25.tar.gz
- Upload date:
- Size: 701.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a5f9a3dbd1ce2a2c0491b637ccddb66904ee0d8ec0b6a98e37ae24a8ebd6c8 |
|
MD5 | fadbbe0a00c2777e2849c9f880193e68 |
|
BLAKE2b-256 | 79845a2115f260abae366d2fe4ba5848b062f2ee729b1de6b1aba421d2b6f723 |
File details
Details for the file ci_cmg_mb_cruise_migration-1.25-py3-none-any.whl
.
File metadata
- Download URL: ci_cmg_mb_cruise_migration-1.25-py3-none-any.whl
- Upload date:
- Size: 87.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e2150297d0a72331f4a6afe8e0a9841439db889e052cb6bad259c060c0fa263 |
|
MD5 | 1db8b747d541c25b6c5bd5c5557c18c4 |
|
BLAKE2b-256 | a51e108b826e2356fb26efecefe6674a447f260cbe525420130b77ed0ce56613 |