Repository navigation
Add high-level docs - #42
Conversation
|
I've put myself as assignee on this one, i.e. I'll review and eventually merge it. The travis-ci build currently fails because of this Sphinx warning: https://travis-ci.org/astroplanners/astroplan/jobs/72916157#L904 |
|
@cdeil Later would be better--I'm traveling tomorrow and then moving apartments, so the docs may still be pretty meager until early next week. I'm pretty sure I know how to fix the Travis CI build error. |
|
@astroplanners/astroplanners-contributors You can find docs in progress at: jberlanga.github.io/astroplan |
|
❗ The tutorials in progress look awesome. I don't use packages if they don't have docs like these, so I'm really glad to see them coming along! |
|
I agree, really looks good! |
There was a problem hiding this comment.
I would show an example where astroplan does the time conversion for you:
from datetime import datetime
time = subaru.datetime_to_astropy_time(datetime(2015, 06, 16, 2, 0, 0))There was a problem hiding this comment.
You could instead make this a warning to the user that the API could change because this is still very much in active development (re-phrase it in your own words). You can make a warning by doing:
.. warning::
Text for the warning
and sphinx will render it nicely.
|
@jberlanga Do you want us to do a line-by-line review of this PR, or would you like some more time to refine things? |
|
@adrn & @astroplanners/astroplanners-contributors : I spent most of last week traveling/moving, so I'm a bit behind on this PR--best to wait until I push some more content--I'll alert you. |
1a99693 to
38408e8
Compare
|
Hi @astroplanners/astroplanners-contributors! I've made a substantial update to this branch--check out http://jberlanga.github.io/astroplan/ to see a preview of the docs. |
There was a problem hiding this comment.
I haven't thought about it much, but I think I'm -1 on using the ipython Sphinx directive.
As far as I can see, the main difference wrt. the normal Python Sphinx directive is the input / output cell numbers.
And those don't carry useful info, i.e. are more distracting than helpful in my opinion.
So I'd suggest re-writing the examples that show input and output using the Python prompt >>> prefix for inputs:
.. code-block:: python
>>> subaru.parallactic_angle(time, altair)
−0.640582rad
>>> subaru.parallactic_angle(time, vega)
−0.465298rad
If it's about getting this format quickly for the docs, what I sometimes do is call %history in IPython, and then copy & paste the relevant commands into a new Python shell, then copy & paste & indent by 4 spaces that to the RST file.
If you agree to this change, the point is irrelevant. But in case not, the IPython directive is currently not found in the Sphinx build, resulting in this error:
https://travis-ci.org/astroplanners/astroplan/jobs/74846421#L874
There was a problem hiding this comment.
Fair point on in/out #'s being distracting. It should be easy enough to replace these bits.
|
@jberlanga – Thanks for the update! Before you start filling in lots of examples, @astroplanners/astroplanners-contributors is such a "HOWTO" or "Cookbook" the best way? (see http://jberlanga.github.io/astroplan/howtoget.html) One thing I like is if a package has a first code example that shows what it's about (and ideally does something cool / non-trivial) that I can read in less than one minute. If it's very short it could be on the front page of the docs, otherwise the getting started page. Currently the getting started page starts with a section general guidelines section that has longish examples (10+ lines showing how to instantiate a target and an observer). Looking at the skyfield front page, the code examples are about RA/DEC to Alt/Az coordinate transformation, similar to what @eteq did in the observing example page in the Astropy docs. |
|
Update: http://jberlanga.github.io/astroplan/ now matches latest commit (6c26eb5). |
|
Yes, we have doctests enabled for In principle this is a good thing, to have the examples from the docs tested. For the cases where you can't get a docs example to work, or where making it work would mean adding several lines of setup code that's too distracting for the docs, there's flexible options to skip code example lines or blocks or whole files: |
|
@astroplanners/astroplanners-contributors Hi all, another major update to the docs: See plotting tutorial page. A couple things I still need to fix:
|
4992134 to
ff8ea34
Compare
|
@astroplanners/astroplanners-contributors Hi everyone, This is nearing completion on my end (see jberlanga.github.io/astroplan/), but there is the matter of the last two Travis CI builds failing with the error: |
|
@jberlanga My PRs have been doing that too. I don't know what it is, but I think we could use some advice from @astroplanners/astroplanners-contributors . |
|
The error message (e.g. https://travis-ci.org/astroplanners/astroplan/jobs/76501136#L531) is pointing to this line: https://github.com/astroplanners/astroplan/blob/master/astroplan/core.py#L20 So the problem is this call iers.IERS.iers_table = iers.IERS_A.open(download_file(iers.IERS_A_URL,
cache=True))I don't understand in detail what the issue is. Maybe the file really can't be downloaded at the moment and it only works for you locally because you have it in your cache? Or maybe travis-ci doesn't allow internet access at this point of execution? Really downloading a file on import is a bad idea and we should try to find a better solution ... let's discuss in #15? |
5427bc1 to
48244f2
Compare
|
@astropy/astroplan-maintainers -- Please have a look. This PR is in its final review. |
|
Looking good for 0.1 👍 |
|
@jberlanga – Thanks for this big piece of work! I'm merging this now. Of course this is just the starting point for the |
|
I think the HTML build worked on treadthedocs: The PDF build failed (but we can ignore that for now): |
|
Oops, @cdeil, this was still under review - @adrn, @jberlanga and I were going to have a telecon about this today in the early afternoon and then merge after. Now that I look, though, that wasn't noted here on the PR (we were talking about it over e-mail...), so I guess you couldn't have known that. At any rate, @jberlanga, it'll probably be easiest if I leave some comments in this PR since it has the diff, and then you can issue a new PR with those corrections? (I may just do some of them myself if it turns out that's easier). |
Added additional docs/*.rst files for documentation.
Addresses Issue #41.