-
Notifications
You must be signed in to change notification settings - Fork 35
New syntax in defcomp for datum type parameterization #638
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
The tests for this PR are failing because it changes functionality that FUND relies on. (This changes the syntax from We had removed the model dependency tests out of the normal tests required to merge PRs for exactly this reason, so that we can actually make breaking changes to Mimi master that might break the dependent models, with the intention that we would clean up the models once we are ready to release a new version of Mimi. I guess we forgot that our tutorials use the models as well. |
Ah interesting yea it's another one of these circular problems. I guess this should be fairly rare since it will happen only with breaking changes, but there are a few of those for v1.0.0. We could remove the doctest for now, since I don't think we want to allow failing tests to be merged. We could also move doctests outside of the main testing suite, but that seems a bit dangerous to me because we'd have to make sure to double check those whenever we push to master and I'd prefer them be in the main testing suite. I assume we'll change FUND quickly too, since the testing of our dependencies will break, so it's a temporary issue, @davidanthoff do you have a preference for how we handle this? |
Can we change the PR such that the old syntax is also still supported, with a deprecation warning? |
Yes, that would work. I can make it just a warning for now, and then change it to breaking for v1.0. |
@lrennels you are on it! I just went to add this to the issue with the list of deprecations-to-errors for v1.0 and you beat me to it! thanks! |
Codecov Report
@@ Coverage Diff @@
## master #638 +/- ##
=======================================
Coverage 80.21% 80.21%
=======================================
Files 39 39
Lines 2745 2745
=======================================
Hits 2202 2202
Misses 543 543
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ckingdon95 looks good nice job getting into the weeds of macros I'm impressed! Did you check if there was any documentation we needed to change? I'm guessing yes since I saw you edited the tutorials but we should double check the docs too.
@lrennels good catch! I did actually miss one spot in the docs, I just fixed that. This makes me realize, though, that we never actually fully explain the different type parameterization options in the docs, and we probably should. I'll try to add something later today, probably just to the user guide! |
@lrennels I just added a new section under Advanced Topics in the userguide, but I feel like I didn't do a great job explaining it. If you have any suggestions for better wording or examples let me know! |
[Some of the CI tests on this PR will still fail, and we'll need to wait for the other PR that fixes them before we can merge this one]
This PR implements the new syntax for datum type parameterization in
@defcomp
, and errors when a user tries to use the old syntax. Do we want it to just be a deprecation warning instead of an error?Addresses issue #473