bluesky / suitcase-specfile

write text file such as output by SPEC
Other
0 stars 8 forks source link

Corrected SPEC header formation from bluesky start doc #17

Closed whs92 closed 2 years ago

whs92 commented 3 years ago

the spec header was incorrectly being written as 'seq_num' rather than being populated with the plan name and the plan arguments even when the plan_name was in _BLUESKY_PLAN_NAMES. I corrected this by checking the scan_command was in _SPEC_SCAN_NAMES rather than _BLUESKY_PLAN_NAMES. I then changed the command_args calculation to assume that args was a list and not a dict since this is what is implemented for the scan and rel_scan plans. Tested by running scans and opening them in pyMca

whs92 commented 3 years ago

Fails test because test data also contains error with no motor specified and instead just "seq_num". JSON files also seem to contain different data to the specfiles they are comparing against and test fails on master branch too.

mrakitin commented 3 years ago

Thanks for the contribution/fix, @whs92. I haven't participated in this suitcase's development, however, @gwbischof and @jklynch were involved. I've requested their review.

For the failing test, I think it would make sense to correct the .spec files to make them more compliant with the SPEC format.

jklynch commented 3 years ago

I have not participated in developing the "working" code for this project. My involvement has been purely peripheral, and I don't know anything about spec. I can't provide a helpful review.

danielballan commented 3 years ago

This is challenging to test well because there is no SPEC specification --- it's just an undocumented convention --- and different implementations have conflicting expectations. This one is intended to work with the implementation in pyMCA, which I believe is fortunately also the one that @whs92 is targeting.

I'll take a look....

danielballan commented 3 years ago

Fixes proposed in https://github.com/hz-b/suitcase-specfile/pull/1.