-
Notifications
You must be signed in to change notification settings - Fork 154
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
We now allow src/build_function to take NamedTuples as a datastructure for building a function #929
We now allow src/build_function to take NamedTuples as a datastructure for building a function #929
Conversation
…e for the building a function
Can you add a test? |
Yes. Do they need to be as thorough as the ones in |
Hi all, I have had some busy days and did not have time yet to include the tests. Please correct me if I am wrong, but the build error is not related to my PR, right? |
…n_arrayofarray.jl but the numeric inputs as well as the symbolic inputs are NamedTuples. I verified that without the change in build_function in this PR, these tests all fail.
@ChrisRackauckas I just included the tests that you asked me to. They are an exact copy of the test for |
@@ -0,0 +1,197 @@ | |||
using Symbolics, Test, SparseArrays |
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.
this file isn't in runtests.jl so it's not tested.
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.
Sorry, I forgot about that. Just did it.
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #929 +/- ##
=======================================
Coverage 77.47% 77.47%
=======================================
Files 26 26
Lines 3329 3329
=======================================
Hits 2579 2579
Misses 750 750
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
d0b1724
into
JuliaSymbolics:master
This is a simple addition to
build_function
that dramatically increases its versatility. Here is a small example:code_fun
is:This is useful because the built function uses the "." to access the elements of the input, for instance
_-arg1.x
. So we can pass to the built function any datastructure where the elements are accessed using ".", which obviously includes NamedTuples, but also structs and ComponentArrays.