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

Feature: access snapshot of a DataSet, and docs (also, Station bug fix + tests) #1322

Merged
merged 35 commits into from
Oct 19, 2018

Conversation

astafan8
Copy link
Contributor

@astafan8 astafan8 commented Oct 16, 2018

What's in:

  • add DataSet.snapshot and DataSet.snapshot_raw (taken from [wip] Dataset serializer #1262 PR) properties to retrieve snapshot dict and JSON
  • add "Working with snapshots" notebook that explains what snapshot is and how to obtain it (original notebook about snapshots has a note that refers to the new notebook)
  • tests
  • Station object is now covered with tests, also introduces useful fixture that cleans up Station.default at startup and teardown of a test
  • Fix a bug where Station.snapshot would raise a cryptic exception in case an instrument that is a part of the station has been closed; now, snapshot method proceeds, and the "closed" instrument is removed from the station automatically; this partially addresses problems raised in Instrument.close() #277.

Some of the code from this PR was already in #1215 PR, but that one stalled for a bit in WIP mode, hence this new PR.

If an instrument is a part of a station, and it was closed during the
lifetime of that station, the snapshot function used to fail with a
cryptic exception. Now this is fixed. When a station snapshot is made,
instruments that are closed (not valid) do not get snapshotted, and are
automatically removed from the station.
@astafan8 astafan8 changed the title Feature: access snapshot of a DataSet, and docs Feature: access snapshot of a DataSet, and docs (also, Station bug fix + tests) Oct 17, 2018
@codecov
Copy link

codecov bot commented Oct 17, 2018

Codecov Report

Merging #1322 into master will increase coverage by 0.17%.
The diff coverage is 97.29%.

@@            Coverage Diff            @@
##           master   #1322      +/-   ##
=========================================
+ Coverage   72.32%   72.5%   +0.17%     
=========================================
  Files          74      74              
  Lines        8525    8560      +35     
=========================================
+ Hits         6166    6206      +40     
+ Misses       2359    2354       -5

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.

Left a few very minor comments but looks good otherwise

qcodes/tests/test_station.py Show resolved Hide resolved
qcodes/dataset/sqlite_base.py Outdated Show resolved Hide resolved
qcodes/dataset/data_set.py Outdated Show resolved Hide resolved
qcodes/dataset/data_set.py Outdated Show resolved Hide resolved
@astafan8 astafan8 merged commit 453bf8d into microsoft:master Oct 19, 2018
@astafan8 astafan8 deleted the feature/snapshot_docs_and_tests branch October 19, 2018 12:23
giulioungaretti pushed a commit that referenced this pull request Oct 19, 2018
Merge: 4417ea8 94953e0
Author: Mikhail Astafev <astafan8@gmail.com>

    Merge pull request #1322 from astafan8/feature/snapshot_docs_and_tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Related to docs improvements enhancement new dataset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants