Skip to content
This repository has been archived by the owner on Aug 30, 2017. It is now read-only.

WIP: Listify numpy arrays #266

Merged
merged 5 commits into from May 5, 2017
Merged

WIP: Listify numpy arrays #266

merged 5 commits into from May 5, 2017

Conversation

ghost
Copy link

@ghost ghost commented May 1, 2017

Not ready for merge.

In accordance with bluesky/bluesky#674

  • Removes the deprecated example, not the 'sample_data' (should improve coverage).
  • Listifies the numpy arrays on the way in.
  • Tests that numpy arrays are inserted within individual and bulk event data fields.
  • Tested with bs and ophyd master.

TODO:

  • Needs to be tested with the bluesky and databroker once corresponding prs are merged.
  • Update metadataclient for ISS.

@codecov-io
Copy link

codecov-io commented May 1, 2017

Codecov Report

Merging #266 into master will decrease coverage by 0.17%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #266      +/-   ##
==========================================
- Coverage   90.35%   90.18%   -0.18%     
==========================================
  Files           4        4              
  Lines         477      489      +12     
  Branches       75       80       +5     
==========================================
+ Hits          431      441      +10     
- Misses         31       33       +2     
  Partials       15       15
Impacted Files Coverage Δ
metadatastore/core.py 93.3% <ø> (ø) ⬆️
metadatastore/mds.py 85.95% <83.33%> (-0.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab46a64...d0e2817. Read the comment docs.

@tacaswell
Copy link
Member

https://github.com/NSLS-II/bluesky/blob/b92e1a42f188fd7efa982c3ac1c8a064c1879a50/bluesky/utils.py#L837 is how we are currently doing this. This has the advantage of not copying lists.

@@ -656,6 +657,13 @@ def insert_descriptor(self, run_start, data_keys, time, uid, **kwargs):
data_keys=data_keys,
time=time, uid=uid,
**kwargs)
def _sanitize_np(self, val):
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this does not need access to self I'd suggest making it top-level function rather than a method. It's easier to test that way.

@ghost ghost mentioned this pull request May 5, 2017
Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

The tests do not test putting in an array, might be worth changing one of the keys to that, but not going to hold the PR over it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants