Skip to content

Update the AskSage method.#1399

Open
drgrice1 wants to merge 1 commit into
openwebwork:PG-2.21from
drgrice1:asksage-update
Open

Update the AskSage method.#1399
drgrice1 wants to merge 1 commit into
openwebwork:PG-2.21from
drgrice1:asksage-update

Conversation

@drgrice1
Copy link
Copy Markdown
Member

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.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

I'm following the docker installation instructions. When I get to run the docker container for the first time, I get:

Building Maxima command completion list (this takes
a few seconds only the first time you do it).
To force rebuild later, delete /home/sage/.sage//maxima_commandlist_cache.sobj.

This has been going on for a long time, maybe 10 minutes. Certainly more than a few seconds. Does that sound normal?

@drgrice1
Copy link
Copy Markdown
Member Author

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.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

When I hit ctrl-C to end, I then see:

^C
Done!

Building R command completion list (this takes
a few seconds only the first time you do it).
To force rebuild later, delete /home/sage/.sage//r_commandlist.sobj.

It seems odd to me that the R command completion list is built after I quit.

@drgrice1
Copy link
Copy Markdown
Member Author

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 Ctrl-C.

@drgrice1
Copy link
Copy Markdown
Member Author

In any case, the AskSage problems work with this.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

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.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

My server did not already have docker installed. I'm not sure if that requirement should be mentioned in the release notes or not.

@drgrice1
Copy link
Copy Markdown
Member Author

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants