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

Simplify API by using simulation structure #64

Merged
merged 7 commits into from
Feb 26, 2025
Merged

Conversation

albangossard
Copy link
Member

@albangossard albangossard commented Feb 24, 2025

  • Simplification of the API by removing useless arguments and keeping only the simulation parameters
  • Fix several inconsistencies in the computation of the average speed
  • Use the save_everystep flag to store results of the forward simulation
  • Add script to generate jld2 files used for the test of make_thickness_video in Sleipnir, cf Improve visualization tools with a video generation Sleipnir.jl#79

@albangossard albangossard changed the title Simplify API by using simulation Simplify API by using simulation + add test of make_thickness_video Feb 24, 2025
@albangossard albangossard changed the title Simplify API by using simulation + add test of make_thickness_video Simplify API by using simulation Feb 25, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@4ae1c05). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #64   +/-   ##
=======================================
  Coverage        ?   89.07%           
=======================================
  Files           ?        9           
  Lines           ?      412           
  Branches        ?        0           
=======================================
  Hits            ?      367           
  Misses          ?       45           
  Partials        ?        0           

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

@albangossard albangossard changed the title Simplify API by using simulation Simplify API by using simulation structure Feb 25, 2025
@albangossard albangossard marked this pull request as ready for review February 25, 2025 15:27
Copy link
Member

@JordiBolibar JordiBolibar left a comment

Choose a reason for hiding this comment

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

Nice clean-up. Just a couple of minor comments. Feel free to merge it afterwards!

Copy link
Member

Choose a reason for hiding this comment

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

This makes me think that @facusapienza21 already created a GitHub action which syncs files among repos. We could potentially use that one to automatically sync these files with Sleipnir, so changes are propagated.

Copy link
Member

Choose a reason for hiding this comment

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

We can open an issue for that and implement it later on, there's no rush :)

Copy link
Member

Choose a reason for hiding this comment

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

Nonetheless, as we discussed, this might be overkill. The plotting test should not be affected by the results of the simulation. In the end, it's just a matrix, so even if the simulation is outdated it should work. The only breaking aspects should come from Sleipnir itself (i.e. changing the structs by adding or removing parameters), and that should be already covered and identified within Sleipnir.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right this is completely overkill. The problem with the plotting test is that to instantiate Results we need an iceflow model which is implemented in Huginn. In order to circumvent this problem I replaced results by H in plot_glacier_vid. In the future we should revert that change once Results can be instantiated without an iceflow model, see #66

@facusapienza21
Copy link
Member

Nice work! Feel free to merge!

@albangossard albangossard merged commit bcbad34 into main Feb 26, 2025
4 checks passed
@albangossard albangossard deleted the simplifyAPI branch February 26, 2025 09:02
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.

4 participants