spencerkclark / aospy-db

Adding a database to store output metadata to a hollow version of aospy
1 stars 1 forks source link

Some initial work on modularizing DB interactions #6

Closed spencerkclark closed 8 years ago

spencerkclark commented 8 years ago

With this PR I have taken all SQLAlchemy-specific code out of aospy_synthetic. This is the beginning of work to address #5.

The API still needs work. Some things that should be addressed are:

  1. How should the user specify the backend used? Ideally they shouldn't need to provide an argument to every object they create (as is the case now). In general I think this should only need to be done at the project level (and then have all child objects inherit recursively).
  2. Giving the user the option of specifying via a keyword argument whether they want to track an object in the DB is partially set up via this pull-request, but I don't think is working completely. This again should be addressed with some sort of inheritance; any object that is a child (or lower) of an object that is specified not to be tracked, should also not be included in the DB.
  3. How will we handle querying in an abstract manner? A kitchen-sink type method is probably not wise (what I currently have in abstract_db is more of a placeholder). What are the most important queries that a user could make?