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

plot_dataset avoid loading from db if in cache #2918

Merged
merged 9 commits into from
Apr 13, 2021

Conversation

jenshnielsen
Copy link
Collaborator

This should both provide a speed boost for plotting data live and and make plot_dataset work for data not stored in the db

astafan8
astafan8 previously approved these changes Apr 12, 2021
Since:

* These rely on implicit order of the lists which is not guaranteed
* They are testing logic that has nothing really to do with the module
under test
return all data if dependent parameters is empty
@jenshnielsen
Copy link
Collaborator Author

jenshnielsen commented Apr 13, 2021

@astafan8

Two issues were discovered.

  • When dependent parameters was empty all data was loaded including standalone parameters. This has been fixed and the tests updated.
  • The measurement context manager tests for get_data_by_id implicitly relies on the order of keys in the output of get_parameter_data. This is not guaranteed to be preserved in the cache. I have moved these tests to be more specific and updated them to not rely on the order of the keys

@jenshnielsen jenshnielsen dismissed astafan8’s stale review April 13, 2021 11:13

Significant changes since review

@codecov
Copy link

codecov bot commented Apr 13, 2021

Codecov Report

Merging #2918 (6c995ce) into master (4717dc1) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2918      +/-   ##
==========================================
- Coverage   65.30%   65.30%   -0.01%     
==========================================
  Files         208      208              
  Lines       28021    28025       +4     
==========================================
+ Hits        18300    18302       +2     
- Misses       9721     9723       +2     

@jenshnielsen jenshnielsen merged commit 6e6ef6d into microsoft:master Apr 13, 2021
@jenshnielsen jenshnielsen deleted the load_from_cache_in_plot branch April 13, 2021 13:45
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.

None yet

2 participants