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 register_name to register parameters by in datasets #5381

Merged
merged 23 commits into from Oct 6, 2023

Conversation

samantha-ho
Copy link
Contributor

@samantha-ho samantha-ho commented Sep 21, 2023

This PR adds a register_name property and kwarg to the ParameterBase class. This property defaults to returning the Parameter full_name.

Additionally, this PR modifies the register_parameter and add_result methods in the Measurement context to use the register_name of the parameters rather than the full_name.

These changes are made to split how parameters are organized within an Instrument or Station from how they show up in datasets. This allows greater flexibility on both ends. Attaching a Parameter to an instrument, for example, does not have to change the name of the parameter in the dataset.

These changes have been implemented for ParameterBase and registration has been updated for ParameterWithSetpoints. MultiParameter and ArrayParameter setpoints registration has not been updated in this PR.

To do:

  • Add docstrings and an example notebook
  • Expand tests
  • Add changelog file

@samantha-ho samantha-ho changed the title Add register_name to register parameters in datasets Add register_name to register parameters by in datasets Sep 21, 2023
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #5381 (862d3ea) into master (7383819) will increase coverage by 0.00%.
The diff coverage is 82.97%.

@@           Coverage Diff           @@
##           master    #5381   +/-   ##
=======================================
  Coverage   68.30%   68.31%           
=======================================
  Files         341      341           
  Lines       29935    29946   +11     
=======================================
+ Hits        20448    20458   +10     
- Misses       9487     9488    +1     

Copy link
Contributor

@astafan8 astafan8 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!

qcodes/dataset/measurements.py Outdated Show resolved Hide resolved
qcodes/dataset/measurements.py Show resolved Hide resolved
@samantha-ho samantha-ho marked this pull request as ready for review October 5, 2023 20:57
qcodes/dataset/__init__.py Outdated Show resolved Hide resolved
docs/changes/newsfragments/5381.new Show resolved Hide resolved
qcodes/parameters/parameter_base.py Outdated Show resolved Hide resolved
qcodes/parameters/parameter_base.py Outdated Show resolved Hide resolved
@samantha-ho samantha-ho added this pull request to the merge queue Oct 6, 2023
Merged via the queue into microsoft:master with commit bb781e5 Oct 6, 2023
13 of 14 checks passed
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

3 participants