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

Move database ownership to System #41

Merged
merged 2 commits into from
Aug 23, 2024
Merged

Move database ownership to System #41

merged 2 commits into from
Aug 23, 2024

Conversation

daniel-thom
Copy link
Collaborator

  1. Move control over the database to the System instead of TimeSeriesMetadataStore. This will allow us to use the database for supplemental attributes.
  2. Use SQL query params for user variables.



class System:
"""Implements behavior for systems"""

DB_FILENAME = "time_series_metadata.db"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably change the name of this. At serialization time, we store this file in a time series directory. So, it could be mildly confusing when supplemental attributes are added. We would have to add support for deserializing old systems. I'm voting that we delay this for now.

@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 85.32110% with 16 lines in your changes missing coverage. Please review.

Project coverage is 95.07%. Comparing base (7f1d821) to head (fa2bb13).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/infrasys/time_series_metadata_store.py 77.46% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
- Coverage   95.21%   95.07%   -0.15%     
==========================================
  Files          31       32       +1     
  Lines        2529     2556      +27     
==========================================
+ Hits         2408     2430      +22     
- Misses        121      126       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@pesap pesap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@daniel-thom daniel-thom merged commit 1603653 into main Aug 23, 2024
6 checks passed
@daniel-thom daniel-thom deleted the fix/system-db branch August 23, 2024 18:06
github-actions bot pushed a commit that referenced this pull request Aug 23, 2024
Move database ownership to System
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

Successfully merging this pull request may close these issues.

3 participants