BrentLab / yeastdnnexplorer

A development environment to explore implementations of deep neural networks for predicting the relationship between transcription factor and target genes using binding and perturbation data
https://brentlab.github.io/yeastdnnexplorer/
Other
0 stars 3 forks source link

Database Interface #90

Closed cmatKhan closed 2 months ago

cmatKhan commented 2 months ago

This adds the database interface module. The code is entirely in the new /interface submodule in the src directory. There are tests for the two helper classes, Cache and ParamsDict, and tests for the Abstract classes via a simple concrete implementation in the test files that test the functionality in the Abstract classes.

The read methods are implemented asynchronously and are thus harder to test. The records only read (just pulling the records from the database) are tested. But, I couldn't figure out how to mock two API endpoints within a testable future context successfully.

But, there is a new notebook, which has been added as a tutorial, that explains the API classes, and 3 classes are tested there, which covers the code in /interface entirely (meaning, if you set a breakpoint anywhere in the /interface code, and then executed that tutorial in the debugger mode, you would stop at your breakpoint).

The docs have been updated with the new submodule and a new tutorial.

cmatKhan commented 2 months ago

I did update the docs to include the database_interface tutorial -- please look through that and start getting familiar with interacting with the database. We'll talk more about this on Monday