feat(reverse-engineer): add DESY OnlineXML source for PETRA III device topology#423
Merged
Merged
Conversation
…e topology
The extractor only understood EPICS sources (Guarneri devices.yml + ophyd
ASTs). PETRA III runs Tango/Sardana and publishes per-endstation device
registries (online_*.xml) on gitlab.desy.de, so its topology was out of reach
and would have to be transcribed by hand across 17 beamlines.
Add a parallel parse+map pair that converges on the existing control-system
-agnostic CandidateDevice, leaving the EPICS path untouched: parse_online_xml
+ a Tango host-to-enclosure grammar in parse.py, conservative Tango family
rules + a modellable-device filter in mapping.py, and a --source {bits,onlinexml}
switch in cli.py that dedups shared upstream devices across per-endstation files.
emit.py gains a source_desc so facts.md attributes the right origin and reports
the filtered bookkeeping count rather than hiding it.
Co-Authored-By: Claude <noreply@anthropic.com>
3 tasks
xmap
added a commit
that referenced
this pull request
Jun 29, 2026
…ine, reverse-engineered (#426) P01 is CORA's first PETRA III (DESY) beamline and its second Tango / Sardana control floor after MAX IV. It is reverse-engineered from P01's own public OnlineXML device registry (the online_haspp01eh{1,2,3}.xml Tango device list on gitlab.desy.de), extracted with the scripts/reverse_engineer/ --source onlinexml path landed in #423, then curated: the registry's 141 per-axis devices grouped into Assets at stage granularity across the five hutches (two optics, three experiment), every value carried confirm until DESY staff verify it. Two things are genuinely new: the control plane (Tango + Sardana, the seam "EPICS is the floor" generalizes to "Tango / Sardana is the floor", a sibling of the ESRF BLISS floor), and the technique branch (nuclear resonant scattering + RIXS, which earn no catalog Method and are carried pending on the Site reusing the IXS / RIXS slugs the fleet already shares). P01 coins no new Family: the EH2 sample circle binds Goniometer (not the composed Diffractometer Assembly) since the registry exposes only theta / two-theta, per the catalog's own guidance. 557 deployment unit tests pass; mkdocs build --strict is clean. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/reverse_engineer/a second source format, DESY OnlineXML, alongside the existing EPICS*-bitspath, so PETRA III's Tango/Sardana device topology can be extracted the same way APS/ESRF beamlines are.CandidateDevice, leaving the EPICS path untouched:parse_online_xml+ a Tango host-to-enclosure grammar (parse.py), conservative Tango family rules + a modellable-device filter (mapping.py), a--source {bits,onlinexml}switch that dedups shared upstream devices across per-endstation files (cli.py), and asource_desc/filtered-count line infacts.md(emit.py).nxstools-extras-pNNpackages run; 17 produce candidates that pass the descriptor loader (~2,800 modellable devices), P62 is correctly empty (stub package, noxml/).Context
PETRA III publishes per-endstation device registries (
online_*.xml) publicly on gitlab.desy.de. The extractor previously only understood EPICS (Guarneridevices.yml+ ophyd ASTs), so this topology was out of reach and would have to be transcribed by hand across 17 beamlines. Research brief and extracted candidates live under the gitignoredresearch/tree (staging artifacts, not in this PR).Test plan
pytest tests/unit/deployments/test_reverse_engineer.py— 19 pass (12 existing + 7 new OnlineXML cases incl. the descriptor self-validation round-trip)valid--source bitsonBCDA-APS/tomo-bitsunchanged🤖 Generated with Claude Code