doubt regarding test files

148 views
Skip to first unread message

Vedarth Sharma

unread,
Mar 20, 2017, 11:15:34 AM3/20/17
to sympy
I noticed that some files like matexpr.py do not have their test files. So I was wondering why is that so? And how are we supposed to run tests on them?

Aaron Meurer

unread,
Mar 20, 2017, 2:18:05 PM3/20/17
to sy...@googlegroups.com
Some files don't have tests, but more likely is that the tests are in
another file. In this case, it looks like there is
test_matrix_exprs.py.

In general, if you make a change to a file in a submodule, like
sympy.matrices, I would recommend running the tests for the whole
submodule, and any other submodules that are affected by that
submodule, to be sure that nothing is broken. matexpr.py contains the
common code for all the matrix expressions module, so if you make a
change to it you need to run all the matrix expressions tests.

To be really sure, you have to run the whole test suite, but that
takes a while and Travis does it anyway, so it's generally not
necessary to do it locally unless you really want to be sure, or if
your change is to the core.

Also don't forget the code quality tests (./bin/test quality) and the
doctests (./bin/doctest).

Aaron Meurer
> --
> 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 post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/f96897dc-a63f-423f-8ed5-167a46f02b37%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Vedarth Sharma

unread,
Mar 20, 2017, 3:50:15 PM3/20/17
to sympy
That was really helpful. Thanks a lot. I made a change to matexpr and was really unsure should i submit a pull request or not because i just couldn't run tests on it. Btw shouldn't the test file follow the same naming convention and same location convention as mentioned in sympy wiki? Another quick doubt, I was thinking about applying for gsoc 17 through sympy. According to gsoc description sympy has a patch requirement. Does that mean getting a pull request merged? I am sorry if this question is too "beginner" level, I am new to development, made a switch from competitive to development, but I think I am still in love with maths and python.Thanks in advance.

Aaron Meurer

unread,
Mar 20, 2017, 4:49:50 PM3/20/17
to sy...@googlegroups.com
Yes, I don't know why that file isn't called test_matexpr.py. We
should change it.

As for the patch requirement, yes, it means getting a pull request
submitted by the application deadline (April 3), and merged soon
thereafter. We a little lax on the actual merging deadline, because we
know that reviews can be backlogged, but the pull request does need to
be merged for the patch requirement to be fulfilled.

Aaron Meurer
> --
> 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 post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/61197882-1541-42c4-9372-773bd5c4cc00%40googlegroups.com.

Vedarth Sharma

unread,
Mar 21, 2017, 10:42:55 PM3/21/17
to sympy
I would like to submit a patch with changed name of file. Should I just change the name of file or something more is required. Where else do i need to make this modification? Right now sympy.test() doesn't work on matexpr.

Aaron Meurer

unread,
Mar 22, 2017, 4:32:37 PM3/22/17
to sy...@googlegroups.com
Just changing the name should work. None of the tests are referenced
anywhere else in the code, and all the tests are gathered by the test
runner automatically.

Be sure to use 'git mv' to change the filename, so that git properly
removes the old file and adds the new one.

Aaron Meurer

On Tue, Mar 21, 2017 at 10:42 PM, Vedarth Sharma
<vedarth...@gmail.com> wrote:
> I would like to submit a patch with changed name of file. Should I just change the name of file or something more is required. Where else do i need to make this modification? Right now sympy.test() doesn't work on matexpr.
>
> --
> 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 post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/769ce692-ae87-4254-b9c7-cc48854a4aa3%40googlegroups.com.

Vedarth Sharma

unread,
Mar 24, 2017, 2:58:21 AM3/24/17
to sympy
Done. And it got merged as well :). Does that fulfill my patch requirement or do i need to submit a pull request related to my proposal as well?

Aaron Meurer

unread,
Mar 24, 2017, 3:34:17 AM3/24/17
to sy...@googlegroups.com
It does technically fulfill the requirement, but I would suggest doing
something more to make your proposal stronger.

Aaron Meurer

On Fri, Mar 24, 2017 at 2:58 AM, Vedarth Sharma
<vedarth...@gmail.com> wrote:
> Done. And it got merged as well :). Does that fulfill my patch requirement or do i need to submit a pull request related to my proposal as well?
>
> --
> 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 post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/f01314d0-345e-4dbe-90e4-12861ad182ff%40googlegroups.com.

Vedarth Sharma

unread,
Mar 24, 2017, 1:21:04 PM3/24/17
to sympy
Definitely. I will contribute more frequently and try to solve more significant issues. I have been going through sympy's code base and issue tracker for past 3 months, but wasn't able to make any significant contribution because I was busy with my exams (and some other stuff). But now I'll be more active. I hope I'll get the chance to do project with you guys.
P.S. Can you give me any tips on what "more" is required to make my proposal stronger?
Thanks a lot for your help.

Aaron Meurer

unread,
Mar 24, 2017, 4:56:06 PM3/24/17
to sy...@googlegroups.com
Doing a pull request that is related to your proposal is always a good
idea, if you are unsure what else to do.

Aaron Meurer
> --
> 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 post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/d73b17f2-f151-46c1-8c6e-b2b57be4f926%40googlegroups.com.

Vedarth Sharma

unread,
Mar 29, 2017, 11:31:19 AM3/29/17
to sympy
Can my project proposal involve fixing a module i.e. fixing bugs? I mean obviously organizing it and rewriting it properly of course. Is it allowed? Or should I do something more?

Aaron Meurer

unread,
Mar 29, 2017, 2:02:48 PM3/29/17
to sy...@googlegroups.com
Bugfix only projects are allowed, although we have never had one
before. You just need to make sure that your proposal is clear enough
on what you plan to do, so that it is possible to do the evaluations.

Aaron Meurer
> --
> 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 post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/d4fc5d06-6685-4ebf-8904-cc422ec4745d%40googlegroups.com.

Vedarth Sharma

unread,
Mar 29, 2017, 2:22:59 PM3/29/17
to sympy
I will submit the draft to you in about 2 hours. Kindly review it and give your feedback.
Thanks for your help.

Vedarth Sharma

unread,
Mar 29, 2017, 5:48:45 PM3/29/17
to sympy
https://github.com/sympy/sympy/wiki/GSoC-2017-Application-Vedarth-Sharma-:-Rewriting-the-Matrices-module-to-make-matrices-in-Sympy-faster-and-more-usable.
kindly give me some feedback. I would really appreciate it. I know it is not perfect but it is just a draft right now. Should I submit it to google's website now or after editing it?

Aaron Meurer

unread,
Mar 29, 2017, 6:59:34 PM3/29/17
to sy...@googlegroups.com
You can submit a draft to Google's website, but make sure to also
submit a final version before the deadline.

It would help to clean up the formatting, especially for the timeline.
You can look at other proposals to see how people are doing it.

Beyond that, the proposal could use some more details on what you plan
to implement.

Aaron Meurer
> --
> 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 post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/038c5e3e-8840-4be7-aa6a-7ed7161578f7%40googlegroups.com.

Vedarth Sharma

unread,
Mar 29, 2017, 10:43:42 PM3/29/17
to sympy
What about the basic idea? Is it too much or too less or the right amount? Also, my basic idea is rewriting a module. How am i supposed to show implementation part?

Vedarth Sharma

unread,
Mar 30, 2017, 2:34:39 AM3/30/17
to sympy
One more thing, should I debug and implement new algorithms first or refactor the module first?
Reply all
Reply to author
Forward
0 new messages