Pre-requisite of pipenv needed pipenv
pipenv install
Please, make sure to use commitizen to commit your messages. If you don't have commitizen installed:
pip install commitizen
To commit, instead of git commit -m use cz commit.
For more information, read here.
All commands below need to be run from the top-level directory of this repository. All aspects related to starting and connection to the MySQL server are handled in the file params.yaml. The structure of the params.yaml file should look like the following:
db:
name: qcdb
params:
host: 127.0.0.1
port: 3306
user: root
password: password
files:
- name: fastqc
directory: /Users/aguang/CORE/qckit/qcdb/tests/data/
- name: qckitfastq
directory: /Users/aguang/CORE/qckit/qcdb/tests/data/
- name: picardtools
directory: /Users/aguang/CORE/qckit/qcdb/tests/data/Each module run in the commands below also take a -f argument which by default is set to the top-level params.yaml. Thus no additional arguments need to be provided. However, if the user wishes to provide a yaml file from a different location, that is possible by providing commands like the following:
NOTE: to take advantage of the pipenv installation, enter a pipenv shell before running the python commands
python -m qcdb.db_create -f path/to/params.yaml
Additionally, code will likely only run for Python 3+.
docker-compose up
docker-compose exec mysql mysql -p
Password: password
From another terminal window:
python -m qcdb.db_create
If loading for the first time or adding a new metric/file type, run with the --buildref flag.
python -m qcdb.db_load
docker-compose run test
For testing the connection, create a .env file in the tests folder with MYSQLUSER and MYSQLPASSWORD used to connect to the datasci mysql server.