-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Support multi-version documentation on the website #1067
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
Conversation
mdboom
commented
Aug 10, 2012
This allows for multiple versions of the matplotlib documentation to be made available. The scheme is that the root documentation (i.e. http://matplotlib.sf.net/) will always be the latest stable version. Other versions of the documentation will be available in subdirectories off of the root (the latest stable version is merely a symlink or redirect back to the root). This is the same convention used by "docs.python.org", as an aside. The index.html page uses some JavaScript to load a little snippet of HTML from "/versions.html" that lists the available versions. "versions.html" is not part of this repository, but is part of the matplotlib.github.com repository and is updated by hand whenever new versions are added or removed from the archive. This approach allows all versions of the documentation to point to all other versions of the documentation. This JavaScript XMLHttpRequest magic doesn't happen when the user is viewing static files on their local machine, and this is a happy coincidence. The perhaps controversial outcome of this change is that the summary list of plotting commands is removed from the front page. For one, we want to steer people toward the version of the documentation that corresponds to the version they are running. Also, this was a manually created list, and has become quite out of date over time. Better, IMHO, to link to the pyplot documentation. This freed up room to move much of the content that existed in the sidebar to the main body, where I feel it's much less buried. I plan to add a lot more external resources and links, so having the room to do this would be very helpful. Adds a "Fork me on Github" banner.
I put this up on http://matplotlib.github.com/ so you can preview the changes. |
</td> | ||
<p>There is an active developer community and a long list of people | ||
who have made significant <a href="{{ pathto('users/credits') | ||
}}">contributions</a>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The contributions page could probably do with a refresh too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I'll file a separate issue for that.
I am not a fan of removing that list of functions. If it gets removed there, then it needs to be somewhere else. The problem isn't with the list itself, it is with maintenance of that list. Surely, we can come up with a sphinx-y way to generate a condensed table of methods from the pyplot.py api? |
Glad to see you moving in this direction. I've never liked the fact that there's no way to get to mpl's old docs easily, and I actually think that having the website build be part of the project itself is unnecessary and makes things harder than they need to be. I'd kindly suggest that you guys copy the ipython approach, where we have a separate website repo that is lightweight and minimal, and is even managed by a separate team from the main repo team. That lets people improve the website without having to dig into the entire codebase, and lets you give commit rights to just the website to contributors who may not necessarily be ready to commit into the main repo. Just a suggestion :) |
The problem with having the list on the front page is that it will go to version-specific documentation of those functions. One of the reasons for this patch is to have a landing page that is non-version-specific and to encourage people to select the version of the documentation that matches their version of matplotlib. But I'm not opposed to sticking the list somewhere else in the tree, and, yes, have it be auto-generated. @fperez: I had considered moving the landing page to the website repository, but didn't want to change the structure of local docs -- as distributed by Debian for example. That does get me thinking though -- the index.html in the Sphinx docs could certainly be a stripped down version of the landing page that is only ever used in local copies of the docs. |
On Fri, Aug 10, 2012 at 1:27 PM, Michael Droettboom <
I think in fact it makes more sense, when you think of distributions, not
The docs are trivially built for each version at release time, and also https://github.com/ipython/ipython/blob/master/docs/Makefile HTH, f |
I'm convinced that people are using the plotting command summary, so I've added a commit that generates a plotting command summary automatically. It is not on the front page, because given multi-version documentation, it doesn't make much sense to link directly into a particular version of the docs. This had quite a few tentacles into other things, the I would like to address fully, but instead chose to do the minimum that will get this done in time for the freeze. For example, sphinx' autosummary directive doesn't alone list all of the members of a given module, so you have to have a way to create the list of commands. |
Phil Elson | ||
Fixed some deep-seated bugs in the transforms framework, and has | ||
been laser-focused on improving polish throughout matplotlib, | ||
tackling things that have been considered to large and daunting for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to large" -> "too large"
Since you are updating the credits.rst, I think it is important to add Ian Thomas, who contributed the tricontour and tripcolor capabilities, and Michiel de Hoon, who wrote the macosx backend. (Ian also fixed the masking bug in the regular contour code, which had completely defeated me.) Also, I am surprised to see this as a merge to v1.1.x; it seems more appropriate for master. No harm in putting it in v1.1.x, though, and then merging to master. In any case I would be happy to see you go ahead and merge it. |
@@ -246,3 +246,12 @@ def %(name)s(): | |||
for name in cmaps: | |||
print _fmtcmap%locals() | |||
|
|||
print "# This function was autogenerated by boilerplate.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to conflict with my changes to boilerplate which were put on master a month or so ago. Is there a reason for basing this against v1.1.x? Can this particular change be avoided to the v1.1.x line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might conflict and require a different solution on master -- but it needs to be here so the plotting command list can be autogenerated and moved off of the front page of the docs.
@efiring: Just boneheaded oversight on the credits.rst additions. I will add that. This is merged into 1.1.x because the real impetus for this change is to allow for having multiple versions of the documentation available online -- without breaking too many existing links into the documentation that may exist elsewhere. This involves changing the landing page so it can point to other versions of the documentation and removing the master plot command list from the front page since it's confusing to present that level of detail without making it clear what version of the documentation they would be getting. For the 1.2 release, I'd like to have the 1.1 and 1.2 documentation available simultaneously. |
I think I agree with @efiring. This is a massive improvement, but I'm not sure about putting it against v1.1.x. These concerns are down to two main issues:
Other than my comments, I am happy with these changes. Thanks @mdboom. |
I hope I've explained why this goes on 1.1.x. If we don't make this change, then it's not made clear that the user is viewing the 1.1.x documentation and be provided with links to the other version. Yes -- some of the docstrings will be different -- but not in any substantive way. We ameliorate that, we could do a 1.1.2 release. And yes, merging into master will be non-straightforward, but that's fine in the end. |
Ok. Good answers. You have satisfied me on the need to put it against 1.1.x. +1 |
Support multi-version documentation on the website