-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Use sphinx.ext.extlinks to add Sphinx roles for links to external package docs #27495
Comments
Branch: u/dimpase/doc/docrefs |
Commit: |
This comment has been minimized.
This comment has been minimized.
Author: Dima Pasechnik |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:3
I don't know why it has taken so long to get started with this, to link together all these loose spkg docs in SAGE_LOCAL - something one might not even notice otherwise. At least now SageNB docs are nicely linked - and available as HTML, in particular this will be there on the website, I suppose. Let's get it in quickly, and add more on a followup ticket. |
comment:4
Nice intentions I guess. From the point of view of sage in isolation it looks ok. I don't use configure in sage-on-gentoo, so I would rather want something that applies from |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
It seems to be a tall order to harmonise naming schemes and locations for docs of all the Sage packages. I'd rather take what each package provides and in spkg-configure.m4 record this location into a variable (perhaps if the package is not built, but a system version used, then no doc link needs to be generated at all). Another important reason for having this is that authors of external packages sometimes are annoyed by Sage incorporating their work silently. This showing/linking of docs will make it less silent... |
comment:7
As fbissey said, what about doing this with Python instead of Or if it's just |
comment:8
Replying to @jhpalmieri:
Why? What's wrong with doing it at configuration time? Mind you, Python does not have tools for this, autoconf does, as you see.
|
comment:9
Replying to @dimpase:
That, you see, is the result of conflating "sage the distribution" with "sage the software". A confusion made easier by the fact that sage the software is not distributed as a proper package like the rest of its dependencies. The top configure is really mostly for sage the distribution and mingling the top level configure to stuff in sage the software means that you are not wanting sage the software to be pip installable ever.
Yes I am aware that what you are thinking of is easy with autotools but not trivial with python. But sometimes doing the easy stuff is just painting yourself in a corner in the long run. |
comment:10
We don't have a special manual for Sage the software (sagelib), only for Sage the distro. This ticket makes no attempt to change this situation, it merely improves the existing reference manual, in particular corrects the fact that SageNB docs are no longer available on One would surely welcome an effort to partition the docs between sagelib and Sage the distro, but arguably a large part of the top |
This comment has been minimized.
This comment has been minimized.
comment:12
Replying to @kiwifb:
+1, could we make the individual doc locations configurable? |
comment:13
Replying to @timokau:
individual packages have their own ideas where the docs should go. Mostly it is Some packages have only little English documentation, e.g. This ticket is not meant to sort this huge mess out. It rather fixes most glaring omissions and provides a heads-up on docs that otherwise merely collect digital dust in |
comment:14
Replying to @dimpase:
I'm not talking about configuring where they are installed (which is a sage-the-distribution concern), but where sage looks for them when they are linked. Distributions don't install the docs of dependencies through sage's build system. |
comment:15
Replying to @timokau:
I can give templates used in |
comment:16
Being able to override them with I agree that it is a step backwards from the "pip-installability" goal though. |
comment:17
Replying to @timokau:
OK, will do.
It is not really so, as the top level reference manual already has things that are not about I agree though that it's desirable to add one more level to Sage distro docs, something akin to |
comment:18
Replying to @dimpase:
It's a search-and-replace; I think Python can handle it. Google led me to this, for example, for a generic search-and-replace:
|
Changed reviewer from Dima Pasechnik to none |
Changed branch from u/jhpalmieri/doc/docrefs to none |
Changed commit from |
Changed author from Dima Pasechnik, John Palmieri to none |
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:85
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:89
Just bikeshedding, but I don't know why the verbose names like Also how does this relate to other Python packages that already use Sphinx, and can use intersphinx instead? |
comment:90
Replying to @embray:
Fine with me to simplify these names.
The present ticket here is easier and can set the naming convention. Packages where we can do intersphinx should use a compatible naming convention. |
comment:91
Setting a new milestone for this ticket based on a cursory review. |
…ppl, qepcad, scip, singular, soplex <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> We create a standard way to refer to the online manuals of these packages, which are generated by tools other than Sphinx and therefore cannot be linked to using Intersphinx. This extends what has been already done with Pari. Examples: - [Examples in the Developer Guide](https://deploy-preview-37598-- sagemath.netlify.app/html/en/developer/sage_manuals#hyperlinks) Fixes sagemath#27495. Outside of the scope of this PR: - adding such extlinks everywhere - working with upstream projects to upgrade to better documentation tools - projects that can be linked to using Intersphinx; that's sagemath#37575 - any consideration how to link instead to local copies of those manuals, whether installed from SPKG or system packages. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#37598 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Matthias Köppe, Max Horn
We wish to link to external packages' documentation:
To this end, we use the sphinx.ext.extlinks facility, for which we already have infrastructure in
sage.misc.sagedoc
, assigning a Sphinx role to every external document.We use a systematic naming scheme for these roles:
:spkg_SPKG_DOC:
whereDOC
is usually justdoc
but if a package has several manuals, it can be used to distinguish them.In this ticket, we do this for the documents covered by a previous iteration of this ticket:
:spkg_gc_doc:
GC garbage collector <@SAGE_SHARE@/doc/gc/overview.html>
_:spkg_giac_doc:
Giac/Xcas documentation <@SAGE_SHARE@/doc/giac/index.html>
_ https://www-fourier.ujf-grenoble.fr/~parisse/giac/doc/en/cascmd_en/cascmd_en.html:spkg_ppl_doc:
PPL User manual <@SAGE_SHARE@/doc/ppl/ppl-user-1.2-html/index.html>
_ https://www.bugseng.com/products/ppl/documentation/user/ppl-user-1.2-html/index.html:spkg_pplpy_doc:
Python Wrapper for PPL (pplpy) <@SAGE_SHARE@/doc/pplpy/index.html>
_:spkg_singular_doc:
Singular User Manual <@SAGE_SHARE@/singular/html/index.htm>
_ https://www.singular.uni-kl.de/Manual/4-2-0/index.htmspkg_maxima_doc
:Introduction to Maxima <@SAGE_SHARE@/maxima/@MAXIMA_VERSION@/doc/html/intromax.html>
_ https://maxima.sourceforge.io/docs/manual/maxima_0.htmlThe location of some of the locally installed documentation files can be determined at runtime, see #27495 comment:58 for maxima.
This should probably go through
sage.feature
.Related:
sagemath-doc-src
,sagemath-doc-inventory
,sagemath-doc-html
,sagemath-doc-pdf
CC: @tobihan @kcrisman @kiwifb @embray @haraldschilly @mkoeppe @antonio-rojas @mwageringel @videlec
Component: documentation
Keywords: sd111
Issue created by migration from https://trac.sagemath.org/ticket/27495
The text was updated successfully, but these errors were encountered: