-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
environment variable SAGE_SPKG_INSTALL_DOCS to build and install spkg docs #10823
Comments
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:6
CCing our resident shell script expert for comments: David, is there anything else that should be done in the above snippet of shell script? |
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:10
Replying to @jasongrout:
I would indent the
for clarity. Apart from that, it looks OK. It will put the docs in a directory
not
but I think that's a good idea, as some docs might be in pdf, others in html etc. I think it would be more normal to copy the files, rather than move them, so the build directory remains intact. (It usually gets deleted anyway, but there are ways of saving the contents). Overall, I think this is a good proposal. Lots of programs used by Sage have documentation which we don't use. There may be other tools needed to generate some of the files - (GNU info for example). In cases like that, it might be worth checking if the right tool existed. |
comment:11
PS, Then each .spkg with the changes would need to be on separate tickets. |
This comment has been minimized.
This comment has been minimized.
comment:14
Okay, the doc patches are up here and the description notes which tickets are for the spkgs that I put up earlier. |
This comment has been minimized.
This comment has been minimized.
Author: Jason Grout |
comment:16
Okay, that's it for now, so feel free to review this and the spkgs noted in the description! |
comment:17
Sorry for the delay. I spent about an hour replying to this yesterday when my wife accidentally pulled the power cord from my laptop, which did not have a battery in it at the time. So it was all lost. From what I recall
Clearly adding the code to the packages is quite simple, but unless it is well documented it's not going to be much use. People must be able to find the documentation, which I think will be most easily done if on the main page http://www.sagemath.org/doc/ Have you given thought to what is to be done if one can build both HTML and PDF docs? I suggesting building both might be best, but I don't know. Overall though, I think this is a good idea. Dave |
Reviewer: David Kirkby |
comment:19
Replying to @sagetrac-drkirkby:
I meant to say there was a $ sign missing. So it should be
Dave |
comment:20
Replying to @sagetrac-drkirkby:
Thanks very much for your time and thoughtful care in reviewing this (twice, even!)
You're right that I just put example instructions up there. Instead, I'll just put a comment (I've modified the description accordingly).
Okay, though it's not really in the direct scope of this ticket, since I'm modifying the file anyway, I'll throw this in too.
Do you happen to know what file this is generated from? I'd also consider this a separate ticket, since there are questions about how to deal with this on sagemath.org, and the fact that the link probably ought not be there if we don't generate the docs, maybe.
Fix coming up.
I didn't put the $ since $SPKG_NAME is not a variable that works in the spkg-install file. My hope was to help them realize that they needed to manually fill in SPKG_NAME. I'll put a note to that effect.
Personally, in the spkgs I modified, I just built the html documentation unless the default package documentation-building command built pdf too (I believe pari was that way). I think both might be best, but having just html documentation built requires less (latex is not required, IIRC).
Thanks! |
comment:21
Replying to @jasongrout:
This is now #10853
Done.
PACKAGE_NAME is used quite a bit in other places in that file, so I used that. That is understood in that file to be a placeholder to be replaced for a specific package. |
comment:22
Things should be ready for review... |
comment:26
Replying to @sagetrac-drkirkby:
Sorry for the spam - I guess I didn't realize this would be an optional variable! |
Attachment: trac-10823-doc.patch.gz |
comment:27
Okay, I attached a new patch which should take care of all of David's concerns. Thanks for the careful review! |
comment:28
This is fine, so positive review. I'll look to review the individual packages that make use of the environment variable, but for now at least it is properly documented in both the Installation and Developer guides. |
comment:29
I'm putting this back to needs_work, as I realised after looking at a revised Matplotlib package (#10828) that simply copying the "docs" directory might in some cases copy a lot of unnecessary files. The spkg-install should tell developers to remove unnecessary files from $SAGE_ROOT/local/share/doc/SPKG_NAME. Again this will depend on the package, but something like:
should get rid of the .py files for example. Dave |
Attachment: trac-10823-doc-2.patch.gz apply on top of previous patches |
comment:30
I added a further note to the documentation. |
comment:31
That's fine. |
Merged: sage-4.7.alpha1 |
comment:34
See #11197 for a follow-up ticket for implementing building docs after Sage is built. |
There are lots of times when it would be convenient to have the documentation of various spkgs installed in a local or system Sage installation. For example, it seems that I'm always wishing that I had that at an airport or on an airplane. At one point a long time ago, we had an extradocs spkg, but it was never maintained. So here is a proposal:
When building an spkg, if the SAGE_SPKG_INSTALL_DOCS environment variable is yes, then the docs are built (if available in the spkg) and are installed in $SAGE_ROOT/local/share/doc//
For example, numpy includes the docs with the sources. I'd like to insert the following at the bottom of the numpy spkg-install:
This builds the numpy docs and makes a directory $SAGE_ROOT/local/share/doc/numpy/html/ that contains the standalone html documentation for numpy.
Here are a few updated spkgs:
CC: @sagetrac-drkirkby @kcrisman
Component: packages: standard
Author: Jason Grout
Reviewer: David Kirkby
Merged: sage-4.7.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/10823
The text was updated successfully, but these errors were encountered: