I like it! I think this is a decent idea. A few things I might do
differently though: I would much prefer to keep any error
documentation closely associated with the code it relates to. I think
it's already hard enough as it is to keep code and user documentation
in sync. And having an entire separate set of documentation that
needs to be referenced and and kept up to date could become
problematic.
Finally, they should be reST, not Markdown, simply for the sake of
consistency with any other documentation we have.
- if we want to have a dedicated server (software wise) then I suggest using a sub-domain (help.astropy.org,tutorials.astropy.org, etc.), so that we don't have to interfere with the main pages (astropy.org) that are hosted by github.
- is there a way to render clickable URLs in a terminal? (probably not, but just checking!)
- is there a reason not to include the rst files for these tutorials in the normal documentation for the package? (then the links would just point to docs.astropy.org/...). If the issue is to do with the length of the URL, the actual tutorials could still be in the main docs, and help.astropy.org/err?id=5000 (for example) could just redirect to the appropriate tutorial page ondocs.astropy.org.
On Wed, Oct 3, 2012 at 12:17 AM, Demitri Muna <demitr...@gmail.com> wrote:
> Another reason to keep them separate is that it will be *much* moreAt first I was thinking this would be no worse than the in-line API
> convenient/easy to write and edit. Editing in-line marked up text is pretty
> much a non-starter I think.
documentation we already have. If well organized I don't see it as
such a hindrance. But I cede your point. That said I would rather
not have a completely separate documentation section for this. Better
to have exception help included in the main docs--possibly in an
appendix. That eliminates the need for a special server-- we can just
link to the sphinx docs that are already hosted online. And for the
correct version too.
On Oct 3, 2012, at 11:54 AM, Erik Bray <erik....@gmail.com> wrote:
> I vote against abusing ccTLDs. :)
* Requiring an external server. I think we should serve these error pages (still coming up with a better name) on a server, for a couple of reasons. First, I don't think it's a good idea to install a server on someone's machine - certainly not Apache, but even a Python http server. I just don't want to open the door to security risks, and having to teach people how to set that up to access the pages is onerous. Even if the URLs were file:// leading to an absolute path, the actual URL will then be machine specific, preventing people from emailing them to others. They would almost certainly be very long. Also, we can't assume astropy *is* installed on the user's machine. They could very easily be logged into their linux cluster, and having people open a remote Firefox X window is a sure way to make sure people don't use it. I really think the lowest bar here is an externally hosted URL.
* Maintaining pages across versions & URLs. This occurred to me (with dread). We have to be careful to minimize the effort in maintaining this, but I think it's achievable. Pages that don't need to be changed between versions should be left alone, i.e. require *no* extra effort between releases. For this reason I'd recommend against including the release number in the URL - one page can easily live across many releases. On the other hand, if the URL includes the release but a back end server maps it to the right file (that is the same across releases), then that would be ok. More reason to offload this complexity to a back end server. For this reason I was thinking the same as Michael suggested, that each page get a number that is retired when the page is retired.
* Custom exceptions. I do employ custom exceptions when it makes sense, but to generate potentially hundreds of these seems to me to abuse the notion of Python exceptions. If I need to throw a ValueError, that's what I should throw. Virtually no one will (should!) see that my custom Exception is a subclass, and I certainly don't want people writing try/excepts around that multitude.
* Including the pages in the documentation. Regardless of where they live, I don't believe these pages should be online as part of the documentation. It would be like having a section in the back of a city map (e.g. Thomas Map, A-Z) with pages that said "the doughnut shop you are trying to get to is actually one street over - turn left on Sepulveda here." It won't make any sense without context, and worse, will distract from the nice and lovely tutorials that are present. These are *highly context sensitive* descriptions, and frankly will repeat a lot of material. It won't be useful, and will in fact (I believe) be detrimental.
* Clickable links in the terminal. Well, for Mac users, this is pretty cool:
http://hints.macworld.com/article.php?story=20110911122108326
Cheers,
Demitri
_________________________________________
Demitri Muna
Center for Cosmology and Particle Physics
New York University
http://scicoder.org
And to address a questionsomeone rose about IPython notebook, it already automatically converts
URLs to links at least in markdown cells :)
I personally don't like the idea of putting them directly in the
packages because putting anything other than code and data in the
packages can lead to significant headaches with distutils/distribute
and how it decides what to actually put in releases and installs and
such (see https://github.com/astropy/astropy/issues/403 for an example
of this sort of thing). What about a "quickhelp" directory in the
root of the astropy repo?
If we do it outside the docs, though, we can't build it as part of the
build_sphinx or related family of scripts, so that would force us to
point to the github page (e.g. exactly what you see with
https://github.com/eteq/astropy/blob/staging/test.rst). Unless you're
suggesting a web app that actually re-builds a second distinct set of
sphinx docs every time that directory is changed? If we did it that
way, I suppose you could even include the code for the app in the
"quickhelp" directory...