-
Notifications
You must be signed in to change notification settings - Fork 7
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
2024.2 #34
Conversation
Sadly, |
Do you want to do a second pip install, or simply remove mayavi from the tests? Installing it was also not the only problem I had: getting it to work on Ubuntu required a list of additional packages through apt-get to work... I propose we have the option for people to download it, but do not do anything to test it. |
If it ain't tested (nor used) I think it should be completely removed. We shouldn't propose to use something that is untested, for what-ever reason. |
I have updated spb to |
Otherwise you might want to do conditional dependencies on the |
I think that is the best option in this case. |
I have found a minor issue when changing the quiver to the spb equivalent. As it might affect some demos, I wanted to give a heads-up. Automatic limits for quiver has been a problem before. Changing to spb quiver (vector) will (as far as I can see) solve this problem completely in 2D. However, we will run into problems with 3D quivers because of limits with 3Dpatches in matplotlib (see this and this). The effect in spb is that if no limits are given, it will default to a 3x[0,1] interval (which might not include the vector). I propose a solution similar to this, where a PS. I am still unaware of how this will affect the plotly backend (or any of the other backends), but plotly has behaved significantly better than matplotlib in the past, so I do not think it will be a problem. |
Ok. |
I have not found the 3D quiver in any demos, so there's no need for extra work here. As this does not allow us to show the use of |
I have gotten through what I wanted for this PR, so I will finish it (make it no longer "a draft"). I have listed the possible changes to the demos above. Most of the affected demos are in the spring. However, we still need to consider if we want to install |
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.
Matplotlib has before been a problem, but if your plots works with a broader range of matplotlib versions, that would be nice. :)
"sympy~=1.12", | ||
"matplotlib==3.6.*", |
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.
does it work with older matplotlibs?
Other versions of matplotlib might work. However, as found here, different versions of matplotlib can only be installed on specific versions of python. Matplotlib 3.9.* was chosen as it supports python 3.9-3.12 (the range where we want dtumathtools, and possibly 3.13, when it comes out). Therefore, we can guarantee that all students are running the same matplotlib regardless of python version. As this is also the case for matplotlib 3.8.* (with python 3.13 support being a question mark), we could extend the range to this (eg. matplotlib>=3.8,<3.10). What worries me in extending the range is that some functions and kwargs might change (as far as I am aware) between the versions. Therefore we might have things that work in the demos that do not work for the individual student. As I have not had time to test all the different versions, I cannot say how large this problem is. |
prefix with
It would be very nice if we (pythonsupport) could install everything you need beforehand... |
I guess the matplotlib range is more depending on whether your test suite covers the used arguments in the exercises? And if they work? If so I think you should extend the range a bit (as you suggested), otherwise lets keep it. |
I have updated the matplotlib version range. Unless we have further comments, I think we could merge now. |
This is a draft PR.
(Planned) Changes are listed here:
use_cm=True
kwarg fails in spb==2.4.3."$xyz_{abc}$"
) and written simply as a string (eg."xyz_{abc}"
).When testing for the success of this update, few errors/mistakes etc have been found in the demos. Also, the changes caused by this update can affect some demos. The known things that need to be changed in the demos after this update (before the semester) are:
lamb = symbols('\lambda')
causes SyntaxWarning: invalid escape sequence '\l'K(3).nullspace()
causes TypeError: 'MutableDenseMatrix' object is not callableplot(...)
(directly calling function fromsympy
) instead ofdtuplot.plot(...)
. I suggest staying consistent and staying indtuplot
.pip install dtumathtools
. This should be updated to reflect the backend and version (for instancepip install dtumathtools[qt]==2024.2
)p.xlim
andp.ylim
are given. This is discussed here and the previous solution is given here. However, the new quiver updates has solved this problem. Therefore, we do not need the limits at all here!dtuplot.plot_implicit(...)
functions give a warning. Can be worked around by setting the kwargadaptive=True
.numpy
(which is already done in dtumathtools) andscipy
! Should we addscipy
as a requirement to avoid having this as part of a demo?