-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Interface to runsnake and import_statements #11287
Comments
Attachment: runsnake-screenshot.png Screen shot of runsnake in action |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:4
As I use very very heavily runsnake this last mouth, I try your patch as soon as I received the corresponding mail. Applying the patch (toward the combinat queue), runsnake works well on my machine in sage. (I had to remove my old runsnake function in .sage/init.sage and re-install RunSankeRun vis easy-install). Ubuntu 04-11 32bits on a MacBook4,1. Not a review, just a test and some info... +1 to get the feature in Sage! |
comment:5
Runsnake Can you give at least a slight hint how to use runsnake? I used easy_install inside a Sage shell, but apparently something (wxPython?) is missing. I thought easy_install is supposed to take care of dependencies. Also, I think you should give examples how to use the profiler from within Sage. From runsnake's documentation, I guess one does something like
but what afterwards? Does one need to leave Sage, start a Sage shell, and then open Can one use it without leaving Sage? import_statements That tool seems useful. I doubt, however, that it is robust enough. I see that you ask for the
Worse, the
That import statement yields a syntax error. Also, I recall that sometimes the I would recommend to use the tools from sage.misc.sageinspect, but only after applying #9976, which considerably extends the capabilities of finding source files (here: sage/rings/polynomial/multi_polynomial_libsingular.pyx), from which one can deduce the import statement. I am not sure if this is enough to make it "needs work", though. Cheers, |
Changed reviewer from Franco Saliola to Franco Saliola, Simon King |
comment:6
Hello! I just posted a reviewer's patch that addresses some documentation Note that this patch depends on #11251, since you are using the new todo I am willing to give this a positive review, provided my changes are Let me try to address Simon's comments: Replying to @simon-king-jena:
There is an example on how to use it provided in the
The expected behaviour is that a window pops up (see the screenshot).
Yes. One needs only run the function in the example above. This function
Agreed. It looks very nice.
This issue is documented in a "todo" block, but this todo block does not
Perhaps this might be a good idea and can address the issue that the |
Changed keywords from runsnake, prun, profiling to runsnake, prun, profiling, days30 |
comment:8
Replying to @saliola:
Positive review on your review patch, assuming the buildbot goes green.
If you know how to improve this on top of your head, please go ahead! Cheers, |
comment:9
I thought that the improvements to sageinspect from #9976 would make things robust enough, so that sage_getfile could be used to extract the information on where to import stuff from. But with or without #9976, we have
The "Error getting source: could not find class definition" is annoying. Note that the doc string above gives the correct location and line number! So, sage.misc._extract_embedded_position should be able to do the job, but it isn't. I think improving the introspection further should be on a different ticket, on top of #9976. Cheers, |
comment:10
I just opened #11298 (ready for review). With it, we obtain:
It should be easy to extract the module name from the file name (here: Cheers, |
comment:11
Ubuntu/Debian
|
comment:12
Replying to @rbeezer: Ubuntu/Debian
|
comment:13
Replying to @rbeezer:
OK, but my personal problem is that I am not root for the computer in my office. So, installing an Ubuntu package seems non-trivial to me. I tried installing wxpython from sources and also tried the experimental wxpython spkg. In both cases, the problem was that gtk+ has not been found, although it is globally installed. The sysadmin tries to help me, but I don't know if it will work eventually. |
comment:14
Could it be that the Sage shell messes up? Namely, I downloaded Best regards, |
comment:15
Replying to @simon-king-jena:
I meant to write "Sage shell". |
comment:16
Unfortunately, after doing easy_install RunSnakeRun, things still do not work for me:
I did not do |
comment:17
PS: If I leave sage, but remain in a sage shell, and try |
comment:18
Hi, I pushed a review concerning two minor things I ran into: on the sage command line, spaces do not cause trouble, but the profiler doesn't like them:
Now, spaces are deleted (or does anyone see problems occurring from that?). The second is that sage accepts "^", while python doesn't, so these are replaced by "**".
You can fold the changes if you like, or remove them otherwise... Btw: the patch doesn't apply on a plain 4.6.2. Best, Christian |
comment:19
Replying to @stumpc5:
What about calling the Sage preparser, instead? |
comment:20
Thanks Christian for your improvements. Replying to @simon-king-jena:
+1. Christian: I won't be able to work on this before a couple day. Could you give it a shot? Also, I would tend to only strip spaces before and after the command; otherwise, one might inadvertently screw up spaces in an embedded string. Cheers, |
comment:21
MacOS users (Anne!): The runsnake run author was kind enough to add a workaround in runsnake to make it work out of the box on MacOS. He would like to get it tested. Could you try out the attached devel version of runsnake, and see if:
does the job for you? Anne: you may want to first remove the current runsnake scripts from your machine; if I recall correctly, they are in /usr/local/bin/runsnake and runsnake32bit. |
comment:34
Note that my patch also removes a line of documentation: the |
comment:35
Replying to @saliola:
Thanks for the fix. I folded your patch, and am about to set a positive review. Thanks everybody! |
comment:36
Please change the commit message of the patch. |
Attachment: trac_11287-runsnake-nt.patch.gz |
Changed dependencies from #11108 to none |
comment:38
There is a problem with the documentation:
|
Dependencies: #11251 |
comment:39
Replying to @jdemeyer:
Ah shoot. This directive is implemented by #11251 which needs review. Ok, I added this in the dependency list, and am going to ping #11251. Thanks for the report ... |
Merged: sage-4.7.2.alpha0 |
This patch adds two developper tools in sage.misc.dev_tools:
An interface to the graphical profiler
runsnake
.See e.g. the attached image which shows a graphical profile
of listing all the elements of SymmetricGroup(3), and highlights
the current GAP interface issue with select on certain linux
kernels. See also Interface to Gprof2Dot #11291.
A function import_statements:
To achieve this, it also extracts a function get_main_globals out of inject_variables.
Apply: attachment: trac_11287-runsnake-nt.patch
Depends on #11251
CC: @sagetrac-sage-combinat @saliola @anneschilling @novoselt
Component: performance
Keywords: runsnake, prun, profiling, days30
Author: Nicolas M. Thiéry
Reviewer: Franco Saliola, Simon King, Christian Stump
Merged: sage-4.7.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/11287
The text was updated successfully, but these errors were encountered: