Skip to content

Conversation

@cdeil
Copy link
Member

@cdeil cdeil commented Feb 27, 2014

As mentioned in #1826, there is still a problem with locations of things in the Sphinx API docs for (at least some) sub-packages that have an extra layer in the hierarchy.
E.g. astropy.modeling.functional_models.Gaussian1D
should show up at astropy.modeling.models.Gaussian1D and I think e.g. astropy.io.votable.tree.VOTableFile should show up at astropy.io.votable.VOTableFile.

This is a first attempt at putting everything in the appropriate place (i.e. where the user is supposed to import from) for astropy.modeling.

You can see the resulting html docs here ... it doesn't work, i.e. there are no entries under astropy.modeling.models.

@kbarbary @astrofrog @eteq Why is .. automodapi:: astropy.modeling.models not picking up the astropy.modeling.models.__all__ entries?

$ python -c 'import astropy.modeling as m; print(m.models.__all__)'
[u'Pix2Sky_AZP', u'Sky2Pix_AZP', u'Pix2Sky_CAR', u'Sky2Pix_CAR', u'Pix2Sky_CEA', u'Sky2Pix_CEA', u'Pix2Sky_CYP', u'Sky2Pix_CYP', u'Pix2Sky_MER', u'Sky2Pix_MER', u'Pix2Sky_SIN', u'Sky2Pix_SIN', u'Pix2Sky_STG', u'Sky2Pix_STG', u'Pix2Sky_TAN', u'Sky2Pix_TAN', u'RotateCelestial2Native', u'RotateNative2Celestial', u'MatrixRotation2D', u'Chebyshev1D', u'Chebyshev2D', u'InverseSIP', u'Legendre1D', u'Legendre2D', u'Polynomial1D', u'Polynomial2D', u'SIP', u'OrthoPolynomialBase', u'PolynomialModel', u'AiryDisk2D', u'Beta1D', u'Beta2D', u'Box1D', u'Box2D', u'Const1D', u'Const2D', u'Disk2D', u'Gaussian1D', u'Gaussian2D', u'Linear1D', u'Lorentz1D', u'MexicanHat1D', u'MexicanHat2D', u'Ring2D', u'Scale', u'Shift', u'Sine1D', u'Trapezoid1D', u'TrapezoidDisk2D', u'custom_model_1d', u'BrokenPowerLaw1D', u'ExponentialCutoffPowerLaw1D', u'LogParabola1D', u'PowerLaw1D']

@eteq
Copy link
Member

eteq commented Feb 27, 2014

I think this is actually because there's confusion about what modeling's docs are supposed to look like.

If you look at #1801, you'll see that I implemented this change, but there was some debate as to whether or not this is the desired change. Regardless, #1801 includes some fixes to subtle bugs in automodapi that I think will address this problem (it has to do with how automodsumm removes entries that are not actually in that subpackage). But #1801 was stalled because it wasn't clear which direction to go. Let me try pinging everyone there again...

In the meantime, though, @cdeil, you might want to close this in favor of #1801 just so we don't have duplicate issues on the same thing (unless there's more you're implementing here that I'm not realizing?)

@astrofrog
Copy link
Member

@cdeil - can you rebase? Sorry, there have been several conflicting pull requests, and I decided to merge the biggest one as it would be the hardest to rebase.

@cdeil
Copy link
Member Author

cdeil commented Mar 3, 2014

@astrofrog Rebased.
@eteq I took out the part where I tried to do (but didn't succeed) of what you have done in #1801, this is now simply a few cases of fixed sphinx links.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So do the latter three still need to be included?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to leave these changes out of this PR ... removing the line:

.. automodapi:: astropy.modeling.models

@cdeil
Copy link
Member Author

cdeil commented Mar 3, 2014

Can someone with permissions please restart this? ... I think it's a fluke:
https://travis-ci.org/astropy/astropy/jobs/19973503

@astrofrog
Copy link
Member

Done

@cdeil
Copy link
Member Author

cdeil commented Mar 3, 2014

All is well on travis-ci.

@eteq
Copy link
Member

eteq commented Mar 3, 2014

Looks good - merging!

eteq added a commit that referenced this pull request Mar 3, 2014
Fix locations / links in astropy.modeling Sphinx API docs
@eteq eteq merged commit 532bfae into astropy:master Mar 3, 2014
@eteq eteq added the docs label Mar 3, 2014
@eteq eteq added this to the v0.3.2 milestone Mar 3, 2014
@eteq eteq added the modeling label Mar 3, 2014
@eteq eteq modified the milestones: v0.4.0, v0.3.2 Mar 3, 2014
@cdeil cdeil deleted the sphinx_links_fixes branch March 3, 2014 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants