ODE Refactoring

51 views
Skip to first unread message

Marco Antônio Habitzreuter

unread,
Mar 16, 2021, 5:10:51 AM3/16/21
to sympy
Hello folks. I hope you and your families are doing well.

I'm a physics undergraduate in my final semester. I have been using Sympy for the last 6 months or so, after having some good experiences with Numpy to analyze experimental data. Before that, most of my coding was in C. It has been an extremely useful tool and my undergraduate final thesis would not be possible without it. Thank you for this amazing work!

With the intent to give back to the community, I looked at the open issues to see if there was something on which I could work. This caught my attention: https://github.com/sympy/sympy/issues/18348. There is a PR refactoring the code for exact ODEs which seems abandoned at https://github.com/sympy/sympy/pull/18887. Would it be okay if I tried to finish it?

Marco.

Oscar Benjamin

unread,
Mar 16, 2021, 5:43:36 AM3/16/21
to sympy
Yes please!

When continuing an existing PR by another author it is important to
keep the note of who wrote what intact in the git commits. I would
checkout the branch of the other contributor and rebase it to master
and then add my own commits on top. Potentially though it is easier
just to manually copy the diff and make a commit that uses
Co-authored-by to reference the original author:

https://stackoverflow.com/questions/7442112/how-to-attribute-a-single-commit-to-multiple-developers


Oscar

Marco Antônio Habitzreuter

unread,
Mar 17, 2021, 12:22:24 AM3/17/21
to sy...@googlegroups.com
Oscar,

> When continuing an existing PR by another author it is important to
> keep the note of who wrote what intact in the git commits. I would
> checkout the branch of the other contributor and rebase it to master
> and then add my own commits on top.

I was able to rebase and get that code working in my fork.

About the NotImplementedError you discussed about [0]: if I understand
corretly, it was added in [1] to solve [2] due to the lack of derivative at a
point as open in [3]. The workaround was necessary because the doctest for
ode_1st_homogeneous_coeff_subs_dep_div_indep was failing.

Weirdly, I removed the try/except from master and the doctest passed.
Maybe something changed along the way which made this unnecessary? I couldn't
think of an example where the try/except would be required.

[0] https://github.com/sympy/sympy/pull/18887#discussion_r399648142
[1] https://github.com/sympy/sympy/pull/278/
[2] https://github.com/sympy/sympy/issues/4624
[3] https://github.com/sympy/sympy/issues/4719

mohit balwani

unread,
Mar 17, 2021, 12:38:44 PM3/17/21
to sy...@googlegroups.com
Hello Marco,
sorry, I didn't notice your first email earlier and I am also working to take over the same PR.
Although for now I didn't make much changes, if you are working on this PR, do let me know so that I can start refactoring other solvers.

Thanks,
Mohit.

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CACTqkX2ixk9QZA4T%3DvVC%3DQ0-RPbqWnrKW8L5BYZi26-geXEDUA%40mail.gmail.com.

Marco Antônio Habitzreuter

unread,
Mar 17, 2021, 3:27:21 PM3/17/21
to sy...@googlegroups.com
Hi.

> Although for now I didn't make much changes, if you are working on this PR, do let me know so that I can start refactoring other solvers.

Yes, I'm working on it. I began with the code made by the other author and now
I'm trying to address Oscar's suggestions made in the original PR about the
exception and the use of simplify().

Best regards,
Marco.
Reply all
Reply to author
Forward
0 new messages