NSLS-II / metadatastore

DEPRECATED: Incorporated into https://github.com/NSLS-II/databroker
Other
2 stars 11 forks source link

Add 'scan_type' to run start. #180

Closed ericdill closed 8 years ago

ericdill commented 8 years ago

I want this in the run start because it is getting put in by bluesky. It is pretty helpful to have the same info in the sample data generators that we expect to be in the actual experimental data. The next step would be to add 'scan_args' to the run start too.

tacaswell commented 8 years ago

travis is producing a strange eror...

ericdill commented 8 years ago

I think this is a pymongo version thing. travis is installing pymongo-3.0.3

ericdill commented 8 years ago

This will get rebased on top of #176 once that PR is done

danielballan commented 8 years ago

@ericdill What about this:

  1. Delete all the sample data generation code from databroker.
  2. Make bluesky (but not ophyd) a test dependency.
  3. Generate data like:
from bluesky.tests.utils import setup_test_run_engine
from bluesky.register_mds import register_mds
RE = setup_test_run_engine()
register_mds(RE)

from bluesky.plans import AbsScanPlan
from bluesky.examples import motor, det
plan = AbsScanPlan([det], motor, 1, 5, 5)
RE(plan)

This didn't make sense originally because, at the time we were writing broker, there was no way to generate fake data with a simulated EPICS IOC. But now, examples like the above look a lot simpler and more maintainable than the rats nest of manual document-generation code we have in place.

ericdill commented 8 years ago

I am not sure where this makes the most sense. I'm not a huge fan of picking up a bluesky dependency in metadatastore. That being said, the code snippet above is much nicer than the pile of code we currently have in databroker/metadatastore. I am :+1: on temporarily adding a bluesky dep to the sample data generation in mds/databroker with the ultimate goal of having a vertical integration repo actually working in the not to distant future. At that point we can move the sample data generation code into this magical vaporware vertical integration repo

danielballan commented 8 years ago

Sounds fine to me.

ericdill commented 8 years ago

Alright great. So I'll close this PR. Do you want to set up data generation code with bluesky?

danielballan commented 8 years ago

I would like to see that happen, but I don't think I will do it personally any time soon.

ericdill commented 8 years ago

Alright. I'll add it as an issue on both repos