Repository navigation
Profile base the hextools way (conversion step 2) - #4
Merged
Anthony Sligar (sligara7) merged 3 commits intoOct 23, 2026
Merged
Anthony Sligar (sligara7) merged 3 commits into
Anthony Sligar (sligara7) merged 3 commits into
Conversation
…r, path provider Port what pdf-profile-collection's 00-base does into pdftools.utils and profiles/collection.py, following hextools: Redis-backed RE.md on xf28id1-pdf-redis1 (PDF: key cleanup kept), TiledWriter to pdf/migration with the acquisition QoS header and a local backup directory, NSLS2PathProvider, auto_init_devices for later device steps, and PDFTOOLS_RUNNING_IN_CI / --mock for mock mode. Test fixtures from hextools: CI env flag, settling in-flight tasks, static path provider. Assisted-by: copilot:claude-opus-5-5
There was a problem hiding this comment.
🔵 Needs a closer look
Unresolved startup and interactive-namespace regressions need fixes, and the unverified live Redis cleanup and Tiled acquisition paths warrant beamline-owner review.
2 open issues
What changed in this PR
Continues the profile-collection migration by adding shared startup utilities and configuring the collection profile for the PDF beamline.
Changes:
- Adds Redis-backed RunEngine initialization, proposal display, metadata cleanup, and device connection reporting.
- Configures PDF metadata, Tiled acquisition writing with local backups, and mock-mode startup.
- Adds utility tests, improves test fixtures, and declares
richas a dependency.
| File | Description |
|---|---|
| tests/test_utils.py | Tests utilities and mock profile startup. |
| tests/conftest.py | Adds CI-mode and path fixtures; allows pending tasks to settle. |
| src/pdftools/utils/__init__.py | Introduces shared profile initialization and reporting helpers. |
| src/pdftools/profiles/collection.py | Integrates helpers and PDF-specific Redis, Tiled, and metadata settings. |
| pyproject.toml | Declares the rich dependency. |
| pixi.toml | Adds rich to the Pixi environment. |
| pixi.lock | Records the updated package dependency. |
Review effort: Balanced
Assisted-by: copilot:claude-opus-5-5
Assisted-by: copilot:claude-opus-5-5
Anthony Sligar (sligara7)
merged commit Oct 23, 2026
92dded4
into
NSLS2:pdf-profile-conversion
4 checks passed
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.

Step 2 of the pdf-profile-collection → pdftools conversion.
pdftools.utils: hextools-styleinitialize_run_engine(Redis-backedRE.md, mock proposal in CI/mock mode),ProposalIDPrompt,print_version_info,print_proposal_info,auto_init_devices, andremove_md_keys(CHL'sPDF:cleanup from00-base).profiles/collection.py: what00-basedoes — Redisxf28id1-pdf-redis1,TiledWritertopdf/migration(QoS header, local backup dir), PDF metadata,NSLS2PathProvider.--mocksetsPDFTOOLS_RUNNING_IN_CI.static_path_provider.richdeclared (now imported by the package).Not ported:
get_user_info,which_pvs/print_all_pv*(ophyd-sync staff helpers),dbalias (xpdAcq, step 7).Verification: mock tests only — 17 pass, including the profile booting with
--mockin a subprocess; lint and pyright clean. Not run against the beamline Redis or Tiled.