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

Enh/control child name mangling #1222

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tacaswell
Copy link
Contributor

The Python name (via attributes) of a child device is foo.bar.baz, however
for a number of historical reasons (allowed keys in mongo and for attribute
access in Pandas data frames with columns named from the data keys in an event
stream) ophyd-sync has replaced '.' with '_' in the names. This leads to
ambiguity when looking at the (default) name to which component on which device
the data came from as there may be _ in the attribute names. Ophyd-async
used '-' which does allow for round tripping.

This makes it controllable on per-instance basis in ophyd-sync so that users
can either make a different set of trade offs.

xref bluesky/ophyd-async#666

@tacaswell
Copy link
Contributor Author

I probably should move the doc commit to its own PR...

@tacaswell tacaswell force-pushed the enh/control_child_name_mangling branch from 7b0cdf3 to 4d4b761 Compare November 25, 2024 18:00
ophyd/device.py Outdated Show resolved Hide resolved
The Python name (via attributes) of a child device is `foo.bar.baz`, however
for a number of historical reasons (allowed keys in mongo and for attribute
access in Pandas data frames with columns named from the data keys in an event
stream) ophyd-sync has replaced '.' with '_' in the names.  This leads to
ambiguity when looking at the (default) name to which component on which device
the data came from as there may be `_` in the attribute names.  Ophyd-async
used '-' which does allow for round tripping.

This makes it controllable on per-instance basis in ophyd-sync so that users
can either make a different set of trade offs.

xref bluesky/ophyd-async#666
@tacaswell tacaswell force-pushed the enh/control_child_name_mangling branch from 9d3dc75 to da50a9d Compare November 25, 2024 19:11
@tacaswell tacaswell force-pushed the enh/control_child_name_mangling branch from da50a9d to fb49ef8 Compare November 25, 2024 19:18
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