Conversation
|
Warning Review limit reached
Next review available in: 39 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (28)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideModernizes the project into an installable src-based vse_sim package targeting Python 3.14, updates scientific and tooling dependencies and CI, and normalizes NumPy 2 outputs to preserve prior Python-scalar result conventions across the simulation code, scripts, and tests. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 3 issues, and left some high level feedback:
- The GitHub Actions workflow changes appear to have inlined two versions of the
uses:lines (e.g.,actions/checkout,actions/setup-python,astral-sh/setup-uvare duplicated on the same line), which will likely break YAML parsing—clean those up so each step has a singleusesentry. - You now coerce NumPy scalars to Python scalars in multiple places using the same
hasattr(x, "item")pattern; consider introducing a small helper (e.g.,to_python_scalar) and using it consistently to avoid duplication and make future representation changes easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The GitHub Actions workflow changes appear to have inlined two versions of the `uses:` lines (e.g., `actions/checkout`, `actions/setup-python`, `astral-sh/setup-uv` are duplicated on the same line), which will likely break YAML parsing—clean those up so each step has a single `uses` entry.
- You now coerce NumPy scalars to Python scalars in multiple places using the same `hasattr(x, "item")` pattern; consider introducing a small helper (e.g., `to_python_scalar`) and using it consistently to avoid duplication and make future representation changes easier.
## Individual Comments
### Comment 1
<location path=".github/workflows/python-app.yml" line_range="20" />
<code_context>
- - uses: actions/checkout@v4
- - name: Set up Python 3.12
- uses: actions/setup-python@v5
+ - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@v4
+ - name: Set up Python 3.14
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 uses: actions/setup-python@v5
</code_context>
<issue_to_address>
**issue (bug_risk):** The checkout step line is malformed and will break the workflow YAML.
This line combines two `uses:` declarations (`@34e... # v4.3.1` and `@v4`) on a single entry, which produces invalid YAML and stops the workflow from running. Please split this into separate steps or keep only the pinned SHA form, e.g.
```yaml
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
```
</issue_to_address>
### Comment 2
<location path=".github/workflows/python-app.yml" line_range="21-22" />
<code_context>
- - name: Set up Python 3.12
- uses: actions/setup-python@v5
+ - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@v4
+ - name: Set up Python 3.14
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 uses: actions/setup-python@v5
with:
- python-version: "3.12"
</code_context>
<issue_to_address>
**issue (bug_risk):** The setup-python step mixes two `uses` clauses on one line, making the YAML invalid.
This step currently has two `uses` declarations on the same line (`actions/setup-python@... # v5.6.0 uses: actions/setup-python@v5`), which is not valid for YAML or GitHub Actions. Please keep a single, pinned `uses` entry, for example:
```yaml
- name: Set up Python 3.14
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.14"
```
As-is, the workflow will not load successfully.
</issue_to_address>
### Comment 3
<location path=".github/workflows/python-app.yml" line_range="26-27" />
<code_context>
- python-version: "3.12"
+ python-version: "3.14"
- name: Install uv
- uses: astral-sh/setup-uv@v6
+ uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 uses: astral-sh/setup-uv@v6
with:
enable-cache: true
</code_context>
<issue_to_address>
**issue (bug_risk):** The uv setup step also has two `uses` values merged into one line, which will break the workflow.
This step is invalid because two `uses` entries are on the same line; GitHub Actions only allows one `uses` per step. Please keep a single, pinned `uses` value, e.g.:
```yaml
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
```
Otherwise the workflow will fail to run.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3.12 | ||
| uses: actions/setup-python@v5 | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@v4 |
There was a problem hiding this comment.
issue (bug_risk): The checkout step line is malformed and will break the workflow YAML.
This line combines two uses: declarations (@34e... # v4.3.1 and @v4) on a single entry, which produces invalid YAML and stops the workflow from running. Please split this into separate steps or keep only the pinned SHA form, e.g.
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1| - name: Set up Python 3.14 | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 uses: actions/setup-python@v5 |
There was a problem hiding this comment.
issue (bug_risk): The setup-python step mixes two uses clauses on one line, making the YAML invalid.
This step currently has two uses declarations on the same line (actions/setup-python@... # v5.6.0 uses: actions/setup-python@v5), which is not valid for YAML or GitHub Actions. Please keep a single, pinned uses entry, for example:
- name: Set up Python 3.14
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.14"As-is, the workflow will not load successfully.
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 uses: astral-sh/setup-uv@v6 |
There was a problem hiding this comment.
issue (bug_risk): The uv setup step also has two uses values merged into one line, which will break the workflow.
This step is invalid because two uses entries are on the same line; GitHub Actions only allows one uses per step. Please keep a single, pinned uses value, e.g.:
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
cache-dependency-glob: "uv.lock"Otherwise the workflow will fail to run.
Summary
src/vse_simpackageWhy
The repository previously mixed production modules, scripts, tests, and historical artifacts at its root and targeted Python 3.10–3.12. This modernizes the package layout and establishes one current Python 3.14 development and CI environment with a reproducible UV lockfile.
Impact
Development now uses Python 3.14 and
uv sync --locked. Imports use the installedvse_simpackage. NumPy 2 is now supported while method results and voter utilities exposed by the package retain Python scalar conventions.Validation
uv run python -m pytest— 43 passed on Python 3.14.6trunk check— no issuesgit diff --checkSummary by Sourcery
Modernize the project into an installable
vse_simpackage, standardize the repository layout, and move the supported runtime and tooling to Python 3.14 with updated scientific Python dependencies.New Features:
src/vse_simpackage that exposes the core simulation, methods, strategies, diagnostics, and decorators as a cohesive API.Bug Fixes:
Enhancements:
vse_simpackage imports, module-based script execution, and the new repository layout.Build:
vse-simand package discovery undersrcinpyproject.toml.pyproject.tomlto target Python 3.14 and newer NumPy/SciPy releases.CI:
uv-based installation with a locked dependency set.Deployment:
misePython version and documentation instructions with the new Python 3.14 development and CI environment.Documentation:
README.mdandAGENTS.mdto describe the installable package layout, new import paths, Python 3.14 support, and updated script invocation patterns.artifacts,analysis, andexperimentsdirectories and clarify that retained outputs and exploratory code are outside the supported package API.Tests:
tests/package, update imports to usevse_simand script modules, and narrow pytest discovery to the package and tests directories.Chores:
src/vse_simpackage and new directory structure.