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

DataSet.get_metadata to return value only if the casing of the tag matches the column name in the database #4658

Merged
merged 9 commits into from
Sep 27, 2022

Conversation

astafan8
Copy link
Contributor

@astafan8 astafan8 commented Sep 27, 2022

DataSet.get_metadata method for retrieving a metadata value for a
given tag is now case-sensitive with respect to the tag.
For example, if metadata was added with dataset.add_metadata('something', 1),
it can only be retrieved by using its exact casing of the tag,
dataset.get_metadata('something'), and not e.g.
dataset.get_metadata('SomeThinG'). In the previous versions of QCoDeS,
any casing of the tag in DataSet.get_metadata would work and return the
value stored under that tag. Note that this change brings consistency
with how getting metadata via the dataset.metadata works:
dataset.metadata['something'] does return the value, and
dataset.metadata['SomeThinG'] does not.

Also adds extra testing for one() helper function and clarifies docstrings of a few helper functions.

@astafan8 astafan8 changed the title Test getting dataset metadata with different cases for tag Make DataSet.get_metadata return value only if the casing of the tag matches the column name in the database Sep 27, 2022
@astafan8 astafan8 changed the title Make DataSet.get_metadata return value only if the casing of the tag matches the column name in the database DataSet.get_metadata to return value only if the casing of the tag matches the column name in the database Sep 27, 2022
@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Merging #4658 (350f15f) into master (00d4645) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4658      +/-   ##
==========================================
+ Coverage   68.23%   68.26%   +0.03%     
==========================================
  Files         339      339              
  Lines       31781    31794      +13     
==========================================
+ Hits        21685    21704      +19     
+ Misses      10096    10090       -6     

@astafan8
Copy link
Contributor Author

bors merge

@bors bors bot merged commit 1da23ac into master Sep 27, 2022
@bors bors bot deleted the astafan8-metadata-cases branch September 27, 2022 14:28
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.

2 participants