Skip to content

Simplifications and improvements to tomography plans. Add tomography flyscans test suite. - #108

Merged
Anthony Sligar (sligara7) merged 9 commits into
NSLS2:mainfrom
jwlodek:some-simplifications-to-tomo-plans
Oct 23, 2026
Merged

Anthony Sligar (sligara7) merged 9 commits into
NSLS2:mainfrom
jwlodek:some-simplifications-to-tomo-plans

Conversation

@jwlodek

Copy link
Copy Markdown
Contributor
  • Loosen pins for ophyd-async and bluesky. Update lockfile
  • Simplify tomography plans, add additional metadata to nd tomo scans
  • Add comprehensive test suite for tomography flyscan plans

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved dependency compatibility, silent acquisition skips for negative retry counts, and unused imports need correction.

3 open issues
What changed in this PR

This PR consolidates tomography scan orchestration, adds metadata linking grid-point runs, and expands automated coverage for acquisition and data storage.

Changes:

  • Reuses the ND step-scan plan for repeated flyscans and adopts Bluesky’s built-in flyscan helper.
  • Adds grid-position metadata and tests for sequencing, retries, pauses, cleanup, and Tiled integration.
  • Switches ophyd-async to upstream development sources and refreshes dependency pins.
File Description
tests/​tomography/​test_flyscans.py Adds mock-based plan tests and Tiled integration coverage.
src/​hextools/​tomography/​flyscans.py Consolidates orchestration and adds repetition, checkpoints, and run metadata.
src/​hextools/​specs.py Documents optional grid metadata fields.
pixi.toml Switches ophyd-async to upstream main.
pixi.lock Updates Bluesky and ophyd-async revisions and package metadata.

Review effort: Balanced

Comment thread src/hextools/tomography/flyscans.py
Comment thread src/hextools/tomography/flyscans.py
Comment thread src/hextools/tomography/flyscans.py
Copilot AI balanced review requested due to automatic review settings October 23, 2026 15:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The previously reported Bluesky dependency compatibility issue remains an approval blocker for installations outside Pixi.

3 open issues

Review effort: Balanced

@sligara7

Copy link
Copy Markdown
Contributor

#107 merged into main and also adds tests/tomography/test_flyscans.py, so this branch now conflicts (add/add on that file; flyscans.py merges cleanly and keeps the VELO restore).

I've pushed a merge of main into this branch: sligara7:pr108-merge-main (8397121). It keeps your test suite and adds #107's check as one test, test_tomo_flyscan_restores_rotation_speed (success and failure paths, on FlyRig). With this branch's locked dev env: test_flyscans.py 62 passed, 1 xfailed; non-GUI suite 388 passed.

To take it:

git pull https://github.com/sligara7/hextools.git pr108-merge-main

Lint is failing on this branch independently:

  • src/hextools/specs.py:149 line too long (89 > 88)
  • src/hextools/tomography/flyscans.py: unused imports Flyable, MsgGenerator; blank line after the tomo_nd_step_scan docstring

@sligara7 Anthony Sligar (sligara7) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few tiny things (#108 (comment)), but looks good to simplifying the tomography plans.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 16:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 hardware-cleanup failure paths and coordinated dependency upgrades require fixes and final human validation.

3 open issues
2 resolved since last review

Review effort: Balanced

Comment thread src/hextools/tomography/alignment.py Outdated
Comment thread src/hextools/tomography/alignment.py Outdated
Copilot AI balanced review requested due to automatic review settings October 23, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

An unused import in the alignment tests violates the configured Ruff rules and causes the CI lint job to fail.

1 open issue
3 resolved since last review

Review effort: Balanced

Comment thread tests/tomography/test_alignment.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 16:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Hardware cleanup changes include an unresolved recovery issue, and core dependency upgrades warrant human validation beyond mocked coverage.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread src/hextools/tomography/alignment.py

@sligara7 Anthony Sligar (sligara7) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@sligara7
Anthony Sligar (sligara7) merged commit 18a4914 into NSLS2:main Oct 23, 2026
6 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.

3 participants