In https://github.com/pcdshub/lcls-twincat-motion/pull/163, one of the things I do is rename DUT_-prefixed structs to ST_ to be in-line with naming conventions. I leave the DUT_ version behind as a deprecated alias of the ST_ version, so as far as PLC projects go this is pretty transparent: leaving the code as-is gives a warning but continues to work, update the name to get rid of the warning.
This caused a problem here in pytmc where we ascribe specific meaning to DUT_MotionStage. This is actually the second time we've had such a problem.
This PR renames DUT_MotionStage support to ST_MotionStage and adds a mechanism for symbols to define a list of aliases, adding DUT_MotionStage as an alias of ST_MotionStage.
This did help my open demo/example PR include all the previously missing motors.
See here for the source code where I have a mix of both symbol names and here for the difference after using this diff.
I've added and adjusted unit tests as appropriate, including adding a real motion lib project for completeness.
In addition, I made a small tweak to the version file. I'm using PYTHONPATH munging with some symbolic link magic to test this and I noticed that the git version checker doesn't resolve the link. This caused an issue because the ads-iocMakefile checks the pytmc version.
In https://github.com/pcdshub/lcls-twincat-motion/pull/163, one of the things I do is rename
DUT_
-prefixed structs toST_
to be in-line with naming conventions. I leave theDUT_
version behind as a deprecated alias of theST_
version, so as far as PLC projects go this is pretty transparent: leaving the code as-is gives a warning but continues to work, update the name to get rid of the warning.This caused a problem here in
pytmc
where we ascribe specific meaning toDUT_MotionStage
. This is actually the second time we've had such a problem.This PR renames
DUT_MotionStage
support toST_MotionStage
and adds a mechanism for symbols to define a list of aliases, addingDUT_MotionStage
as an alias ofST_MotionStage
.This did help my open demo/example PR include all the previously missing motors. See here for the source code where I have a mix of both symbol names and here for the difference after using this diff.
I've added and adjusted unit tests as appropriate, including adding a real motion lib project for completeness.
In addition, I made a small tweak to the version file. I'm using PYTHONPATH munging with some symbolic link magic to test this and I noticed that the git version checker doesn't resolve the link. This caused an issue because the
ads-ioc
Makefile
checks thepytmc
version.