Skip to content

CI: Introduce functional scripts dependencies in CI test selection - #3396

Merged
deruyter92 merged 4 commits into
mainfrom
cy/ci-func-script-deps
Jul 16, 2026
Merged

CI: Introduce functional scripts dependencies in CI test selection#3396
deruyter92 merged 4 commits into
mainfrom
cy/ci-func-script-deps

Conversation

@C-Achard

Copy link
Copy Markdown
Collaborator

Add functional script dependency support to the test selector so prerequisite scripts run first.

  • Introduce FUNC_SCRIPT_DEPENDENCIES (including the 3D -> tensorflow single animal prerequisite)
  • Apply dependency-aware ordering with cycle detection, and keep provenance by tagging dependency-driven selections.
  • Expand selector tests to cover ordering, deduplication, cycle errors, and 3D change-driven script selection.

Fixes the current fast lane failures related to the 3D script running too early.

Add functional script dependency support to the test selector so prerequisite scripts run first. Introduce `FUNC_SCRIPT_DEPENDENCIES` (including the 3D -> tensorflow single animal prerequisite), apply dependency-aware ordering with cycle detection, and keep provenance by tagging dependency-driven selections. Expand selector tests to cover ordering, deduplication, cycle errors, and 3D change-driven script selection.
@C-Achard
C-Achard requested a review from Copilot July 14, 2026 13:30
@C-Achard C-Achard self-assigned this Jul 14, 2026
@C-Achard C-Achard added bug fix! fix for a real buggy one... high-priority CI Related to CI/CD jobs and automated testing labels Jul 14, 2026

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.

Pull request overview

Adds dependency-aware ordering for functional scripts selected by the CI test selector, ensuring prerequisite scripts run before dependents (notably for 3D pose estimation scripts), and extends the selector’s tests to cover ordering and cycle detection.

Changes:

  • Introduce FUNC_SCRIPT_DEPENDENCIES in the selector config to declare functional-script prerequisites.
  • Add order_functional_scripts() to expand/resolve dependencies with cycle detection and apply dependency-aware ordering in decide().
  • Extend selector decision tests to validate dependency ordering and cycle handling.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tools/test_selector.py Adds dependency expansion + ordering for functional scripts and annotates dependency-driven provenance.
tools/test_selector_config.py Defines the initial functional-script dependency mapping (3D script depends on TF single-animal script).
tests/tools/test_selector/test_selector_decision.py Adds tests for dependency ordering, deduplication, cycle detection, and 3D change-driven selection ordering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/test_selector.py Outdated
Comment thread tests/tools/test_selector/test_selector_decision.py
C-Achard and others added 3 commits July 14, 2026 15:39
…dency:* reason.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add `resolve_functional_scripts` to expand selected functional scripts with transitive dependencies, return dependency-ordered execution, and detect cycles explicitly. `decide()` now uses this resolver to collect dependency provenance for auto-added scripts, replacing the previous one-level dependency provenance logic and keeping output provenance formatting clearer and consistent.
@C-Achard
C-Achard requested a review from deruyter92 July 15, 2026 10:16
@C-Achard
C-Achard marked this pull request as ready for review July 15, 2026 10:16
@C-Achard
C-Achard requested review from AlexEMG and MMathisLab July 15, 2026 16:45
@deruyter92
deruyter92 merged commit 174183e into main Jul 16, 2026
30 checks passed
@deruyter92
deruyter92 deleted the cy/ci-func-script-deps branch July 16, 2026 07:02
@deruyter92 deruyter92 mentioned this pull request Jul 20, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix! fix for a real buggy one... CI Related to CI/CD jobs and automated testing high-priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants