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

Sphinx Build is throwing many warnings #178

Closed
devendragovil opened this issue Jun 26, 2023 · 8 comments
Closed

Sphinx Build is throwing many warnings #178

devendragovil opened this issue Jun 26, 2023 · 8 comments
Assignees

Comments

@devendragovil
Copy link
Contributor

What?

Sphinx Build is throwing a multitude of warnings. Example:
image

Why?

The warnings right now might turn acute later on. Need to see what is going on.

@mhajij
Copy link
Member

mhajij commented Oct 6, 2023

@maneelusf @devendragovil what is the udpate on this issue?

@ninamiolane
Copy link
Collaborator

@maneelusf @devendragovil what is the update on this?

@devendragovil
Copy link
Contributor Author

A major update on this issue:

Update

There are over 250 warnings that are being thrown during the docs build process mostly because the function/method docstrings haven't been written to be compliant with numpydoc. I have been trying to resolve these, but in a lot of cases I think the original method creator can help resolve the issues better.

Further Issues

Due to the docstring parsing warnings, the docs generated by sphinx are not complete or correct.
An example: If the docstring section in a method begins with Return instead of Returns, sphinx doesn't parse it any longer as the Returns section and skips generating the returns section for the final doc.

Solution

I think two steps are needed:

  1. We need to manually resolve the warnings that are already being thrown (around 250 of them for this package)
  2. We need to make necessary changes in the pre-commit and CI/CD workflows to make sure that docs are generated correctly from now onwards.

@devendragovil
Copy link
Contributor Author

I am working on amending the pre-commit file and the CI/CD workflow to incorporate docstring checks.

@ffl096
Copy link
Member

ffl096 commented Nov 10, 2023

the CI/CD workflow to incorporate docstring checks

We have validation since #297, but I think the checks do not fail for warnings

@devendragovil
Copy link
Contributor Author

@ffl096 If I understand it correctly, the check has been placed as the part of the sphinx build process by specifying numpydoc validation in the conf.py file read by Sphinx.

I think we may want to add the check in the CI/CD workflow explicitly.

@ffl096
Copy link
Member

ffl096 commented Nov 10, 2023

Why? It is part of the CI/CD workflow this way as well. Not sure why we should spread doc-related validations across different places instead of everything in sphinx.

@devendragovil
Copy link
Contributor Author

I would argue that this isn't a doc related validation, but more so related to codebase i.e. the docstrings format.

However, the more important goal should be to fail a CI/CD workflow so as to incentivize correct docstring formatting something akin to compliance with PEP8.

devendragovil added a commit to devendragovil/TopoNetX that referenced this issue Nov 13, 2023
… and enforcing compliance with Numpy Doc Validation.

This helps with issue pyt-team#178.
devendragovil added a commit to devendragovil/TopoNetX that referenced this issue Nov 18, 2023
@ffl096 ffl096 closed this as completed in 2dbc4db Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants