Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prettystr and reduce the number of options when tab-to-completing #13

Merged
merged 10 commits into from
Jul 9, 2024

Conversation

awalter-bnl
Copy link
Contributor

@awalter-bnl awalter-bnl commented Jun 20, 2024

This PR re-factors the PrettyStr class into two: PrettyStrForDevices, and PrettyStrForSignals. The first is used when the ophyd object in question has child signals that should be included in the 'print' and the second for when child signals should not be included.

In addition this PR adds a custom __dir__() method to both of these classes to only show the read method and the child signals when doing tab-to-complete. This is meant to aid users by only showing items that they will need to access and hence removing confusion.

Finally it also includes some updates to some docstrings as they had gotten out of date with the significant number of recent PR merges.

@wen-hu and @Jiemin-Li please take a look and provide comments

@awalter-bnl awalter-bnl requested a review from Jiemin-Li June 20, 2024 11:45
@awalter-bnl
Copy link
Contributor Author

@Jiemin-Li , @wen-hu sorry for the new pushes but I decided to extend the number of built-in plans loaded to all of them. I also added mv and mvr, I also wanted to add some non-abbreviated versions so I went with move, rel_move and relative_move as this matches the naming convention for built-in scans.

Copy link
Contributor

@Jiemin-Li Jiemin-Li left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are good!

Copy link
Contributor

@Jiemin-Li Jiemin-Li left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a good idea to take the pretty_print out from Devices/Signal so that we can use it anywhere.

@Jiemin-Li Jiemin-Li merged commit fb882cf into NSLS-II-ARI:main Jul 9, 2024
@awalter-bnl awalter-bnl deleted the update_prettystr branch July 11, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants