Skip to content

Template for subpackage docs - #218

Merged
eteq merged 14 commits into
astropy:masterfrom
eteq:docs/pkgtemplate
Jun 7, 2012
Merged

eteq merged 14 commits into
astropy:masterfrom
eteq:docs/pkgtemplate

Conversation

@eteq

@eteq eteq commented May 1, 2012

Copy link
Copy Markdown
Member

This PR adds a template file for use when generating new subpackages (and hopefully, eventually, for homogenizing all of the subpackage documentation). It also re-writes config.rst as sort of a "case study" in how this template works.

Any thoughts on changes that should be made to this template?

One thing to note that was an arbitrary choice I made: This template assumes that any time you have multi-page documentation, the main page is in the docs directory, while only the sub-pages are inside a directory. E.g., if you have a subpackage named mysubpkg, with two sub-pages sub1.rst and sub2.rst, the template assumes you would create the files docs/mysubpkg.rst, docs/mysubpkg/sub1.rst, and docs/mysubpkg/sub2.rst. An alternative is to instead place the base document in the directory - e.g. the first file is instead docs/mysubpkg/mysubpkg.rst.

I prefer the current way (the first example above), as it makes all the subpackage documentation have a base file in the same directory, so e.g. the main TOCtree in index.rst doesn't have to be altered if later someone adds subpages. But if anyone feels strongly about it, I can change this.

Comment thread docs/configs.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

conviniently -> conveniently

also the comma after "used" is unnecessary

@embray

embray commented May 1, 2012

Copy link
Copy Markdown
Member

Looks fine other than my one nitpick.

Comment thread docs/pkgtemplate.rst Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

articles

@mdboom

mdboom commented May 1, 2012

Copy link
Copy Markdown
Contributor

One quick thought -- maybe call it _pkgtemplate.rst to make it clear that it's a special file not to be included in the docs? (I know the exclude_patterns does this, but for human beings it might be more obvious to follow the Python convention for private stuff).

Comment thread docs/configs.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Documentation" is redundant.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree, the table of contents will look very busy if each line contains 'Documentation'

@astrofrog

Copy link
Copy Markdown
Member

This looks good to me!

@mdboom

mdboom commented May 3, 2012

Copy link
Copy Markdown
Contributor

We should probably resolve some of the issues in #219 before locking this in.

@eteq

eteq commented May 8, 2012

Copy link
Copy Markdown
Member Author

I've made all the small changes suggested here, but I agree with @mdboom about looking into #219's issues before merging.

taldcroft added a commit to taldcroft/astropy that referenced this pull request May 9, 2012
- Update subpackage docs following format suggestion from pull request
  issue astropy#218.
- Added much more useful introduction and Getting Started
  section, emphasizing high level simple stuff first.
- Re-organized page on constructing tables to put the
  simpler / more likely cases first.
- Added more detail in places including explanation of new-
  and old- style formatting.
@astrofrog

Copy link
Copy Markdown
Member

Just for clarification, where should the API be? You had a separate API/Reference section before, but you removed the header to avoid duplication with the auto-generated 'Reference/API' title, so it's no longer clear where the API should be.

@eteq

eteq commented May 12, 2012

Copy link
Copy Markdown
Member Author

automodapi is where the API section ends up in the generated docs... Do you think I should just put a comment in the template that points that out?

@taldcroft

Copy link
Copy Markdown
Member

@eteq - yes, the automodapi needs clarification. I didn't really understand that for the table docs and just winged it a little. I will fix once it's clear what should be done from the template.

@kbarbary

Copy link
Copy Markdown
Member

Could we simply take the "Reference/API" title out of the automodapi output and put it in the template instead?

@eteq

eteq commented May 14, 2012

Copy link
Copy Markdown
Member Author

@kbarbary - that would be easy enough, and I guess it would be more explicit... I put it in there mainly so people would always use the same order (e.g. Reference/API vs. API/Reference). @astrofrog, @taldcroft, does that seem reasonable? If so I'll update this PR with that change.

@astrofrog

Copy link
Copy Markdown
Member

@eteq - I think it would indeed be clearer to have the title explicitly included in the template and taken out of automodapi.

@taldcroft

Copy link
Copy Markdown
Member

@eteq - agree on having the title in the template instead of automodapi.

@astrofrog

Copy link
Copy Markdown
Member

@eteq - apart from having the API title be in the template instead of automodapi, I think this can actually be merged, because the points raised by @mdboom in #219 are either being dealt with there or in other issues.

@eteq

eteq commented Jun 2, 2012

Copy link
Copy Markdown
Member Author

@astrofrog good point - I'll update this PR with the small points above, fix the conflict and merge early next week.

@eteq

eteq commented Jun 7, 2012

Copy link
Copy Markdown
Member Author

This has now been rebased against master, and updated to take References/API out of automodapi and into the template.

If there are no objections, I'll merge this tomorrow.

@taldcroft

Copy link
Copy Markdown
Member

This is OK but docs/io/ascii/index.rst and docs/table/index.rst will both need to have References/API inserted above the automodapi directive.

@eteq

eteq commented Jun 7, 2012

Copy link
Copy Markdown
Member Author

@taldcroft - Thanks - I had updated docs/io/ascii/index.rst but missed the one in docs/table/index.rst - both should be good now.

@astrofrog

Copy link
Copy Markdown
Member

Looks good - feel free to merge!

eteq added a commit that referenced this pull request Jun 7, 2012
@eteq
eteq merged commit 65e26ff into astropy:master Jun 7, 2012
mdboom added a commit to mdboom/astropy that referenced this pull request Jun 8, 2012
keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
- Update subpackage docs following format suggestion from pull request
  issue astropy#218.
- Added much more useful introduction and Getting Started
  section, emphasizing high level simple stuff first.
- Re-organized page on constructing tables to put the
  simpler / more likely cases first.
- Added more detail in places including explanation of new-
  and old- style formatting.
keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
@eteq
eteq deleted the docs/pkgtemplate branch May 3, 2015 17:17
astrofrog pushed a commit to astropy/sphinx-automodapi that referenced this pull request Jan 27, 2018
jeffjennings pushed a commit to jeffjennings/astropy that referenced this pull request Jul 2, 2025
Update hero logo to use new "The Astropy Project" branding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants