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

Add test to dataset name cache #124

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

evalott100
Copy link
Contributor

@evalott100 evalott100 commented Jun 18, 2024

Adds a test to dataset name cache.

Also

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.31%. Comparing base (efc3822) to head (ad1d097).

Current head ad1d097 differs from pull request most recent head 339ae3a

Please upload reports for the commit 339ae3a to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
+ Coverage   90.94%   91.31%   +0.36%     
==========================================
  Files           8        8              
  Lines        1358     1358              
  Branches      213      213              
==========================================
+ Hits         1235     1240       +5     
+ Misses         83       80       -3     
+ Partials       40       38       -2     

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

Copy link
Contributor

@AlexanderWells-diamond AlexanderWells-diamond left a comment

Choose a reason for hiding this comment

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

Looks fine but there's a couple of possible improvements that could be made

src/pandablocks_ioc/_hdf_ioc.py Outdated Show resolved Hide resolved
src/pandablocks_ioc/_hdf_ioc.py Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@@ -313,13 +313,18 @@ def handle_data(self, data: HDFReceived):

@dataclass
class Dataset:
"""A dataset name and capture mode"""
Copy link
Contributor

Choose a reason for hiding this comment

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

What is a "Dataset" in this context? I don't know enough about this area to know if this is a commonly known topic, or a concept created here for our code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's more of an abstraction - we have the BLOCK_NAME:DATASET record for using an alternative column label in the hdf5 file and the BLOCK_NAME:CAPTURE record for specifying what is captured. class Dataset functions as a more readable way to keep these together in the dict given from ioc.py.

@evalott100 evalott100 force-pushed the add_test_to_DatasetNameCache branch 2 times, most recently from aedc9b6 to ad1d097 Compare June 18, 2024 10:42
changed `DATASET` pvi table to `r` instead of `rw`
changed capture to combobox in positions capture table
@evalott100 evalott100 force-pushed the add_test_to_DatasetNameCache branch from ad1d097 to 339ae3a Compare June 18, 2024 10:48
@evalott100 evalott100 merged commit 6ffd344 into main Jun 18, 2024
18 checks passed
@evalott100 evalott100 deleted the add_test_to_DatasetNameCache branch June 18, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants