-
Notifications
You must be signed in to change notification settings - Fork 24
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
Create gen-pydoc.py #589
base: master
Are you sure you want to change the base?
Create gen-pydoc.py #589
Conversation
Support per-module output
pydoc generation per module
gen-pydoc.py
Outdated
try: | ||
docstring = pydoc.plain(pydoc.render_doc(module_name)) | ||
out_f.write(docstring) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will ignore all of the :meta private
tags I have on private functions that users aren't supposed to be using
Don't care about it that much, but I am concerned of LLMs abusing private things in the library.
Remains to be seen i guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably less important for LLMs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably less important for LLMs
In my opinion this is actually MUCH MORE important for LLMs, because if the docs show up there, LLM will just pick it up and regurgitate to the user, and then the user ends up writing code that mangles private things that shouldn't be mangled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try to find a possible solution, probably not easy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's a point in worrying about it yet, and if we have users complaining about these functions/fields changing we can tell them that they're intended to be private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm realizing that it might be even worse, because I have some files where I have docs that I didn't bother to hide with :meta private
, but are still very internal and just not showing up in the sphinx docs because I didn't add them.
Example: https://github.com/DagsHub/client/blob/master/dagshub/data_engine/client/data_client.py
this is the GraphQL data layer, which is not intended to be used directly
disregard the failing 3.8 test, that's a weird flaky test that I didn't manage to pinpoint yet. Rarely shows up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the lint (you can run ruff fmt
or black
) and feel free to merge
For consumption by LLMs.