Update the AskSage method.#1399
Conversation
15f5d8f to
d259557
Compare
d259557 to
36b9dbd
Compare
|
I'm following the docker installation instructions. When I get to run the docker container for the first time, I get: This has been going on for a long time, maybe 10 minutes. Certainly more than a few seconds. Does that sound normal? |
|
Generally, that sounds right in terms of what you are seeing. The command completion list build will take a few seconds, but then it will just sit there doing nothing. It is now running. Now to test it set up a server to connect to it using the setting added in openwebwork/webwork2#2951. Usually, you will set up the systemctl service to run this docker container. |
|
When I hit ctrl-C to end, I then see: It seems odd to me that the R command completion list is built after I quit. |
|
That is what happens for me too. So everything you are seeing is normal. I thing that the output that is shown is actually the result of a job that ran earlier, but the output isn't flushed until you hit |
|
In any case, the |
|
This works for me with a minimal problem that uses AskSage. Nice update! Having a local sagecell server running removes a barrier that always kept me from investing in using this. |
|
My server did not already have docker installed. I'm not sure if that requirement should be mentioned in the release notes or not. |
|
Using this is optional, but yes, if you want use it you would need to install docker. It would be worth mentioning in the release notes, and adding optional installation instructions to the installation manual. |
3e34dd3 to
2f61527
Compare
b9df286 to
f86d9bd
Compare
|
I got the docker image up and running. Tested it with a I added the line to I tried the problem on the wiki: https://wiki.openwebwork.org/wiki/Sage_in_WeBWorK and just seeing this:
I must be missing something... |
|
That isn't an Here is an |
|
I went back through and wasn't sure I had the port, but now pointing to localhost:3500 (either using However running the above problem just times out. I turned on debug, but am seeing anything sage related or why it may not be connecting. |
|
Use the command |
|
I'm pretty sure the service is running. Putting |
21f1cfd to
68ce2c8
Compare
The code that is submitted via the AskSage method no longer works with the newer versions of Sage and needs to be updated. Also the public Sage cell server at https://sagecell.sagemath.org/service no longer accepts public code via its `service` endpoint. So make the URL for a sagecell server configurable. Files for building a sagecell server and deploying it via docker have been added in the `fsagecell-docker` directory. Instructions for doing so are in the `sagecell-docker/README.md` file. Remove the `accepted_tos` parameter from the `AskSage` call. Just add the parameter internally, and stop requiring that the author do so. It is a meaningless gesture to force the author to do so. Furthermore, the docker build is set to not require that parameter. Also make it so that the `AskSage` method can be called without passing any arguments, since there are now none that are required.
These are both problems from https://wiki.openwebwork.org/wiki/Problem_Techniques that demonstrate valid and current techniques in problems that were not added before for some reason. Add a `NamedAnswerRules.pg` problem that demonstrates how to use named answer rules to add buttons to the MathQuill toolbar for the named rule. This is an updated version of https://wiki.openwebwork.org/wiki/NamedAnswerRules. With PG 2.21 the way to do so is changing. So this is needed to demonstrate the new way to do it. Add an `AskSage.pl` problem that demonstrates how to use the `AskSage` method to send a request to a Sage cell server. This is an updated version of https://wiki.openwebwork.org/wiki/AskSage. Note that this version of the problem depends on the changes in #1399. Also note that without #1399 there is no hope for the `AskSage` method in general (so lets get that merged).
somiaj
left a comment
There was a problem hiding this comment.
Here is my approval to get this in. I haven't setup docker to test it.
These are both problems from https://wiki.openwebwork.org/wiki/Problem_Techniques that demonstrate valid and current techniques in problems that were not added before for some reason. Add a `NamedAnswerRules.pg` problem that demonstrates how to use named answer rules to add buttons to the MathQuill toolbar for the named rule. This is an updated version of https://wiki.openwebwork.org/wiki/NamedAnswerRules. With PG 2.21 the way to do so is changing. So this is needed to demonstrate the new way to do it. Add an `AskSage.pl` problem that demonstrates how to use the `AskSage` method to send a request to a Sage cell server. This is an updated version of https://wiki.openwebwork.org/wiki/AskSage. Note that this version of the problem depends on the changes in #1399. Also note that without #1399 there is no hope for the `AskSage` method in general (so lets get that merged).

The code that is submitted via the AskSage method no longer works with the newer versions of Sage and needs to be updated.
Also the public Sage cell server at https://sagecell.sagemath.org/service no longer accepts public code via its
serviceendpoint. So make the URL for a sagecell server configurable.Files for building a sagecell server and deploying it via docker have been added in the
sagecell-dockerdirectory. Instructions for doing so are in thesagecell-docker/README.mdfile.Remove the
accepted_tosparameter from theAskSagecall. Just add the parameter internally, and stop requiring that the author do so. It is a meaningless gesture to force the author to do so. Furthermore, the docker build is set to not require that parameter.Also make it so that the
AskSagemethod can be called without passing any arguments, since there are now none that are required.