Skip to content
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

[v14 - Ready] Fixes latexify tests #933

Merged
merged 1 commit into from
Jun 10, 2024
Merged

[v14 - Ready] Fixes latexify tests #933

merged 1 commit into from
Jun 10, 2024

Conversation

TorkelE
Copy link
Member

@TorkelE TorkelE commented Jun 9, 2024

Fixes the latexify tests. Mostly the errors were due to tabs.

There are a couple that we technically can generate passing tests for, however, the display is non-desired (for various reasons). For these I have just created a test_broken and linked the relevant issue.

The display of the tests that are marked as passing looks fine:
image
image
image
image
image
image
image
image

@@ -48,68 +50,68 @@ let
(d1,d2,d3,d4,d5,d6), (X1,X2,X3,X4,X5,X6) ⟶ ∅
end

# Latexify.@generate_test latexify(rn)
@test_broken latexify(rn; expand_functions = false) == replace(
Copy link
Member Author

Choose a reason for hiding this comment

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

just a simple error, expand_functions = false tested twice.
(true is the default, so don't really need it in the next one, but specified it anyway)

raw"\begin{align*}
\varnothing &\xrightarrow{\frac{X4^{n1} v1^{2} K1^{n1}}{\left( K1^{n1} + X4^{n1} \right) \left( K1^{n1} + X2^{n1} \right)}} \mathrm{X1} \\
\varnothing &\xrightarrow{\frac{X5 v2}{K2 + X5}} \mathrm{X2} \\
\varnothing &\xrightarrow{\frac{K3 v3}{K3 + X3}} \mathrm{X3} \\
Copy link
Member Author

Choose a reason for hiding this comment

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

This just seemed to be an error, not sure what's up here.

raw"\begin{align*}
\varnothing &\xrightarrow{p} (m + n)\mathrm{X}
\end{align*}
", "\r\n"=>"\n")
Copy link
Member Author

Choose a reason for hiding this comment

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

this just seem to be git getting confused. No tests have been moved (although tabs and empty liens were removed in places, which i presume is causing this).

$", "\r\n"=>"\n")

# Currently latexify doesn't handle SDE systems properly, and they look identical to ode systems (https://github.com/SciML/ModelingToolkit.jl/issues/2782).
@test_broken false
Copy link
Member Author

Choose a reason for hiding this comment

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

SDESystem latex printing is broken.


# Checks for systems with vector species/parameters.
# Technically tests would work, however, the display is non-ideal (https://github.com/SciML/Catalyst.jl/issues/932, https://github.com/JuliaSymbolics/Symbolics.jl/issues/1167).
let
Copy link
Member Author

Choose a reason for hiding this comment

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

New test for vector stuff (don't work right now).

raw"\begin{align*}
\varnothing &\xrightarrow{p} (m + n)\mathrm{X}
\end{align*}
", "\r\n"=>"\n")
Copy link
Member Author

Choose a reason for hiding this comment

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

This test seems to have used the wrong generated stuff? In source we got

let
    rn = @reaction_network begin
        k*Y, Y -->end

    # Latexify.@generate_test latexify(rn)
    @test_broken latexify(rn) == replace(
    raw"\begin{align*}
    \varnothing &\xrightarrow{p} (m + n)\mathrm{X}  
    \end{align*}
    ", "\r\n"=>"\n")
end

\mathrm{X} &\xrightarrow{k r} \varnothing
0 &= -1 - x\left( t \right)
\end{align*}
", "\r\n"=>"\n")
Copy link
Member Author

Choose a reason for hiding this comment

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

While we could generate tests they would point towards LaTeX code we wouldn't want, so I removed it and just marked as something broken.

@TorkelE TorkelE changed the title Fixes latexify tests [v14 - Ready] Fixes latexify tests Jun 10, 2024
@TorkelE TorkelE merged commit 7ac4307 into master Jun 10, 2024
5 of 7 checks passed
@TorkelE TorkelE deleted the fix_latexify_tests branch June 10, 2024 15:31
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