Onboard repository to Copilot cloud agent with accurate instructions and setup steps#365
Conversation
Agent-Logs-Url: https://github.com/OpenPIV/openpiv-python/sessions/3fb231b9-1ebc-422f-bb3b-26c6a589a7ed Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com>
Agent-Logs-Url: https://github.com/OpenPIV/openpiv-python/sessions/3fb231b9-1ebc-422f-bb3b-26c6a589a7ed Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com>
Reviewer's GuideUpdates Copilot cloud agent documentation to reflect the current OpenPIV Python APIs and environment, and adds a dedicated GitHub Actions workflow that pre-installs Python, Poetry, and project dependencies for Copilot runs. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/copilot-setup-steps.yml" line_range="30-31" />
<code_context>
+ with:
+ python-version: "3.12"
+
+ - name: Install Poetry
+ run: pip install poetry
+
+ - name: Install project dependencies
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Consider pinning the Poetry version instead of installing the latest each run.
Using `pip install poetry` without a version pin makes the workflow sensitive to upstream releases and can cause unexpected CI failures. Please pin Poetry to a specific version or range (e.g. `pip install "poetry==1.8.*"`) so upgrades are intentional.
```suggestion
- name: Install Poetry
run: pip install "poetry==1.8.*"
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - name: Install Poetry | ||
| run: pip install poetry |
There was a problem hiding this comment.
suggestion (bug_risk): Consider pinning the Poetry version instead of installing the latest each run.
Using pip install poetry without a version pin makes the workflow sensitive to upstream releases and can cause unexpected CI failures. Please pin Poetry to a specific version or range (e.g. pip install "poetry==1.8.*") so upgrades are intentional.
| - name: Install Poetry | |
| run: pip install poetry | |
| - name: Install Poetry | |
| run: pip install "poetry==1.8.*" |
There was a problem hiding this comment.
Pull request overview
This PR adds and updates Copilot cloud agent onboarding materials so agents can install dependencies and follow repository-specific development instructions more reliably.
Changes:
- Adds a Copilot setup workflow that checks out the repo, installs Python 3.12, Poetry, and project dependencies.
- Refreshes
.github/copilot-instructions.mdwith current project structure, APIs, dependency versions, Python support, and validation commands. - Documents current pure-Python status and updated import/resource handling guidance.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/copilot-setup-steps.yml |
Adds the setup workflow used by Copilot cloud agent environments. |
.github/copilot-instructions.md |
Updates repository instructions, API references, setup commands, and project metadata for Copilot agents. |
| - **Filtering**: `filters.replace_outliers()` for cleaning velocity fields | ||
| - **Simple PIV** (quickest path): `piv.simple_piv(frame_a, frame_b, plot=False)` → `(x, y, u, v, s2n)` | ||
| - **Complete workflow**: `piv.process_pair(frame_a, frame_b)` → `(x, y, u, v, mask)` | ||
| - **Core cross-correlation**: `pyprocess.extended_search_area_piv(im1, im2, window_size, overlap, search_area_size)` → `(u, v, s2n)` |
|
|
||
| ### PIVSettings (for windef batch processing) | ||
| `settings.PIVSettings` is a dataclass with defaults that point to the bundled test data. Key fields: | ||
| ```python |
| - **Core cross-correlation**: `pyprocess.extended_search_area_piv(im1, im2, window_size, overlap, search_area_size)` → `(u, v, s2n)` | ||
| - **Coordinates**: `pyprocess.get_coordinates(image_size, search_area_size, overlap)` → `(x, y)` | ||
| - **Window deformation (batch)**: `windef.piv(settings)` where `settings` is a `PIVSettings` instance | ||
| - **File I/O**: `tools.imread(path)`, `tools.save(x, y, u, v, mask, filename)`, `tools.display_vector_field(filename)` |
Adds the files needed for Copilot cloud agent to work efficiently in this repo from first launch.
.github/copilot-instructions.md— corrected & expanded0.25.3→0.25.43.10–3.12→3.10–3.14(matchespyproject.tomlandtesting.yml)lib.py(NaN inpainting),settings.py(PIVSettings dataclass),phase_separation.py,PIV_3D_plotting.pyprocess_pair(),get_coordinates(),transform_coordinates(),windef.piv(settings)including the requiredPIVSettingsconfiguration pattern.pyxfiles have been removed —build_ext --inplaceis a no-opimportlib_resources→ stdlibimportlib.resources.files().github/workflows/copilot-setup-steps.yml— newPre-installs Poetry and all project dependencies before the agent starts, avoiding slow/unreliable cold-start dependency discovery:
Summary by Sourcery
Update Copilot agent instructions and add a dedicated setup workflow to ensure reliable, fast environment bootstrapping for this repository.
CI:
Documentation: