hammerlab / cycledash

Variant Caller Analysis Dashboard and Data Management System
Other
36 stars 2 forks source link

Remind users to source ENV.sh before using init_db during setup #812

Closed armish closed 9 years ago

armish commented 9 years ago

Although run.sh implicitly sources ENV.sh; after creating the ENV.sh file during the initial setup, users need to source it before calling init_db.py script. Otherwise, the init_db.py complains about the missing DB variable:

# initial setup
(venv)arman@narnia cycledash > make initenv
Creating ENV template...
ENV.sh created, edit it to configure CycleDash.

# this fails
(venv)arman@narnia cycledash > python scripts/init_db.py
No $DATABASE_URI found; make sure to source your environment file!

# and this succeeds
(venv)arman@narnia cycledash > source ENV.sh 
(venv)arman@narnia cycledash > python scripts/init_db.py
Are you sure you want to initialize the Cycledash database in postgres:///cycledash? (y/n): y
INFO  [alembic.migration] Context impl PostgresqlImpl.
INFO  [alembic.migration] Will assume transactional DDL.
Created Cycledash DB and stamped with most recent migration!
...

Review on Reviewable