NSLS-II-SST/rsoxs_scans

Feat: Input validation required fields and angles

Closed this issue · 5 comments

  • Implement a check that fields marked 'required' on the spreadsheet have values. This check should be non-blocking and just add a warning.
  • Add the limits on angles that we discussed on March 9th: Grazing True: 0-90, Grazing False: -14 to 90

I'm confused about the "required" you seem to be reading this from the sheet itself? shouldn't we have this as a lookup in the default.py rather than counting on something that can be edited by a user?

Yeah in hindsight that's better. I didn't even think Abt users editing the documentation rows.

The benefit of pulling it from the sheet is that the rules and public documentation come from the same place (so they can't be mismatched).

It is more error prone this way tho and also it leads to the whole "you don't get validation if you import a sheet without header rows"

Probably better to just put it in defaults then.

Those are good points too… I like linking the documentation and defaults somehow…

Maybe the best would be to have all the header info ( default value , description, limits , type, example, etc) in defaults.py

Then generate the spreadsheet headers from that.

Then the wiki text from that as well.

It's technically possible just a lot of excel wrangling.