triage
triage copied to clipboard
standardize database parameter configuration
Database connection parameters seem to be specified with different keys and connections established in different ways across triage components. We should standardize these to use a single method for connecting to the database.
A couple of examples (but may not be exhaustive):
We should use the environment variable always, or the connection url
Yeah, my understanding was that we had standardized it, in so far as the Triage library only requires some SQLAlchemy engine, and the Triage CLI accepts either a database URI specified via process environment variable or ... some, specific, YAML.
I think this raises inconsistencies which might only remain in tutorials.
E.g. I tried to get postmodeling/contrast/utils/aux_funcs.py:create_pgconn
removed – postmodeling doesn't really use it – but I was told it's used in the iPython notebook tutorial.
So perhaps it's just these tutorials that are at issue?
See also the readme and example database profile for the results schema. Despite my improvements, it still contains internal inconsistencies as well as inconsistencies with the triage standard methods.