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

Consistency with 'references' in docstrings #5251

Open
Astro-Kirsty opened this issue May 7, 2024 · 0 comments
Open

Consistency with 'references' in docstrings #5251

Astro-Kirsty opened this issue May 7, 2024 · 0 comments
Milestone

Comments

@Astro-Kirsty
Copy link
Member

Currently we have a number of different ways to implement a reference. We should make sure we utilise the same method each time.

Example that links to the actual references page – personally I like this option
https://docs.gammapy.org/1.2/api/gammapy.estimators.TSMapEstimator.html

Full reference in docstring
https://docs.gammapy.org/1.2/api/gammapy.catalog.SourceCatalog1LHAASO.html
https://docs.gammapy.org/1.2/api/gammapy.catalog.SourceCatalog2HWC.html

List of multiple references
https://docs.gammapy.org/1.2/api/gammapy.stats.cash.html
https://docs.gammapy.org/1.2/api/gammapy.astro.darkmatter.ZhaoProfile.html

I suggest we decide on a specific format and then add that to the documentation guide.
https://docs.gammapy.org/1.2/development/doc_howto.html

There are also a number of things that we could add to the documentation guide to ensure we are producing the correct docstrings and examples. Also as a note to everyone, if we are creating new functions or example codes we should make sure to build the docs and the run the test for the docstring examples i.e.
pytest --doctest-modules gammapy/estimators/parameter.py

@registerrier registerrier added this to the 1.3 milestone May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants