Adds load_level as a conf.yaml key that allows hutches to choose how many ophyd devices get loaded. Currently includes 3 options:
UPSTREAM: The hutch's devices, and devices upstream from the requested hutch.
If there are multiple paths to the requested hutch, all paths' devices are loaded.
STANDARD: Devices gathered via UPSTREAM, plus devices that share the
"beamline" field in happi with the UPSTREAM devices. (The current standard)
ALL: All devices in the happi database. Use this option at your own risk.
Summary: We found that some hutches were loading many irrelevant devices. TMO was catching CXI devices, XPP was catching XRT devices, etc. This was found to be a result of the beamline field matching procedure.
At some point I'd love to add a "hutch only" option, but there's no simple way to implement that currently. This framework should support it though.
How Has This Been Tested?
Interactively with a tmopython profile, added a test case
Where Has This Been Documented?
This PR, the jira ticket
Pre-merge checklist
[x] Code works interactively (a real hutch config file can be loaded)
[x] Code contains descriptive docstrings, including context and API
[x] New/changed functions and methods are covered in the test suite where possible
[x] Test suite passes locally
[x] Test suite passes on GitHub Actions
[x] Ran docs/pre-release-notes.sh and created a pre-release documentation page
[x] Pre-release docs include context, functional descriptions, and contributors as appropriate
Description
Adds
load_level
as a conf.yaml key that allows hutches to choose how many ophyd devices get loaded. Currently includes 3 options:UPSTREAM
: The hutch's devices, and devices upstream from the requested hutch. If there are multiple paths to the requested hutch, all paths' devices are loaded.STANDARD
: Devices gathered viaUPSTREAM
, plus devices that share the "beamline" field in happi with theUPSTREAM
devices. (The current standard)ALL
: All devices in the happi database. Use this option at your own risk.Motivation and Context
https://jira.slac.stanford.edu/browse/ECS-5079
Summary: We found that some hutches were loading many irrelevant devices. TMO was catching CXI devices, XPP was catching XRT devices, etc. This was found to be a result of the beamline field matching procedure.
At some point I'd love to add a "hutch only" option, but there's no simple way to implement that currently. This framework should support it though.
How Has This Been Tested?
Interactively with a tmopython profile, added a test case
Where Has This Been Documented?
This PR, the jira ticket
Pre-merge checklist
docs/pre-release-notes.sh
and created a pre-release documentation page