-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
build/pkgs/mathics
: Reduce to a pip package
#37395
Conversation
e2e4928
to
a306c52
Compare
a306c52
to
1b10245
Compare
Documentation preview for this PR (built with commit 5ba18ea; changes) is ready! 🎉 |
e2dc845
to
96a8d8f
Compare
With the current branch,
|
I looked at https://github.com/sagemath/sage/actions/runs/9291389646/job/25570382749?pr=37395 and do not see how this:
Is it? |
The failure in that GH Actions workflow is unrelated, I think. Here's a backtrace from local testing:
|
It looks like |
My gues is, just after this line: sage/src/sage/interfaces/mathics.py Line 517 in 77323e2
we need to add
in a way that when the session is created, the builtins be already loaded. |
Yes, I was going mention that too. Let me explain. The interface has changed, and while it is not ideal it is what it is for now. WMA has a ton of builtin functions and a longer-term project is to be able to control how collections of builtins get loaded. Previously, Mathics3 builtin functions got loaded as a batch process as a result of importing the the mathics.builtins module. (The specific order of what gets loaded when or at what point in the loading this kicked in was undetermined and probably varied as the code changed). So that we can control things better, now you need that explicit call, We've talked about adding that call somewhere reasonable. Things haven't shaken out though yet in my opinion because all of this is a bit up in the air until we get farther down the line in terms of being able to load sets of builtins on lazily at a finer level. (I think of this analogous to GNU emacs "autoload" |
Thanks a lot! This gets me at least one step further:
|
I think we're running into an incompatibility with the (outdated...) Sage backend of mpmath |
What about if you evaluate |
|
|
|
This looks like something that we have to sort out in Sage first (unless there's a way in Mathics to disable the use of mpmath somehow).
|
I'm sorry I didn't notice this PR sooner and thanks for your efforts in getting this interface back up and running! I'll see how I can help with that in the next days and weeks. |
3180c08
to
36cc26d
Compare
@soehms Thanks! I think a question would be if there's something we should do for the upcoming Sage 10.4 release. If you agree with my impression that the current packages in the Sage distribution for mathics do not work at all, should we be merging the present PR as is, which at least makes it "hackable" for developers? |
The root of the problem seems to be the SAGE builtin version of mpmath. In particular, the lack of the |
I think that adding to this class sage/src/sage/libs/mpmath/ext_main.pyx Line 1649 in e5f42fa
something like this method
it would fix the crash. |
@soehms I meant to respond to this a while ago... Set Environment variable |
Thanks! I'll see how to adjust the Sage code tomorrow. What about the other question?
|
The current master branch addresses this - converts to using toml for packaging. In fact, I think @mkoeppe made the change! A 7.0.0 release of everything is a little overdue, but until then use the master branch in git. |
I did change the metadata format, but that's unrelated to the use of |
@mkoeppe I made a relative PR mkoeppe#45 for this. |
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.
After the two linter fixes it looks good to me!
Co-authored-by: Sebastian Oehms <[email protected]>
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, it should not remove the whole line. Just the whitespaces in it! However, lets get it in!
Co-authored-by: Sebastian Oehms <[email protected]>
Thanks. |
Our Mathics package is outdated (and also the interface shows test failures in CI - e.g. in https://github.com/sagemath/sage/actions/runs/7894201915/job/21638423818#step:14:3279)
Trying to update Mathics reveals more dependencies, include scikit-image and llvm-lite.
Here we reduce it to a "pip" package to simplify maintenance of the package on our side.
The latest released version 6.0.4 fails to install in Sage because of rigid version constraints.
We are using the current HEAD version (7.0.0dev), which includes
setup.py
: Buildop-tables.json
as part of "build_py" Mathics3/mathics-core#1034📝 Checklist
⌛ Dependencies