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

Add CLIMAParameters package extension #68

Merged
merged 2 commits into from
Jan 18, 2024
Merged

Add CLIMAParameters package extension #68

merged 2 commits into from
Jan 18, 2024

Conversation

nefrathenrici
Copy link
Member

This PR adds a package extension which includes convenience constructors for InsolationParameters when CLIMAParameters is loaded.

The constructors are:

  • InsolationParameters(FT, overrides = NamedTuple())
  • InsolationParameters(toml_dict, overrides = NamedTuple())

The overrides are only provided for testing.

The core changes are in ext/CreateParametersExt.jl and Project.toml, but I have updated all of the tests and docs to work with the new constructors.

Package extensions require Julia 1.9+, so for backwards compatibility CLIMAParameters will need to be a dependency or we will need to use Requires.jl.

This PR also updates to the latest version of CLIMAParameters and uses the new parameter retrieval system.

I also caught some extra files when formatting - it would be good to add a formatting action in another PR.

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1058ad8) 98.96% compared to head (3f337dd) 99.04%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   98.96%   99.04%   +0.07%     
==========================================
  Files           4        5       +1     
  Lines          97      105       +8     
==========================================
+ Hits           96      104       +8     
  Misses          1        1              

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

@charleskawczynski charleskawczynski merged commit e2ad0ba into main Jan 18, 2024
14 checks passed
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