Merge branch 'master' into feature_personnel_multi_instance
This commit is contained in:
commit
565ad01393
|
@ -21,6 +21,9 @@ install:
|
|||
- export PATH=$PATH:$HOME/.local/bin;
|
||||
- pipenv install
|
||||
|
||||
env:
|
||||
- PB_BASE_URL='http://workflow.sartography.com:5001/pb/'
|
||||
|
||||
script:
|
||||
- pipenv run coverage run -m pytest
|
||||
- pipenv run coverage xml -i
|
||||
|
|
|
@ -768,7 +768,7 @@
|
|||
"spiffworkflow": {
|
||||
"editable": true,
|
||||
"git": "https://github.com/sartography/SpiffWorkflow.git",
|
||||
"ref": "4bc0f9252b9274d68ff4cded33f58b8fd3ad8e56"
|
||||
"ref": "d5f385f74ca2f755589aab2588333aa007d20852"
|
||||
},
|
||||
"sqlalchemy": {
|
||||
"hashes": [
|
||||
|
|
|
@ -5,14 +5,19 @@ basedir = os.path.abspath(os.path.dirname(__file__))
|
|||
|
||||
NAME = "CR Connect Workflow"
|
||||
CORS_ENABLED = False
|
||||
DEVELOPMENT = environ.get('DEVELOPMENT', default="True")
|
||||
DEVELOPMENT = environ.get('DEVELOPMENT', default="true") == "true"
|
||||
TESTING = environ.get('TESTING', default="false") == "true"
|
||||
PRODUCTION = (environ.get('PRODUCTION', default="false") == "true") or (not DEVELOPMENT and not TESTING)
|
||||
|
||||
DB_HOST = environ.get('DB_HOST', default="localhost")
|
||||
DB_PORT = environ.get('DB_PORT', default="5432")
|
||||
DB_NAME = environ.get('DB_NAME', default="crc_dev")
|
||||
DB_USER = environ.get('DB_USER', default="crc_user")
|
||||
DB_PASSWORD = environ.get('DB_PASSWORD', default="crc_pass")
|
||||
SQLALCHEMY_DATABASE_URI = environ.get('SQLALCHEMY_DATABASE_URI', default="postgresql://%s:%s@%s:%s/%s" % (DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME))
|
||||
SQLALCHEMY_DATABASE_URI = environ.get(
|
||||
'SQLALCHEMY_DATABASE_URI',
|
||||
default="postgresql://%s:%s@%s:%s/%s" % (DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME)
|
||||
)
|
||||
TOKEN_AUTH_TTL_HOURS = 2
|
||||
TOKEN_AUTH_SECRET_KEY = environ.get('TOKEN_AUTH_SECRET_KEY', default="Shhhh!!! This is secret! And better darn well not show up in prod.")
|
||||
FRONTEND_AUTH_CALLBACK = environ.get('FRONTEND_AUTH_CALLBACK', default="http://localhost:4200/session")
|
||||
|
@ -36,3 +41,9 @@ PB_USER_STUDIES_URL = environ.get('PB_USER_STUDIES_URL', default=PB_BASE_URL + "
|
|||
PB_INVESTIGATORS_URL = environ.get('PB_INVESTIGATORS_URL', default=PB_BASE_URL + "investigators?studyid=%i")
|
||||
PB_REQUIRED_DOCS_URL = environ.get('PB_REQUIRED_DOCS_URL', default=PB_BASE_URL + "required_docs?studyid=%i")
|
||||
PB_STUDY_DETAILS_URL = environ.get('PB_STUDY_DETAILS_URL', default=PB_BASE_URL + "study?studyid=%i")
|
||||
|
||||
print('=== USING DEFAULT CONFIG: ===')
|
||||
print('DB_HOST = ', DB_HOST)
|
||||
print('DEVELOPMENT = ', DEVELOPMENT)
|
||||
print('TESTING = ', TESTING)
|
||||
print('PB_BASE_URL = ', PB_BASE_URL)
|
||||
|
|
|
@ -7,3 +7,8 @@ DEVELOPMENT = True
|
|||
TESTING = True
|
||||
SQLALCHEMY_DATABASE_URI = "postgresql://crc_user:crc_pass@localhost:5432/crc_test"
|
||||
TOKEN_AUTH_SECRET_KEY = "Shhhh!!! This is secret! And better darn well not show up in prod."
|
||||
|
||||
print('### USING TESTING CONFIG: ###')
|
||||
print('SQLALCHEMY_DATABASE_URI = ', SQLALCHEMY_DATABASE_URI)
|
||||
print('DEVELOPMENT = ', DEVELOPMENT)
|
||||
print('TESTING = ', TESTING)
|
||||
|
|
|
@ -21,3 +21,9 @@ SSO_ATTRIBUTE_MAP = {
|
|||
'displayName': (False, 'display_name'), # Daniel Harold Funk
|
||||
'title': (False, 'title') # SOFTWARE ENGINEER V
|
||||
}
|
||||
|
||||
print('+++ USING TRAVIS TESTING CONFIG: +++')
|
||||
print('SQLALCHEMY_DATABASE_URI = ', SQLALCHEMY_DATABASE_URI)
|
||||
print('DEVELOPMENT = ', DEVELOPMENT)
|
||||
print('TESTING = ', TESTING)
|
||||
print('FRONTEND_AUTH_CALLBACK = ', FRONTEND_AUTH_CALLBACK)
|
||||
|
|
|
@ -22,6 +22,8 @@ else:
|
|||
app.config.root_path = app.instance_path
|
||||
app.config.from_pyfile('config.py', silent=True)
|
||||
|
||||
print(app.config)
|
||||
|
||||
db = SQLAlchemy(app)
|
||||
""":type: sqlalchemy.orm.SQLAlchemy"""
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
# run migrations
|
||||
export FLASK_APP=./crc/__init__.py
|
||||
|
||||
for entry in ./instance/* ; do
|
||||
echo "$entry"
|
||||
cat $entry
|
||||
done
|
||||
|
||||
pipenv run flask db upgrade
|
||||
|
||||
if [ "$RESET_DB" = "true" ]; then
|
||||
|
|
Loading…
Reference in New Issue