Skip to content

Feat/sigma-tau-extraction - #50

Merged
pillowbeast merged 4 commits into
mainfrom
feat/sigma-tau-extraction
Apr 27, 2026
Merged

Feat/sigma-tau-extraction#50
pillowbeast merged 4 commits into
mainfrom
feat/sigma-tau-extraction

Conversation

@pillowbeast

@pillowbeast pillowbeast commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Added sigma & tau to the history for analysis

Summary by CodeRabbit

  • New Features

    • Extended analysis evaluation to track and record maximum stress and maximum shear values during each iteration cycle, providing enhanced data metrics and more detailed performance insights for comprehensive evaluation results.
  • Chores

    • Version bump to 3.1.7: Updated package version across all configuration files, citation metadata, and user documentation.

Copilot AI review requested due to automatic review settings April 27, 2026 14:17
@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@pillowbeast has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes and 58 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 235b0a85-a6b7-44fd-8b67-3b96fe3f101f

📥 Commits

Reviewing files that changed from the base of the PR and between e3d4f44 and 912d984.

📒 Files selected for processing (2)
  • src/weac/analysis/criteria_evaluator.py
  • tests/analysis/test_criteria_evaluator.py
📝 Walkthrough

Walkthrough

This PR bumps the package version from 3.1.6 to 3.1.7 across metadata files and extends the CoupledCriterionHistory dataclass with two new tracking fields (sigma_maxs and tau_maxs) to record per-iteration stress maxima during coupled criterion evaluation.

Changes

Cohort / File(s) Summary
Version Metadata
CITATION.cff, demo/demo.ipynb, pyproject.toml, src/weac/__init__.py
Version number updated from 3.1.6 to 3.1.7 across all package metadata and documentation files.
Stress Tracking Extension
src/weac/analysis/criteria_evaluator.py
CoupledCriterionHistory dataclass augmented with sigma_maxs and tau_maxs list fields; iteration logic updated to compute and record maximum stress values alongside existing metrics.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #29: Version bump PR updating the same metadata files (CITATION.cff, pyproject.toml, src/weac/init.py, demo notebook).
  • PR #33: Release version update PR modifying identical package metadata files for a prior version increment.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat/sigma-tau-extraction' clearly summarizes the main change: extracting and tracking sigma and tau values in the history, which aligns with the actual implementation across multiple files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sigma-tau-extraction

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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 tracking of maximum normal/shear stresses (sigma/tau) during coupled-criterion evaluation and bumps the package version to 3.1.7.

Changes:

  • Extend CoupledCriterionHistory to include sigma_maxs and tau_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.

Comment thread src/weac/analysis/criteria_evaluator.py
Comment thread src/weac/analysis/criteria_evaluator.py Outdated
Comment thread src/weac/analysis/criteria_evaluator.py Outdated
Comment thread src/weac/analysis/criteria_evaluator.py

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between bfa7230 and e3d4f44.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • CITATION.cff
  • demo/demo.ipynb
  • pyproject.toml
  • src/weac/__init__.py
  • src/weac/analysis/criteria_evaluator.py

Comment thread pyproject.toml
Comment thread src/weac/analysis/criteria_evaluator.py Outdated
Comment thread src/weac/analysis/criteria_evaluator.py
@pillowbeast
pillowbeast merged commit 2a595d3 into main Apr 27, 2026
4 checks passed
@pillowbeast
pillowbeast deleted the feat/sigma-tau-extraction branch April 27, 2026 14:48
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.

2 participants