Skip to content

Profile base the hextools way (conversion step 2) - #4

Merged
Anthony Sligar (sligara7) merged 3 commits into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-02-profile-base
Oct 23, 2026
Merged

Anthony Sligar (sligara7) merged 3 commits into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-02-profile-base

Conversation

@sligara7

Copy link
Copy Markdown

Step 2 of the pdf-profile-collection → pdftools conversion.

  • pdftools.utils: hextools-style initialize_run_engine (Redis-backed RE.md, mock proposal in CI/mock mode), ProposalIDPrompt, print_version_info, print_proposal_info, auto_init_devices, and remove_md_keys (CHL's PDF: cleanup from 00-base).
  • profiles/collection.py: what 00-base does — Redis xf28id1-pdf-redis1, TiledWriter to pdf/migration (QoS header, local backup dir), PDF metadata, NSLS2PathProvider. --mock sets PDFTOOLS_RUNNING_IN_CI.
  • Test fixtures from hextools: CI env flag, settle in-flight tasks before the leak check, static_path_provider.
  • rich declared (now imported by the package).

Not ported: get_user_info, which_pvs/print_all_pv* (ophyd-sync staff helpers), db alias (xpdAcq, step 7).

Verification: mock tests only — 17 pass, including the profile booting with --mock in a subprocess; lint and pyright clean. Not run against the beamline Redis or Tiled.

…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
Copilot AI balanced review requested due to automatic review settings October 23, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 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 rich as 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

Comment thread src/pdftools/profiles/collection.py Resolved
Comment thread src/pdftools/utils/__init__.py Resolved
Assisted-by: copilot:claude-opus-5-5
Copilot AI balanced review requested due to automatic review settings October 23, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Production Redis metadata cleanup and Tiled acquisition persistence need beamline-side validation beyond the reported mock-only verification.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 23, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Production Redis metadata cleanup and Tiled acquisition configuration need beamline-owner validation beyond the reported mock-only checks.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@sligara7
Anthony Sligar (sligara7) merged commit 92dded4 into NSLS2:pdf-profile-conversion Oct 23, 2026
4 checks passed
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