Feat/sigma-tau-extraction - #50
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR bumps the package version from 3.1.6 to 3.1.7 across metadata files and extends the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Pull request overview
Adds tracking of maximum normal/shear stresses (sigma/tau) during coupled-criterion evaluation and bumps the package version to 3.1.7.
Changes:
- Extend
CoupledCriterionHistoryto includesigma_maxsandtau_maxs. - Record per-iteration sigma/tau maxima during
evaluate_coupled_criterion(). - Bump version references across packaging/metadata and the demo notebook.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/weac/analysis/criteria_evaluator.py |
Adds new history fields and records sigma/tau maxima during coupled-criterion iterations. |
src/weac/__init__.py |
Bumps library version to 3.1.7. |
pyproject.toml |
Bumps project version and bumpversion current_version to 3.1.7. |
uv.lock |
Updates locked editable package version to 3.1.7. |
demo/demo.ipynb |
Updates referenced release version in notebook text. |
CITATION.cff |
Updates cited software version to 3.1.7. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pyproject.toml`:
- Line 7: The version in pyproject.toml was bumped to 3.1.7 but you added new
optional tracking fields (sigma_maxs and tau_maxs) to the
CoupledCriterionHistory data model, which is a feature addition; change the
version string in pyproject.toml to a minor bump (e.g., 3.2.0) so the package
version reflects the new feature, and ensure any other places that mirror the
project version are updated consistently.
In `@src/weac/analysis/criteria_evaluator.py`:
- Line 446: Replace the fragile positional construction
CoupledCriterionHistory([], [], [], [], [], [], [], []) with a safe,
order-independent initialization: update the CoupledCriterionHistory dataclass
to use dataclasses.field(default_factory=list) for each list-typed attribute so
you can instantiate with CoupledCriterionHistory() everywhere, and then change
the two call sites that currently pass eight empty lists (the
CoupledCriterionHistory(...) usages) to simply call CoupledCriterionHistory()
(or, if you prefer not to modify the dataclass, replace those calls with keyword
arguments like CoupledCriterionHistory(alphas=[], betas=[], ..., tau_maxs=[]) to
make each field explicit).
- Around line 547-548: The code is recording max stresses without taking
absolute values, causing sigma_maxs and tau_maxs (appended in history.sigma_maxs
and history.tau_maxs) to reflect signed extremes rather than magnitudes used by
stress_envelope(); update the two append calls to use np.max(np.abs(sigma_kPa))
and np.max(np.abs(tau_kPa)) so they match stress_envelope()'s
np.abs(sigma)/np.abs(tau) logic, and add brief docstring entries to the
CoupledCriterionHistory class documenting that sigma_maxs and tau_maxs store the
peak absolute normal and shear stress magnitudes (in kPa) over the scan.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ee7b69c5-85d2-4fd9-b146-3218d7d1ee59
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
CITATION.cffdemo/demo.ipynbpyproject.tomlsrc/weac/__init__.pysrc/weac/analysis/criteria_evaluator.py
Added sigma & tau to the history for analysis
Summary by CodeRabbit
New Features
Chores