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

Include module-level variables in API docs #111

Merged
merged 2 commits into from Sep 11, 2017
Merged

Conversation

@cdeil
Copy link
Member

@cdeil cdeil commented Sep 8, 2017

The constants in gammapy.utils.const should appear in the API docs.

E.g. fwhm_to_sigma is there:

from gammapy.utils.const import fwhm_to_sigma

But it's not in the API docs: search result

@cdeil
Copy link
Member Author

@cdeil cdeil commented Jan 22, 2015

This is a known astropy-helpers issue: astropy/astropy-helpers#117

fwhm_to_sigma is available in Astropy by now, but there's other more important missing things, e.g. radial_distributions here:

@cdeil cdeil modified the milestones: 0.2, 0.3 Apr 8, 2015
@cdeil cdeil modified the milestones: 0.4, 0.3 May 31, 2015
@cdeil cdeil modified the milestones: 0.5, 0.4 Oct 7, 2015
@cdeil cdeil modified the milestones: 0.6, 0.5 Jul 7, 2016
@cdeil cdeil modified the milestones: 0.7, 0.6 Feb 15, 2017
@bsipocz
Copy link
Member

@bsipocz bsipocz commented Jun 4, 2017

with astropy/sphinx-automodapi#24 merged, this should be fixed with helpers 2.0.

@cdeil cdeil self-assigned this Sep 8, 2017
@cdeil cdeil changed the title Include constants in API docs Include module-level variables in API docs Sep 8, 2017
@cdeil
Copy link
Member Author

@cdeil cdeil commented Sep 8, 2017

Only 3 years later, this is finally done. I've attached ec8200a here which adds :include-all-objects: to all automodapi directives in Gammapy. Also, I've mostly re-written gammapy/data/observers.py in a better way and with a good docstring.

I've reviewed all automodapi docs in Gammapy, there aren't many additions.

It's mainly a few dictionaries that serve as registries:

  • gammapy.data.observatory_locations
  • gammapy.image.models.morph_types
  • gammapy.astro.population.radial_distributions
  • gammapy.astro.population.velocity_distributions
  • gammapy.catalog.source_catalogs

We should add a spectral model registry and find a uniform registry patter to be used throughout Gammapy.

Also note that I've filed two issues today suggesting improvements to sphinx-automodapi that would make the use of sphinx-automodapi in Gammapy in the future even better:

@cdeil cdeil force-pushed the cdeil:issue-111 branch from ec8200a to 6dd367c Sep 11, 2017
@cdeil cdeil merged commit e95c39f into gammapy:master Sep 11, 2017
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants