Skip to content

Conversation

@GerjanDorgelo
Copy link
Contributor

@GerjanDorgelo GerjanDorgelo commented Nov 18, 2025

Description

  • Adds latex option for intermediate results, for example when
    • so that comparison formula not only shows OK/NOT OK, but also an UC.
    • used for complex equations.
  • Updated two equations (that i need anyway) to show how this feature would work.
  • Also noticed that two equations lacked a return symbol, which broke the small refactor i made. These two have now a return symbol.

Fixes #837

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • 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

@GerjanDorgelo GerjanDorgelo self-assigned this Nov 18, 2025
@GerjanDorgelo GerjanDorgelo linked an issue Nov 18, 2025 that may be closed by this pull request
5 tasks
@GerjanDorgelo GerjanDorgelo marked this pull request as draft November 18, 2025 18:57
@GerjanDorgelo GerjanDorgelo marked this pull request as ready for review November 18, 2025 18:57
Copilot AI review requested due to automatic review settings November 18, 2025 18:57
Copy link
Contributor

Copilot AI left a 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 implements a new feature to display intermediate calculation results in LaTeX formula representations, addressing issue #837. The change allows formulas to show not just the final OK/NOT OK result, but also intermediate computational steps like unity check values.

Key Changes:

  • Added intermediate_result field to LatexFormula class for displaying intermediate calculation steps
  • Updated formula rendering logic to include intermediate results in complete representations
  • Implemented unity check calculations in formulas 6.5 and 6.9 to demonstrate the feature

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
blueprints/codes/latex_formula.py Added intermediate_result attribute and integrated it into complete/short representations
blueprints/codes/eurocode/en_1993_1_1_2005/chapter_6_ultimate_limit_state/formula_6_9.py Added _unity_check method and intermediate result calculation for compression check
blueprints/codes/eurocode/en_1993_1_1_2005/chapter_6_ultimate_limit_state/formula_6_5.py Added _unity_check method and intermediate result calculation for tension check
blueprints/codes/eurocode/nen_9997_1_c2_2017/chapter_2_basic_of_geotechnical_design/formula_2_4.py Added "CHECK" return symbol (previously missing)
blueprints/codes/eurocode/en_1992_1_1_2004/chapter_8_detailing_of_reinforcement_and_prestressing_tendons/formula_8_5.py Added return symbol for alpha coefficients formula
tests/codes/eurocode/nen_9997_1_c2_2017/chapter_2_basic_of_geotechnical_design/test_formula_2_4.py Updated test expectations to include "CHECK" prefix
tests/codes/eurocode/en_1993_1_1_2005/chapter_6_ultimate_limit_state/test_formula_6_9.py Updated test to expect intermediate unity check result
tests/codes/eurocode/en_1993_1_1_2005/chapter_6_ultimate_limit_state/test_formula_6_5.py Updated test to expect intermediate unity check result
tests/codes/eurocode/en_1992_1_1_2004/chapter_8_detailing_of_reinforcement_and_prestressing_tendons/test_formula_8_5.py Updated test expectations for new return symbol
.github/prompts/comparison_tests.prompt.md Updated documentation example with intermediate result
.github/prompts/comparison_formula.prompt.md Updated documentation example with intermediate result pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@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!

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (af82b24) to head (976f52a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #838   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          393       393           
  Lines        12116     12130   +14     
=========================================
+ Hits         12116     12130   +14     

☔ 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.

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.

[✨ Feature request]: Add LaTeX option for intermediate results.

2 participants