Closed ericdill closed 8 years ago
I would have made those print statements warnings so that they are easier to test and easier to silence if users so choose. But I'm OK with print statements.
Ah good point. Thanks. All of the document conversion code was copied out of a jupyter notebook so pointers like that are very welcome!
@danielballan so just this?
import warnings
warnings.warn(msg)
Yes.
Still TODO:
Tests cannot be run on py2.7 on travis because this PR adds a bluesky dep for CallbackBase
. I can either:
You can also do something like
try:
import module_that_needs_bluesky
except ImportError:
module_that_needs_bluesky = None
def test():
# make this a decorator
if module_that_needs_bluesky is None:
raise SkipTest
and drop bluesky as a required dependancy of suitcase.
Well the main feature of this PR doesn't even work if I drop bluesky as a required dep...
I guess my question was really asking if it was important to maintain python 2 compatibility on suitcase
You can still install bluesky for python3 only on travis to test this feature. I do not see a problem with having some parts of the library being python 3 only and others python2/3.
Long term we do want to pull all of the callbacks out of bluesky, I am just not sure now is the right time to do that (we need to feature freeze next week). I think this sort of hack is the fastest way to get this merged so we can deploy it for next cycle.
Ok that makes sense. Thanks. Will update now.
Actually what I'm going to do is just copy/paste the CallbackBase code from bluesky to suitcase.spec and then just remove the bluesky dep entirely. That seems simpler than hacking around in the .travis.yml, spec.py and tests/test_spec.py
that also makes sense.
@@ master #11 diff @@
========================================
Files 2 4 +2
Lines 103 595 +492
Methods 0 0
Branches 0 0
========================================
+ Hits 97 562 +465
- Misses 6 33 +27
Partials 0 0
Powered by Codecov. Last updated by 3474fd1...218ae3e
This is ready for review. It is long, but ~4k lines are just the specfile. This PR adds the capability to round trip document schema <-> specfile with regards to ascan/Scan and dscan/RelativeScan. attn @tacaswell @danielballan
Wow. A+. A very clean implementation of a monumentally messy problem. Take or leave my one suggestion.
Wow. A+. A very clean implementation of a monumentally messy problem.
Thanks for the kind words. This was a pile of work, so it's nice to get some very positive feedback :sweat_smile:
Agreed with @danielballan - great work. I don't really see anything to even nitpick.
This will get a lot of use, I'm sure.
To go in after #8