epics-motor / motorSmarAct

EPICS motor drivers for SmarAct controllers
3 stars 13 forks source link

Adding save/restore and iocStats configurable options #17

Closed oksanagit closed 1 year ago

oksanagit commented 2 years ago

Hello, Offering some additions to make motorSmarAct more user friendly. I.e. optional save/restore and iocsStats. We can shrink auto_settings.req and change the names for more generic.

oksanagit commented 2 years ago

This is correct, I reverted the changes. Also, perhaps save/restore lines in st.cmd might need to be commented as well, as optional.

kmpeters commented 2 years ago

The auto_settings.req file should be consistent with the motors that are loaded in the substitions file.

kmpeters commented 2 years ago

Also, github actions doesn't yet know about iocStats. There are two ways to resolve the github actions build problems:

  1. Comment out DEVIOCSTATS from EXAMPLE_RELEASE.local.
  2. Add DEVIOCSTATS can be added to .ci-local/modules.set

1 is very easy. 2 is likely to also require changes to .ci-local/github-actions/post-prepare.py to properly configure the iocStats module.

oksanagit commented 2 years ago

Thanks @kmpeters, I will take a look at the second option, and lean smth. Any suggestion how I could test before committing?

kmpeters commented 2 years ago

I don't know of any way of testing changes to github-actions builds before commiting and pushing them to the branch, which is one of the reasons why it is so painful.

kmpeters commented 2 years ago

The motor_positions.req lines should be moved to an auto_positions.req file that is only restored in pass 0 and is saved more frequencly than the settings:

https://github.com/epics-modules/autosave/blob/503f360c3a0c66867c810006cf43a136a95ae439/asApp/iocsh/save_restore.iocsh#L22-L28

prjemian commented 2 years ago

I don't know of any way of testing changes to github-actions builds before commiting and pushing them to the branch, which is one of the reasons why it is so painful.

One alternative is to interrupt the GH actions workflow midstream, using tmate. See this suggestion I keep in the hklpy project repo: https://github.com/bluesky/hklpy/blob/main/.github/tmate.yml

prjemian commented 2 years ago

Specifically, this part:

    - name: tmate session
      uses: mxschmitt/action-tmate@v3
kmpeters commented 2 years ago

The motor_positions.req lines should be moved to an auto_positions.req file that is only restored in pass 0 and is saved more frequencly than the settings:

https://github.com/epics-modules/autosave/blob/503f360c3a0c66867c810006cf43a136a95ae439/asApp/iocsh/save_restore.iocsh#L22-L28

An alternative to doing that is to include these lines and let autosave create the .req files for you:

https://github.com/epics-modules/xxx/blob/2674bc7985c8d703b22f631bc793d555f09dbb55/iocBoot/iocxxx/common.iocsh#L2-L4

kmpeters commented 2 years ago

I don't know of any way of testing changes to github-actions builds before commiting and pushing them to the branch, which is one of the reasons why it is so painful.

One alternative is to interrupt the GH actions workflow midstream, using tmate. See this suggestion I keep in the hklpy project repo: https://github.com/bluesky/hklpy/blob/main/.github/tmate.yml

@prjemian, can't anyone in the world connect to the tmate session to take over the github-actions build?

kmpeters commented 2 years ago

@prjemian, can't anyone in the world connect to the tmate session to take over the github-actions build?

I found the answer to my question. Yes they can, but it is possible to restrict access:

https://github.com/marketplace/actions/debugging-with-tmate#use-registered-public-ssh-keys

oksanagit commented 1 year ago

Thank you Kevin!