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

Default experiment in qcodes #3214

Merged
merged 53 commits into from
Aug 13, 2021
Merged

Conversation

FarBo
Copy link
Contributor

@FarBo FarBo commented Jul 19, 2021

This PR:

  • Introduces functions to set, get and reset the active experiment. Upon loading or creating an experiment, _set_active_experiment_id will be called. get_active_experiment_id is a function to return the active exp_id in the kernel, and reset_active_experiment_id is a function to reset the active experiment to default which is the maximum exp_id in the database.
  • The functions are created in qcodes.dataset.experiment_setting.
  • dataset creation picks the active experiment exp_id automatically.
  • We make sure to reset active experiment upon load/ create database
  • test function to hit the active experiment
  • Experiment notebook updated

@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #3214 (9457f24) into master (04b5122) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3214      +/-   ##
==========================================
+ Coverage   65.99%   66.03%   +0.03%     
==========================================
  Files         218      219       +1     
  Lines       29009    29041      +32     
==========================================
+ Hits        19145    19177      +32     
  Misses       9864     9864              

Copy link
Collaborator

@jenshnielsen jenshnielsen left a comment

Choose a reason for hiding this comment

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

I think we need to spent some effort on reworking the imports. The sqlite modules should not import from the experiment container

qcodes/dataset/experiment_container.py Outdated Show resolved Hide resolved
qcodes/dataset/sqlite/queries.py Outdated Show resolved Hide resolved
qcodes/dataset/sqlite/settings.py Outdated Show resolved Hide resolved
qcodes/tests/dataset/test_experiment_container.py Outdated Show resolved Hide resolved
qcodes/dataset/sqlite/database.py Outdated Show resolved Hide resolved
qcodes/dataset/sqlite/database.py Outdated Show resolved Hide resolved
@FarBo FarBo requested a review from astafan8 July 20, 2021 10:39
@FarBo FarBo added this to the 0.28.0 milestone Jul 20, 2021
docs/examples/DataSet/The-Experiment-Container.ipynb Outdated Show resolved Hide resolved
qcodes/dataset/experiment_container.py Outdated Show resolved Hide resolved
qcodes/dataset/data_set.py Outdated Show resolved Hide resolved
@FarBo FarBo requested a review from jenshnielsen July 21, 2021 07:42
@FarBo FarBo changed the title Active experiment in qcodes Default experiment in qcodes Aug 3, 2021
@jenshnielsen jenshnielsen force-pushed the Far/active_exp_2 branch 2 times, most recently from 26c5b34 to 34200db Compare August 12, 2021 08:30
Copy link
Collaborator

@jenshnielsen jenshnielsen left a comment

Choose a reason for hiding this comment

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

@FarBo The code should now be ready please push your changes to the notebook and this should be good to go

@FarBo
Copy link
Contributor Author

FarBo commented Aug 12, 2021

Thanks @jenshnielsen for the final work on this. I will finish the notebook today and push it, then we can merge it afterward.

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