Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove resultswriter/reader infra #826

Closed
MichaelClerx opened this issue May 15, 2019 · 4 comments
Closed

Remove resultswriter/reader infra #826

MichaelClerx opened this issue May 15, 2019 · 4 comments

Comments

@MichaelClerx
Copy link
Member

DB stuff seems to be working now, so might be a good time to re-evaluate how we're reading/writing. Current structure was not so much designed as "lets see if this works"-ed.

Example of how it could be different:

  • Have some sort of ActiveRow TestResult object that you create and modify, possibly with a commit() or sync() method that reads/writes to DB.
  • Have a static class to fetch results, where each method has some query inside that does useful stuff and returns a list of result objects that match some hard-coded criteria
@MichaelClerx
Copy link
Member Author

Ideas @martinjrobins @iamleeg @fcooper8472 ?

@iamleeg
Copy link
Contributor

iamleeg commented May 15, 2019

What's currently there isn't far from ActiveRow:

  • combine reader and writer into a single class. Pass the primary key (the row ID) in the __init__(): if it's non-None, then use it, otherwise create a row and use that
  • there already is a write() method but it does nothing because every write currently commits its changes. This can be changed so that writes are explicit.

@MichaelClerx
Copy link
Member Author

A scenario for writing would be:

  1. Create a test result, enter basic data (outcome=running), send to DB
  2. Finish running test, update DB with outcome of test

Scenarios for reading:

  • Get all completed runs of test X, that have a KLD value, group (and sort) by (pfunk_commit, pints_commit) and return a nested list
  • Like before, but with some selection based on times
  • That kind of thing!

@MichaelClerx
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants