IMPORTANT NOTE: THIS REPOSITORY IS NOW RETIRED. CURRENT TRANSACTIONAL DB IS HERE
Transactional database holding pre-aggregated data that services the outcomes warehouse
To set up in local development environment:
-
Install Python 3.6.1 as applicable using downloads here
-
Pip install the virtualenv module
python3 -m pip install -U virtualenv -
Get latest source code from repository
git clone https://github.com/workforce-data-initiative/tpot-warehouse.git cd tpot-warehouse
-
Update
sqlite.transactional.databaseelement inconf/db.dev.ymlwith the absolute path to the location where SQLite database file will be saved.Note: The
.dbfile will be created when the migration(s) are run however all parent directories need to exist and current user have w+ permissions on those directories -
Create Python virtualenv and install requirements
python3 -m venv ${VENV_NAME} ${ENV_DIR} . ${ENV_DIR}/bin/activate pip install -r requirements.dev.txt -
Run tests to verify install
PYTHONPATH="." pytest -v -s --name transactional --adapter sqlite \ --dbconf conf/db.dev.yml tests/test_dbtransactional.py -
Run migrations to setup local transactional database instance
PYTHONPATH='.' alembic -c alembic.ini -n transactional \ -x dbconf=conf/db.dev.yml -x adapter=sqlite upgrade head -
Connect to SQLite instance of transactional database from your database client of choice, using the absolute path set in Step 1