-
Notifications
You must be signed in to change notification settings - Fork 20
PART 1 - 955 feature request add bending moment check to feature branch #956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 840-feature-request-add-first-steel-check-to-blueprints
Are you sure you want to change the base?
Conversation
…ding moment resistance checks
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughIntroduces bending moment strength checks for steel cross-sections per Eurocode 3, supporting both Class 1/2 and Class 3 sections with validation, calculation formulas, and detailed reporting. Integrates these checks into the existing I-profile strength evaluation module and includes comprehensive test coverage. Changes
Sequence DiagramsequenceDiagram
actor User
participant Check as BendingMomentStrengthCheck<br/>(Class 1/2 or 3)
participant Props as SectionProperties
participant Formula as Formulas<br/>(Form 6.13/6.14/6.12)
participant Result as CheckResult
User->>Check: create(steel_cross_section, m, axis, gamma_m0)
Check->>Props: compute or validate section_properties
Props-->>Check: section_properties (Sxx/Syy, etc.)
User->>Check: calculation_formula()
Check->>Check: validate axis (My/Mz)
Check->>Props: extract w (flexural modulus)
Check->>Formula: Form6Dot13MCRdClass1And2 or<br/>Form6Dot14MCRdClass3<br/>(compute M_c,Rd resistance)
Formula-->>Check: M_c,Rd
Check->>Formula: Form6Dot12CheckBendingMoment<br/>(create check object)
Formula-->>Check: check object
Check-->>User: formula dict
User->>Check: result()
Check->>Check: compare |m| vs M_c,Rd
Check->>Result: create CheckResult<br/>(is_ok, unity_check)
Result-->>Check: CheckResult
Check-->>User: CheckResult
User->>Check: report(n=2)
Check-->>User: Report (profile, moment,<br/>resistance, pass/fail status)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (3 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 840-feature-request-add-first-steel-check-to-blueprints #956 +/- ##
===========================================================================================
- Coverage 100.00% 99.97% -0.03%
===========================================================================================
Files 422 423 +1
Lines 13145 13267 +122
===========================================================================================
+ Hits 13145 13264 +119
- Misses 0 3 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…lass 1 and 2 bending moment resistance checks
…or Eurocode 3 compliance
…And2Check and BendingMomentStrengthClass3Check classes
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🤖 Fix all issues with AI agents
In `@blueprints/checks/eurocode/steel/bending_moment_strength.py`:
- Around line 181-193: The example references a non-existent class name
BendingMomentStrengthClass123Check; update the import and usage to the correct
class BendingMomentStrengthClass3Check (replace any import statement and
instantiation that mentions BendingMomentStrengthClass123Check with
BendingMomentStrengthClass3Check) so the example imports
BendingMomentStrengthClass3Check and creates calc =
BendingMomentStrengthClass3Check(heb_300_s355, m, axis='My', gamma_m0=1.0)
before calling calc.report().
- Around line 53-61: The example uses a non-existent class and wrong profile
namespace: replace the import of BendingMomentStrengthClass123Check with the
correct check class BendingMomentStrengthClass12Check (or the actual class name
defined in this module if different) and change the HEM profile reference to the
HEB profile (e.g., use HEB.HEB300.with_corrosion(0) instead of
HEM.HEM300.with_corrosion(0)); update the example variable names accordingly
(e.g., heb_300_profile) and ensure imports reference HEB from
blueprints.structural_sections.steel.standard_profiles.heb and the check class
from blueprints.checks.eurocode.steel.bending_moment_strength.
- Line 1: The module docstring incorrectly states "Class 3 only"; update the
top-of-file docstring to accurately describe that the module implements bending
moment resistance checks per Eurocode 3 for Class 1/2 and Class 3 cross-sections
(both classification and strength checks), and mention any relevant functions or
classes (e.g., check_bending_moment_strength, classify_section) so the docstring
reflects the actual capabilities.
In
`@tests/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/test_bending_moment_strength.py`:
- Around line 24-25: The test is using direct dataclass equality between calc
and calc_without_section_props which is brittle if SectionProperties lacks value
equality; change the assertion to verify that auto-computed section properties
are present and correct instead: after creating calc_without_section_props via
BendingMomentStrengthClass1And2Check(cross_section, 0, axis="My", gamma_m0=1.0)
assert that calc_without_section_props.section_properties is not None (or that a
key numeric property like section_properties.Iyy or section_properties.area
equals the corresponding value on calc within a small tolerance), and update the
analogous assertions around lines 111-112 the same way.
- Around line 10-12: The class TestBendingMomentStrengthClass1And2Check has a
docstring that incorrectly references "BendingMomentStrengthClass3Check"; update
the docstring to accurately describe TestBendingMomentStrengthClass1And2Check
(e.g., "Tests for BendingMomentStrengthClass1And2Check") so the class name and
its docstring match; locate the class definition
TestBendingMomentStrengthClass1And2Check and replace the incorrect string in its
triple-quoted docstring accordingly.
- Line 1: The module docstring is incomplete; replace the placeholder string in
test_bending_moment_strength.py with a clear, complete module-level docstring
stating what the tests cover (e.g., "Tests for bending moment strength according
to Eurocode 3 (EN 1993-1-1:2005)."), and optionally include a short note on the
scope (ultimate limit state checks) and any relevant test assumptions so the
file header clearly documents the purpose of the tests.
tests/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/test_bending_moment_strength.py
Outdated
Show resolved
Hide resolved
tests/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/test_bending_moment_strength.py
Outdated
Show resolved
Hide resolved
…moment and tensile strength checks
…nt and compression strength validations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds bending moment strength checking functionality for steel cross-sections according to Eurocode 3, supporting both compact (Class 1/2) and slender (Class 3) cross-section classifications.
Changes:
- Implements bending moment resistance checks for Class 1/2 and Class 3 steel cross-sections with support for bending about both principal axes (My and Mz)
- Integrates bending moment checks into the I-profile strength verification workflow with improved type safety
- Updates test assertions to use
pytest.approxfor floating-point comparisons instead of direct equality checks
Reviewed changes
Copilot reviewed 7 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| blueprints/checks/eurocode/steel/bending_moment_strength.py | New module implementing bending moment strength checks for Class 1/2 and Class 3 cross-sections |
| blueprints/checks/eurocode/steel/i_profile_strength_class_3.py | Integrates bending moment checks into subchecks method and improves type annotations |
| tests/checks/eurocode/steel/test_bending_moment_strength.py | Comprehensive test suite for bending moment strength checks covering various scenarios |
| tests/checks/eurocode/steel/test_tensile_strength.py | Updates test assertion to compare unity check values using pytest.approx |
| tests/checks/eurocode/steel/test_compressive_strength.py | Updates test assertion to compare unity check values using pytest.approx |
| tests/checks/eurocode/en_1992_1_1_2004/nominal_concrete_cover/init.py | Removes docstring from empty init file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@SZeltaat last 2 weeks I haven't found the time to do a proper review. Will you please lend us an extra couple of 👀 and 🤚⌨️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 13 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…' into 955-feature-request-add-bending-moment-class-3-check-to-feature-branch
…' into 955-feature-request-add-bending-moment-class-3-check-to-feature-branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 13 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 14 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@egarciamendez, it's also quite busy here at the moment. I will do a review on wednesday in Bunnik! |
…r and utilize internal property calculations for improved consistency and performance.
…sion and tension checks; add unimplemented checks to report and improve report generation logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 13 out of 16 changed files in this pull request and generated 9 comments.
Comments suppressed due to low confidence (1)
blueprints/utils/report_helpers.py:144
- The function now supports
CheckResultentries incalculations, but the type annotation/docstring still indicate onlyOptional[CheckProtocol]. Update the annotation (and docstring parameter description) to reflect the accepted value types (e.g.,CheckProtocol | CheckResult | None) so callers and type checkers agree with actual behavior.
def add_unity_check_summary(report: Report, calculations: dict[str, Optional["CheckProtocol"]], n: int = 2) -> None:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s; modify test to reflect behavior for large normal forces.
…ype handling for check results in reports
…' into 955-feature-request-add-bending-moment-class-3-check-to-feature-branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 17 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ss; update test documentation for clarity
…-feature-branch' of https://github.com/Blueprints-org/blueprints into 955-feature-request-add-bending-moment-class-3-check-to-feature-branch
… type handling in CheckStrengthIProfileClass3
…ve type filtering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 17 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…StrengthBendingClass12 to avoid redundant calculations; update ignore_checks options in CheckStrengthIProfileClass3.
…ubchecks and improve output clarity; add main execution block for testing.
…mline module usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 17 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
adds bending moment class 1 2 3 check to feature branch. moved documents to "steel" folder as discussed with Enrique
i have some struggles with the i profile subcheck method. advise is requested.
Fixes #955
Type of change
Please delete options that are not relevant.
Checklist:
Summary by CodeRabbit
New Features
Improvements
Tests
✏️ Tip: You can customize this high-level summary in your review settings.