Skip to content

Commit b59a829

Browse files
Merge branch 'main' into 159-feature-request-add-formula-58-from-nen_en_1992_1_1_c2_2011
2 parents 83dbda9 + ba31b70 commit b59a829

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
repos:
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.3.4
20+
rev: v0.3.5
2121
hooks:
2222
# Run the linter.
2323
- id: ruff

blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_9_detailling_and_specific_rules/formula_9_1n.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,16 @@ def _evaluate(
6060

6161
def latex(self) -> LatexFormula:
6262
"""Returns LatexFormula object for formula 9.1N."""
63+
fraction = latex_fraction(numerator=f"{self.f_ctm:.2f}", denominator=f"{self.f_yk:.2f}")
6364
return LatexFormula(
6465
return_symbol=r"A_{s,min}",
6566
result=f"{self:.2f}",
6667
equation=latex_max_curly_brackets(
67-
rf"0.26 \cdot {latex_fraction(r'f_{ctm}', r'f_{yk}')} \cdot b_t \cdot d",
68+
rf"0.26 \cdot {latex_fraction(numerator=r'f_{ctm}', denominator=r'f_{yk}')} \cdot b_t \cdot d",
6869
r"0.0013 \cdot b_t \cdot d",
6970
),
7071
numeric_equation=latex_max_curly_brackets(
71-
rf"0.26 \cdot {latex_fraction(f'{self.f_ctm:.2f}', f'{self.f_yk:.2f}')} \cdot {self.b_t:.2f} \cdot {self.d:.2f}",
72+
rf"0.26 \cdot {fraction} \cdot {self.b_t:.2f} \cdot {self.d:.2f}",
7273
rf"0.0013 \cdot {self.b_t:.2f} \cdot {self.d:.2f}",
7374
),
7475
comparison_operator_label="=",

blueprints/codes/eurocode/nen_en_1993_5_2008/chapter_5_ultimate_limit_states/formula_5_9.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def latex(self) -> LatexFormula:
9797
latex_equation = latex_min_curly_brackets(
9898
r"\left(\beta_b \cdot W_{pl} - \frac{\rho \cdot A_v^2}{4 \cdot t_w \cdot \sin(\alpha)}\right) \cdot \frac{f_y}{\gamma_{M0}}, M_{c,Rd}"
9999
)
100+
fraction = latex_fraction(numerator=f"{self.f_y:.2f}", denominator=f"{self.gamma_m_0:.2f}")
100101
return LatexFormula(
101102
return_symbol=r"M_{V,Rd}",
102103
result=f"{self:.3f}",
@@ -105,7 +106,7 @@ def latex(self) -> LatexFormula:
105106
latex_min_curly_brackets(
106107
rf"\left({self.beta_b:.2f} \cdot {self.w_pl:.2f} - \frac{{{self.rho:.2f} \cdot {self.a_v:.2f}^2}}{{4 \cdot {self.t_w:.2f} \cdot "
107108
rf"\sin({self.alpha:.2f})}}\right) \cdot "
108-
rf"{latex_fraction(f'{self.f_y:.2f}', f'{self.gamma_m_0:.2f}')} \cdot 10^{{-6}}, {self.mc_rd:.2f}"
109+
rf"{fraction} \cdot 10^{{-6}}, {self.mc_rd:.2f}"
109110
)
110111
),
111112
comparison_operator_label="=",

requirements_dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mypy==1.9.0
2-
ruff==0.3.4
2+
ruff==0.3.5
33
isort==5.13.2
44
pre-commit==3.7.0
55
pytest==8.1.1

0 commit comments

Comments
 (0)