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

Check the dimensions when making internal parameter connections #899

Merged
merged 6 commits into from
Apr 7, 2022

Conversation

lrennels
Copy link
Collaborator

@lrennels lrennels commented Mar 31, 2022

This PR checks internal parameter connections for dimension mismatches between source variables and destination parameters. Specifically we check that the length of each dimension in the parameter matches the length of the variable dimension in the corresponding position of the dimension list. In the future we can add checking of datatypes but for this PR we will isolate to dimensions and size issues.

TODO:

  • check datatypes or add this to an existing issue/add a new issue
  • decide how we want to handle checking the :time dimension - we will check although we can assume they will match given other time dim checking along the way in Mimi
  • move tests from the wip testing file to main tests
  • run test_all_models.jl

@lrennels lrennels requested a review from davidanthoff March 31, 2022 06:49
@codecov
Copy link

codecov bot commented Mar 31, 2022

Codecov Report

Merging #899 (56e7665) into master (071b4e7) will increase coverage by 0.07%.
The diff coverage is 95.00%.

@@            Coverage Diff             @@
##           master     #899      +/-   ##
==========================================
+ Coverage   84.45%   84.52%   +0.07%     
==========================================
  Files          40       40              
  Lines        3860     3878      +18     
==========================================
+ Hits         3260     3278      +18     
  Misses        600      600              
Flag Coverage Δ
unittests 84.52% <95.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/core/connections.jl 89.80% <94.44%> (+0.35%) ⬆️
src/core/build.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 071b4e7...56e7665. Read the comment docs.

@lrennels lrennels merged commit e13ee1d into master Apr 7, 2022
@lrennels lrennels deleted the check-attributes branch April 7, 2022 05:09
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.

1 participant