-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Doc] Style of parameter tables in API reference is being broken #1555
Comments
Thanks for pointing this out. |
FIxed in #1556 The issue was that script that generated docs did not distinguish between Deprecated class and deprecated parameter in the class and did not use it. |
@ternaus Thank you for your quick response. But I could not confirm the fix in the documetation site. Lines "----" appear in commit #1529, where the lines are inserted at some sections (not all sections) of every transform's docstrings. |
I was not able to set up ruff to check for "----", it does not flag it as violation of google docstrings format. I will try to upgrade version of mkdocs, maybe it will be more robust toward formatting of the docstring. I can also have a custom hook, that just look for "---" and longer in the code. What exactly don't you like in the existing version of parsed docstrings? |
The current albumentation dosctring mixes two docstring section styles (google and numpy). It would be preferable to format docstring with tools like ruff or black, but currently, they do not seem able to handle docstring styles. If possible, I think writing a custom hook would be a practical workaround, and I expect deleting "---" is sufficient. |
Added check for |
Looks like works |
@ternaus Thanks! |
📚 Documentation
The style of the parameter tables in the API documentation is being broken.
https://albumentations.ai/docs/api_reference/augmentations/transforms/
I found recent commit inserts
------
in the docstrings:Args: + ---- para1: ... para2: ...
This appears to prevent
mkdocs
from parsing the docstring, since mkdocs assumes "google-style" that does not use-----
for sections.https://github.com/albumentations-team/albumentations.ai/blob/4fda83887b102ea3f0e08c9f10e5ea7d4dfd4201/mkdocs/src/mkdocs.yml#L13-L14
cf: about google-style
https://mkdocstrings.github.io/python/usage/docstrings/google/
https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
The text was updated successfully, but these errors were encountered: