Age | Commit message (Collapse) | Author |
|
Pass in the database URI at call time.
|
|
|
|
|
|
* wqflask/base/data_set/dataset.py: Delete itertools, DictCursor.
(DataSet.get_accession_id): Handle a case where query_sql returns a
None value.
|
|
Some rows in InfoFiles have NULL values thereby causing an exception
to be raised. All InfoFiles.DB_Name are unique.
* wqflask/base/data_set/dataset.py (DataSet.get_accession_id): Remove
shortname/fullname check in query.
|
|
* wqflask/base/data_set/dataset.py: Import itertools, DictCursor, MonadicDict,
Maybe, Nothing and query_sql.
(DataSet.__init__): Initialize accession_id to Nothing.
(DataSet.as_dict): Rename this to ...
(Dataset.as_monadic_dict): ... this which returns a monadic
dictionary.
(DataSet.get_accession_id): Query for the accession_id and return it
as a maybe monad.
|
|
In Jinja, you can use dot notation to check for values. If a value
does not exist, you get None by default.
* wqflask/base/data_set/dataset.py (Dataset.get_accession_id): Remove
returning a string version of None.
* wqflask/wqflask/templates/correlation_page.html: Delete `!= 'None'`.
|
|
|
|
Provide the database cursor as an argument to the methods of the two
classes:
* wqflask.base.species.TheSpecies
* wqflask.base.species.Chromosomes
Also update dependent code to initialise and pass the cursor where
these classes are used.
|
|
__init__.py
Previously it threw an error when it tried to use Markers/HumanMarkers
in datasetgroup.py; since Markers/HumanMarkers doesn't seem to be used
anywhere else, I think it's okay for the import to only be in
datasetgroup.py
|
|
Pass the redis and database connection/cursors as arguments to the
class methods, and do not retain a copy of the connections/cursors.
This allows us to do the connection management in the context
managers elsewhere - ideally, at the top-level. For now the context
manager is within the `create_dataset` function, but this should be
moved out to a higher level once the lower levels are verified to be
working as expected.
|
|
Since the `__post_init__` method in the 'DatasetType' class checks
whether data is in redis before hitting the database, it does not
matter whether there is a global object of the type, as long as we
make sure to call the object correctly.
This commit makes that happen.
|
|
To ease future refactors on the code, decompose the file into a module
with multiple modules that can be refactored semi-independently.
|