Skip to content

Fix documentation build#2262

Merged
bsipocz merged 3 commits into
astropy:mainfrom
eerovaher:doc-build-fix
Jan 25, 2022
Merged

Fix documentation build#2262
bsipocz merged 3 commits into
astropy:mainfrom
eerovaher:doc-build-fix

Conversation

@eerovaher

Copy link
Copy Markdown
Member

The newly released numpydoc 1.2 emits many warnings about docstrings. The causes of these warnings are addressed by this pull request and the documentation build should now succeed.

The newly released `numpydoc` 1.2 emits many warnings about docstrings.
The causes of these warnings are addressed by this commit and the
documentation build should now succeed.
@codecov

codecov Bot commented Jan 25, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2262 (03238e8) into main (f4a0664) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2262   +/-   ##
=======================================
  Coverage   62.68%   62.69%           
=======================================
  Files         131      131           
  Lines       16818    16822    +4     
=======================================
+ Hits        10542    10546    +4     
  Misses       6276     6276           
Impacted Files Coverage Δ
astroquery/ipac/irsa/irsa_dust/core.py 81.57% <ø> (ø)
astroquery/ipac/ned/core.py 88.37% <ø> (ø)
astroquery/jplspec/core.py 91.78% <ø> (ø)
astroquery/linelists/cdms/core.py 79.79% <ø> (ø)
astroquery/mast/collections.py 92.10% <ø> (ø)
astroquery/mast/observations.py 75.89% <ø> (ø)
astroquery/open_exoplanet_catalogue/oec_query.py 56.09% <ø> (ø)
astroquery/vo_conesearch/validator/inspect.py 100.00% <ø> (ø)
astroquery/alma/core.py 41.76% <100.00%> (+0.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4a0664...03238e8. Read the comment docs.

@eerovaher eerovaher mentioned this pull request Jan 25, 2022
3 tasks
Comment thread astroquery/alma/core.py Outdated

Parameters
----------
**kwargs

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.

would you mind listing the params from above? to format lets you list them without the one-sentence description, and that is still better I think than listing kwargs only (I would rather prefer to remove the whole section that having kwargs only)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried to fill out the docstring using the same mechanism that is used in pyvo.dal.sia2.py, but the documentation build now fails with

WARNING: py:obj reference target not found: pyvo.dam.obscore.POLARIZATION_STATES
WARNING: py:obj reference target not found: pyvo.dam.obscore.CALIBRATION_LEVELS

I'm not sure if this should be addressed here or if it's pyvo documentation that should be updated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I simply removed the offending links from the docstring for now because that seems to be the fastest way of fixing the documentation build without dropping the newly added parameter descriptions. If they don't cause problems for Sphinx at some point in the future then 03238e8 can be reverted.

@jaymedina

jaymedina commented Jan 25, 2022

Copy link
Copy Markdown
Contributor

Your documentation build is failing with the same Astrometry.net API key warning:

WARNING: Astrometry.net API key not found in configuration file [astroquery.astrometry_net.core]
WARNING: You need to manually edit the configuration file and add it [astroquery.astrometry_net.core]
WARNING: You may also register it for this session with AstrometryNet.key = 'XXXXXXXX' [astroquery.astrometry_net.core]

Would it be possible for you to fold a fix for that into this branch or is it out of scope and need its own PR?

The docstring of `astroquery.alma.AlmaClass.query_sia()` is constructed
with the help of `pyvo.dal.sia2.SIA_PARAMETERS_DESC` constant, which
however contains links that Sphinx is unable to resolve. These links are
removed by this commit so that the documentation build can succeed.
@bsipocz

bsipocz commented Jan 25, 2022

Copy link
Copy Markdown
Member

@jaymedina - those warnings don't affect the docs build. I would love to have a way to have API keys and test accounts for all the services we provide access to, but unfortunately, that is not the case. Any suggestions for solutions are welcome.

@bsipocz bsipocz left a comment

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.

Perfect, rendered docs looks good now.

@bsipocz bsipocz merged commit c933c3d into astropy:main Jan 25, 2022
@bsipocz

bsipocz commented Jan 25, 2022

Copy link
Copy Markdown
Member

Thanks @eerovaher!

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