-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4658: DataSet.get_metadata to return value only if the casing of the tag matches the column name in the database r=astafan8 a=astafan8 ``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. Co-authored-by: Mikhail Astafev <astafan8@gmail.com>
- Loading branch information
Showing
5 changed files
with
150 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
``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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters