NSLS-II / nslsii

NSLS-II related devices
BSD 3-Clause "New" or "Revised" License
10 stars 22 forks source link

ENH: A new experiment command #85

Open ke-zhang-rd opened 4 years ago

ke-zhang-rd commented 4 years ago

Expected Behavior

What will happen after execuate bsui

  1. Welcome to XXX beamline. May I have your name:
    >>> 
    If you know your gup number, type in below:
    >>>
    If you know your saf number, type in below:
    >>>
  2. Create session.json and store above data, if session.json exist, overwrite it.
  3. init conda and ipython(other bsui task)

After entering bsui(ipython)

Options bsui --develop will skip prompt to make development easier bsui --continuewon't overwrite existing session.json

Possible Solution

  1. Three functions in packagenslsii. BMM has a example in 08-user.py
  1. Update bsui. A good source of prompt code might be cookiecutter. It's depend on click

  2. A location and format of file session.json, maybe:

    {
    'name': "Abc",
    'date': "yyyy-mm-dd HH:mm:ss.SSS",
    'gup': "123456",
    'saf': "123456"
    }
ke-zhang-rd commented 4 years ago

@stuartcampbell @danielballan

This is a checklist of features of new command function

danielballan commented 4 years ago

For (3) an IPython magic might be used instead, since it can occur in the same process where RE.md is defined. But I think that's an open question, and we may want both.

For (4) I am unclear on whether we want to collect the saf or just the proposal number. (Is that what "gup" means?") I think we should treat them all as strings, because we are not in control of the specification and have to assume that they may not always be integers.

prjemian commented 4 years ago

Use a string, makes it future proof. APS has at least three kinds of proposal. It is useful to include the kind of proposal as a prefix.

On Mon, Jun 8, 2020, 12:31 PM Dan Allan notifications@github.com wrote:

For (3) an IPython magic might be used instead, since it can occur in the same process where RE.md is defined. But I think that's an open question, and we may want both.

For (4) I am unclear on whether we want to collect the saf or just the proposal number. (Is that what "gup" means?") I think we should treat them all as strings, because we are not in control of the specification and have to assume that they may not always be integers.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NSLS-II/nslsii/issues/85#issuecomment-640768467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMHWYFOYBKMCZEC2ZQDRVUN6TANCNFSM4NIDJSKQ .

prjemian commented 4 years ago

NeXus went through this same decision tree and agreed, finally, string was the robust choice.

On Mon, Jun 8, 2020, 12:36 PM Pete Jemian prjemian@gmail.com wrote:

Use a string, makes it future proof. APS has at least three kinds of proposal. It is useful to include the kind of proposal as a prefix.

On Mon, Jun 8, 2020, 12:31 PM Dan Allan notifications@github.com wrote:

For (3) an IPython magic might be used instead, since it can occur in the same process where RE.md is defined. But I think that's an open question, and we may want both.

For (4) I am unclear on whether we want to collect the saf or just the proposal number. (Is that what "gup" means?") I think we should treat them all as strings, because we are not in control of the specification and have to assume that they may not always be integers.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NSLS-II/nslsii/issues/85#issuecomment-640768467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMHWYFOYBKMCZEC2ZQDRVUN6TANCNFSM4NIDJSKQ .