Skip to content

927 copying steel equations from 2005 to 2025, for those that are the same, batch 1#928

Open
GerjanDorgelo wants to merge 84 commits intomainfrom
927_code_batch1
Open

927 copying steel equations from 2005 to 2025, for those that are the same, batch 1#928
GerjanDorgelo wants to merge 84 commits intomainfrom
927_code_batch1

Conversation

@GerjanDorgelo
Copy link
Contributor

@GerjanDorgelo GerjanDorgelo commented Jan 13, 2026

Description

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • New Features
    • Added EN 1993-1-1:2025 Chapter 8 formulas for structural steel design: Formula 8.3 for utilization ratio calculations, Formula 8.5 for area deductions in staggered fastener holes, and Formula 8.7 for additional moment calculations from axial forces.

✏️ Tip: You can customize this high-level summary in your review settings.

…7, 8.19, 8.22, and 8.23 to follow naming convention
…ance in structural hollow sections according to EN 1993-1-1:2025
…ithout torsion according to EN 1993-1-1:2025
…rectangular solid sections according to EN 1993-1-1:2025
@GerjanDorgelo GerjanDorgelo self-assigned this Jan 13, 2026
@github-actions
Copy link

Thank you so much for contributing to Blueprints!
Your contributions help thousands of engineers work more efficiently and accurately.

Now that you've created your pull request, please don't go away; take a look at the bottom of this page for the automated checks that should already be running. If they pass, great! If not, please click on 'Details' and see if you can fix the problem they've identified. A maintainer should be along shortly to review your pull request and help get it added!

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

Adds three new Eurocode EN 1993-1-1:2025 Chapter 8 formula implementations (Formulas 8.3, 8.5, 8.7) with input validation, calculation logic, and LaTeX formatting support, accompanied by comprehensive test suites covering evaluation, error handling, and output formatting.

Changes

Cohort / File(s) Summary
Package structure
blueprints/codes/eurocode/en_1993_1_1_2025/__init__.py, blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py, tests/codes/eurocode/en_1993_1_1_2025/__init__.py, tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py
New package initializers establishing module structure and docstrings for EN 1993-1-1:2025 source and test packages.
Formula 8.3 implementation
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_3.py
Implements Form8Dot3UtilizationRatio class computing utilization ratio (UC) as sum of normalized axial force and bending moments (NEd/NRd + MyEd/MyRd + MzEd/MzRd) with input validation and LaTeX representation.
Formula 8.5 implementation
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_5.py
Implements Form8Dot5MinDeductionAreaStaggeredFastenerHoles class computing minimum area deduction (ΔA_net,1) for staggered fastener holes with per-element sequence validation and LaTeX support.
Formula 8.7 implementation
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_7.py
Implements Form8Dot7AdditionalMoment class computing additional bending moment (ΔM_Ed = NEd · eN) with negative value validation and LaTeX formatting.
Formula tests
tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_3.py, tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_5.py, tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_7.py
Comprehensive test suites for each formula validating correct evaluation results, input error handling (negative values, zero checks, sequence length matching), and LaTeX output formatting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Suggested reviewers

  • egarciamendez

Poem

🐰 Three formulas hopping into view,
Eurocode 1993 through and through,
Validation bounds and moments divine,
LaTeX spells make the output shine,
Tests ensure each calculation's true!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete; it follows the template structure but contains no substantive explanation of what was changed or why, only checked boxes without detail. Add a detailed description explaining which equations were copied, why they are unchanged between versions, and what files/formulas were added or modified.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately references copying steel equations from 2005 to 2025 for batch 1, and the changeset confirms implementation of multiple Formula 8.x classes with corresponding tests for EN 1993-1-1:2025.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f95f1db) to head (d7f3403).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #928   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          414       418    +4     
  Lines        12715     12792   +77     
=========================================
+ Hits         12715     12792   +77     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In
@blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_5.py:
- Around line 73-79: The latex() implementation assumes self.s[0] and
self.p_2[0] exist and will IndexError if s or p_2 are empty; add a guard in
_evaluate() to validate that self.s and self.p_2 are non-empty sequences (raise
a clear ValueError with context) and/or update latex() to handle the empty case
explicitly (e.g., produce a fallback numeric expression or omit the sum) so
accessing self.s[0] and self.p_2[0] is safe; reference the latex() method and
the _evaluate() validator when making the change.

In
@blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_7.py:
- Around line 30-38: The docstring in formula_8_7.py for parameters n_ed and e_n
contains a LaTeX typo: replace the incorrect `[$A_{eff$]` with the correctly
closed `[$A_{eff}$]` in the descriptive text for e_n so the LaTeX bracket is
closed properly in the docstring near the Parameters block.

In
@tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py:
- Line 1: The module docstring incorrectly references "Chapter 6" — update the
docstring in the module (the top-level string in __init__.py for the
chapter_8_ultimate_limit_state package) to say "Chapter 8 - Ultimate limit
state" (or otherwise replace "Chapter 6" with "Chapter 8") so it accurately
reflects EN_1993_1_1_2025: Chapter 8 content.

In
@tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_5.py:
- Around line 44-45: The comment on the second test tuple is wrong — it says "p2
has a zero value" but the tuple (10.0, 5.0, 20.0, [50.0, 60.0], [100.0, 120.0,
10.0]) actually demonstrates mismatched list lengths between s and p_2; update
the comment to reflect "mismatched list lengths (s has 2 elements, p_2 has 3
elements)" and ensure any nearby comment for the first tuple correctly describes
that p2 contains a zero value if intended.
🧹 Nitpick comments (3)
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py (1)

1-1: Consider aligning the document reference format.

The docstring uses 1993-1-1+C2+A1:2025 while the parent package constant uses EN 1993-1-1:2025. For consistency, consider using the same format (either add the full corrigenda/amendment notation to the constant, or simplify this docstring to match).

Suggested fix for consistency
-"""Module containing all formulas from 1993-1-1+C2+A1:2025: Chapter 8 - Ultimate limit state."""
+"""Module containing all formulas from EN 1993-1-1:2025: Chapter 8 - Ultimate limit state."""
tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_3.py (1)

36-39: Minor docstring inconsistency.

The docstring mentions only n_ed but the test actually covers negative values for n_ed, m_y_ed, and m_z_ed.

Suggested fix
     def test_raise_error_if_negative(self, n_ed: float, n_rd: float, m_y_ed: float, m_y_rd: float, m_z_ed: float, m_z_rd: float) -> None:
-        """Test that a NegativeValueError is raised when a negative value is passed for n_ed."""
+        """Test that a NegativeValueError is raised when a negative value is passed for n_ed, m_y_ed, or m_z_ed."""
         with pytest.raises(NegativeValueError):
             Form8Dot3UtilizationRatio(n_ed=n_ed, n_rd=n_rd, m_y_ed=m_y_ed, m_y_rd=m_y_rd, m_z_ed=m_z_ed, m_z_rd=m_z_rd)
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_5.py (1)

61-66: Redundant validation calls.

raise_if_less_or_equal_to_zero already covers negative values (since negative < 0), making raise_if_negative redundant.

Suggested simplification
     @staticmethod
     def _evaluate(
         t: MM,
         n_1: MM,
         d_0: MM,
         s: Sequence[MM],
         p_2: Sequence[MM],
     ) -> MM:
         """Evaluates the formula, for more information see the __init__ method."""
-        raise_if_negative(t=t, n_1=n_1, d_0=d_0)
         raise_if_less_or_equal_to_zero(t=t, n_1=n_1, d_0=d_0)
         raise_if_lists_differ_in_length(s=s, p_2=p_2)
         for s_i, p_2_i in zip(s, p_2):
-            raise_if_negative(s=s_i, p_2=p_2_i)
             raise_if_less_or_equal_to_zero(s=s_i, p_2=p_2_i)

         return t * (n_1 * d_0 - sum((s_i**2) / (4 * p_2_i) for s_i, p_2_i in zip(s, p_2)))
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f95f1db and d7f3403.

📒 Files selected for processing (10)
  • blueprints/codes/eurocode/en_1993_1_1_2025/__init__.py
  • blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py
  • blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_3.py
  • blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_5.py
  • blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_7.py
  • tests/codes/eurocode/en_1993_1_1_2025/__init__.py
  • tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py
  • tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_3.py
  • tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_5.py
  • tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_7.py
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-07T10:56:37.917Z
Learnt from: SZeltaat
Repo: Blueprints-org/blueprints PR: 909
File: blueprints/structural_sections/_polygon_builder.py:164-164
Timestamp: 2026-01-07T10:56:37.917Z
Learning: When reviewing Python files that use the Ty type checker, treat comments like '# ty:ignore[unsupported-operator]' as valid Ty directives, not typos or mistakes of '# type: ignore'. Do not flag them as errors. Ensure reviewers differentiate Ty's ignore syntax from MyPy's and that the directive suppresses only the intended error.

Applied to files:

  • blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_7.py
  • tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_5.py
  • blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_5.py
  • blueprints/codes/eurocode/en_1993_1_1_2025/__init__.py
  • tests/codes/eurocode/en_1993_1_1_2025/__init__.py
  • blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py
  • blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_3.py
  • tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py
  • tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_3.py
  • tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_7.py
🧬 Code graph analysis (6)
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_7.py (3)
blueprints/codes/formula.py (2)
  • Formula (11-108)
  • label (42-52)
blueprints/codes/latex_formula.py (2)
  • LatexFormula (7-85)
  • latex_replace_symbols (162-218)
blueprints/validations.py (1)
  • raise_if_negative (76-92)
tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_5.py (3)
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_5.py (1)
  • Form8Dot5MinDeductionAreaStaggeredFastenerHoles (12-87)
blueprints/validations.py (3)
  • LessOrEqualToZeroError (6-11)
  • ListsNotSameLengthError (46-54)
  • NegativeValueError (22-27)
blueprints/codes/latex_formula.py (2)
  • complete (40-51)
  • short (71-81)
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_5.py (3)
blueprints/codes/formula.py (2)
  • Formula (11-108)
  • label (42-52)
blueprints/codes/latex_formula.py (1)
  • LatexFormula (7-85)
blueprints/validations.py (3)
  • raise_if_less_or_equal_to_zero (57-73)
  • raise_if_lists_differ_in_length (131-153)
  • raise_if_negative (76-92)
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_3.py (3)
blueprints/codes/formula.py (2)
  • Formula (11-108)
  • label (42-52)
blueprints/codes/latex_formula.py (1)
  • LatexFormula (7-85)
blueprints/validations.py (2)
  • raise_if_less_or_equal_to_zero (57-73)
  • raise_if_negative (76-92)
tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_3.py (3)
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_3.py (1)
  • Form8Dot3UtilizationRatio (11-78)
blueprints/validations.py (2)
  • LessOrEqualToZeroError (6-11)
  • NegativeValueError (22-27)
blueprints/codes/latex_formula.py (2)
  • complete (40-51)
  • short (71-81)
tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_7.py (2)
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_7.py (1)
  • Form8Dot7AdditionalMoment (10-71)
blueprints/validations.py (1)
  • NegativeValueError (22-27)
🔇 Additional comments (10)
tests/codes/eurocode/en_1993_1_1_2025/__init__.py (1)

1-1: LGTM!

Simple and accurate docstring for the test package.

blueprints/codes/eurocode/en_1993_1_1_2025/__init__.py (1)

1-3: LGTM!

Clean package initializer with the standard constant for referencing the source document.

blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_7.py (4)

1-7: LGTM!

Imports are appropriate and well-organized for the formula implementation.


10-14: LGTM!

Class metadata follows project conventions with appropriate label and source document reference.


43-51: LGTM!

Input validation and formula evaluation are correctly implemented. The non-negativity check is appropriate for axial compression force and centroid shift.


53-71: LGTM!

The LaTeX representation is well-implemented with correct symbols, numeric substitution, and units.

tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_7.py (1)

1-62: LGTM!

The test module is well-structured with comprehensive coverage:

  • Evaluation test correctly validates the formula result (N_Ed × e_N = 1000 × 50 = 50000 Nmm)
  • Negative value tests cover both parameters appropriately
  • LaTeX representation tests verify both complete and short forms
blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_3.py (1)

1-78: LGTM!

The implementation is correct and well-documented:

  • Utilization ratio formula UC = N_Ed/N_Rd + M_y,Ed/M_y,Rd + M_z,Ed/M_z,Rd is correctly implemented
  • Validation appropriately requires denominators > 0 and numerators ≥ 0
  • LaTeX representation correctly omits unit (dimensionless ratio)
  • Follows project conventions for Formula subclasses
tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_3.py (1)

57-88: LGTM!

The LaTeX representation tests are well-structured, using consistent input values and verifying both complete and short forms correctly.

tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_5.py (1)

53-82: LGTM!

The LaTeX representation tests are comprehensive, verifying both complete (with full equation expansion) and short forms with correct unit (mm^2).

Comment on lines +73 to +79
_numeric_equation: str = (
rf"{self.t:.{n}f} \left( {self.n_1:.{n}f} \cdot {self.d_0:.{n}f} - \left( \frac{{{self.s[0]:.{n}f}^2}}"
rf"{{4 \cdot {self.p_2[0]:.{n}f}}}"
)
for s_i, p_2_i in zip(self.s[1:], self.p_2[1:]):
_numeric_equation += rf" + \frac{{{s_i:.{n}f}^2}}{{4 \cdot {p_2_i:.{n}f}}}"
_numeric_equation += r" \right) \right)"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Potential IndexError with empty sequences.

latex() assumes s and p_2 have at least one element by accessing self.s[0] and self.p_2[0]. If empty sequences are passed (which _evaluate currently allows), this will raise an IndexError.

Consider either:

  1. Adding validation in _evaluate to require non-empty sequences, or
  2. Handling the empty case in latex()
Option 1: Add validation in _evaluate
         raise_if_lists_differ_in_length(s=s, p_2=p_2)
+        if len(s) == 0:
+            raise ValueError("s and p_2 must contain at least one element")
         for s_i, p_2_i in zip(s, p_2):
🤖 Prompt for AI Agents
In
@blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_5.py
around lines 73 - 79, The latex() implementation assumes self.s[0] and
self.p_2[0] exist and will IndexError if s or p_2 are empty; add a guard in
_evaluate() to validate that self.s and self.p_2 are non-empty sequences (raise
a clear ValueError with context) and/or update latex() to handle the empty case
explicitly (e.g., produce a fallback numeric expression or omit the sum) so
accessing self.s[0] and self.p_2[0] is safe; reference the latex() method and
the _evaluate() validator when making the change.

Comment on lines +30 to +38
Parameters
----------
n_ed : N
[$N_{Ed}$] Axial compression force [$N$].
e_n : MM
[$e_{N}$] Shift of the centroid of the effective area relative to the centre of gravity of the gross cross section [$mm$].
The method given in EN 1993-1-5 should be used to determine the possible shift [$e_{N}$] of the centroid of the effective
area [$A_{eff$] relative to the centre of gravity of the gross cross section.
"""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix LaTeX typo in docstring.

Line 37 has an unclosed LaTeX bracket: [$A_{eff$] should be [$A_{eff}$].

Suggested fix
-            area [$A_{eff$] relative to the centre of gravity of the gross cross section.
+            area [$A_{eff}$] relative to the centre of gravity of the gross cross section.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Parameters
----------
n_ed : N
[$N_{Ed}$] Axial compression force [$N$].
e_n : MM
[$e_{N}$] Shift of the centroid of the effective area relative to the centre of gravity of the gross cross section [$mm$].
The method given in EN 1993-1-5 should be used to determine the possible shift [$e_{N}$] of the centroid of the effective
area [$A_{eff$] relative to the centre of gravity of the gross cross section.
"""
Parameters
----------
n_ed : N
[$N_{Ed}$] Axial compression force [$N$].
e_n : MM
[$e_{N}$] Shift of the centroid of the effective area relative to the centre of gravity of the gross cross section [$mm$].
The method given in EN 1993-1-5 should be used to determine the possible shift [$e_{N}$] of the centroid of the effective
area [$A_{eff}$] relative to the centre of gravity of the gross cross section.
"""
🤖 Prompt for AI Agents
In
@blueprints/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/formula_8_7.py
around lines 30 - 38, The docstring in formula_8_7.py for parameters n_ed and
e_n contains a LaTeX typo: replace the incorrect `[$A_{eff$]` with the correctly
closed `[$A_{eff}$]` in the descriptive text for e_n so the LaTeX bracket is
closed properly in the docstring near the Parameters block.

@@ -0,0 +1 @@
"""Module containing all formulas from EN_1993_1_1_2025: Chapter 6 - Ultimate limit state."""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix incorrect chapter reference in docstring.

The docstring says "Chapter 6" but this package is for Chapter 8 (as indicated by the directory name chapter_8_ultimate_limit_state). In EN 1993-1-1:2025, the Ultimate Limit State content is in Chapter 8.

Suggested fix
-"""Module containing all formulas from EN_1993_1_1_2025: Chapter 6 - Ultimate limit state."""
+"""Module containing all formulas from EN_1993_1_1_2025: Chapter 8 - Ultimate limit state."""
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"""Module containing all formulas from EN_1993_1_1_2025: Chapter 6 - Ultimate limit state."""
"""Module containing all formulas from EN_1993_1_1_2025: Chapter 8 - Ultimate limit state."""
🤖 Prompt for AI Agents
In
@tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/__init__.py
at line 1, The module docstring incorrectly references "Chapter 6" — update the
docstring in the module (the top-level string in __init__.py for the
chapter_8_ultimate_limit_state package) to say "Chapter 8 - Ultimate limit
state" (or otherwise replace "Chapter 6" with "Chapter 8") so it accurately
reflects EN_1993_1_1_2025: Chapter 8 content.

Comment on lines +44 to +45
(10.0, 5.0, 20.0, [50.0, 60.0], [0.0, 120.0]), # p2 has a zero value
(10.0, 5.0, 20.0, [50.0, 60.0], [100.0, 120.0, 10.0]), # p2 has a zero value
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Incorrect comment.

Line 45's comment says "p2 has a zero value" but the test case actually validates mismatched list lengths (s has 2 elements, p_2 has 3 elements).

Suggested fix
             (10.0, 5.0, 20.0, [50.0, 60.0], [0.0, 120.0]),  # p2 has a zero value
-            (10.0, 5.0, 20.0, [50.0, 60.0], [100.0, 120.0, 10.0]),  # p2 has a zero value
+            (10.0, 5.0, 20.0, [50.0, 60.0], [100.0, 120.0, 10.0]),  # s and p2 have different lengths
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
(10.0, 5.0, 20.0, [50.0, 60.0], [0.0, 120.0]), # p2 has a zero value
(10.0, 5.0, 20.0, [50.0, 60.0], [100.0, 120.0, 10.0]), # p2 has a zero value
(10.0, 5.0, 20.0, [50.0, 60.0], [0.0, 120.0]), # p2 has a zero value
(10.0, 5.0, 20.0, [50.0, 60.0], [100.0, 120.0, 10.0]), # s and p2 have different lengths
🤖 Prompt for AI Agents
In
@tests/codes/eurocode/en_1993_1_1_2025/chapter_8_ultimate_limit_state/test_formula_8_5.py
around lines 44 - 45, The comment on the second test tuple is wrong — it says
"p2 has a zero value" but the tuple (10.0, 5.0, 20.0, [50.0, 60.0], [100.0,
120.0, 10.0]) actually demonstrates mismatched list lengths between s and p_2;
update the comment to reflect "mismatched list lengths (s has 2 elements, p_2
has 3 elements)" and ensure any nearby comment for the first tuple correctly
describes that p2 contains a zero value if intended.

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.

1 participant