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

Fixed Makie error in interactive_orbitdiagram #239

Merged
merged 8 commits into from
May 26, 2024

Conversation

jonathanfischer97
Copy link
Contributor

I fixed the Makie.Layout error I raised in #237 by removing that qualifier from the deactivate_interaction! call.

Other changes that can be ommitted upon review

  • I removed some display(figure) calls because they seemed unnecessary and aren't shared by the other interactive plotting scripts.
  • I preallocated the Vector{Point2f} in the first minimal_normalized_od method because the length is known at compile time (the other method has conditional push so left it as is)
  • Finally, I added a testset and a test for calling this plotting function. Not sure if you guys don't use a Test.jl based CI for a reason or was just never implemented. The test fails with an error with the prior code but passes now.

@jonathanfischer97 jonathanfischer97 changed the title Fixed Makie error in interactive_orbitdiagram #237 Fixed Makie error in interactive_orbitdiagram May 24, 2024
Copy link
Member

@Datseris Datseris left a comment

Choose a reason for hiding this comment

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

Thank you @jonathanfischer97 . The reason there are no tests here is because in the past DynamicalSystems.jl had no source code. It simple re-exported all other packages of the library. However, recently I decided to move here all GUI related code. However, that code never had tests because I didn't know exactly what or how to test plotting code.

Adding tests is of course an important and great improvement, so thank you for doing that. I left some comments to improve the tests.

If by any chance you have some spare time, adding the same test fig = gui_function(); @test fig isa Makie.figure() to all GUI applications would be a great addition to the library.

Furthermore, can you please increase patch version number in Project.toml?

Project.toml Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
Copy link
Member

@Datseris Datseris left a comment

Choose a reason for hiding this comment

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

no reason to leave commented code in

ext/src/orbitdiagram.jl Outdated Show resolved Hide resolved
ext/src/orbitdiagram.jl Outdated Show resolved Hide resolved
ext/src/orbitdiagram.jl Outdated Show resolved Hide resolved
ext/src/orbitdiagram.jl Outdated Show resolved Hide resolved
@Datseris Datseris merged commit 2912cf3 into JuliaDynamics:main May 26, 2024
2 checks passed
@jonathanfischer97
Copy link
Contributor Author

No problem, happy to help! I'll add more tests as I explore more of the visualization methods!

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.

None yet

2 participants