Skip to content
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

change API documentation from time.core to just time #1028

Merged
merged 1 commit into from Apr 26, 2013

Conversation

eteq
Copy link
Member

@eteq eteq commented Apr 26, 2013

This is a pretty trivial PR that probably only @taldcroft will care about.

This changes the documentation for the time subpackage to be an API for astropy.time instead of astropy.time.core. Right now, this doesn't change what classes/functions are documented because astropy/time/__init__.py just has from .core import * in it.

I think it's better to do it this way, though, because now if I put astropy.time in the docs (or someone else does via intersphinx) it will link to that page, instead of having no link (because it thinks it's documentiong astropy.time.core). It's also marginally clearer this way to users that they should do from astropy.time import foo instead of from astropy.time.core import foo.

Or is there some other reason you had for using core over the base package, @taldcroft?

@taldcroft
Copy link
Member

@eteq - looks good. I never had any desire to involve core in the story, this is just the result of my general confusion about how exactly sphinx works. From my experience if I did something like :class:'~astropy.time.Time' then this would fail, I had to do :class:'~astropy.time.core.Time'. (I'm using forward apostrophe instead of backtick because I don't feel like looking up how to escape in markdown).

Upshot, my mastery of sphinx is really limited, so please fix anything I'm doing wrong. 😄

@eteq
Copy link
Member Author

eteq commented Apr 26, 2013

@taldcroft - ok, just wanted to make sure. I totally see where you're coming from, because even with this change you still do have to do :class:~astropy.time.core.Time. I also find that annoying, and have it on my (infinitely-increasing...) todo list to try to figure out a way to make e.g., `:class:`~astropy.time.Time just work.

But it turns out (because of esoteric details of sphinx' internals and how they interact with automodapi) that this change works fine even though the linking of individual objects doesn't. So I'll go ahead and merge it.

eteq added a commit that referenced this pull request Apr 26, 2013
change API documentation from time.core to just time
@eteq eteq merged commit ec30304 into astropy:master Apr 26, 2013
@eteq eteq deleted the docs/timecore-to-time branch April 26, 2013 17:24
eteq added a commit that referenced this pull request May 13, 2013
change API documentation from time.core to just time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants