-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Pyi integration #2810
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
Pyi integration #2810
Conversation
Hi @tannewt I've got it kinda passing the script you wrote (it's been working great so far). However, I do have two questions, first, it didn't pass unless there was no leading whitespace, how does this affect the python examples in the code. Secondly, the script fails on __init__.c which doesn't have any associated stub files. What should I do about that? It always gets checked last, so I can still go through all of the other files, but I just wanted to check if there's anything I should be doing about that. |
By removing the whitespace you are making it so the script doesn't include it in the .pyi file. (You can see the results in the circuitpython-stubs directory.) So, you aren't fixing it, you are removing it from the process.
What |
@tannewt Ok, that makes a lot of sense. How exactly am I supposed to format the whitespace? I'm referring to any __init__.c, I'll get you the exact error message in 1 sec |
Every line for the stubs should start with |
Ok, I've polished this up and switched Sphinx to using autoapi on top of the stubs. @jepler want to do a review for merge? |
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.
Besides the comment, I noticed that ulab doc is empty now. ulab is an oddball, it is just a rst file rather than a source file. There's a pyi file there, but its content still looks like it's restructuredtext. The fact that this is not showing an error during doc build is worrying; if it's treating it as pyi but the content is nonsense, the build should fail.
Documentation of "math" is missing.
There's a page for "protomatter" and there shouldn't be. It was renamed rgbmatrix, which is there.
The page _build/html/shared-bindings/help.html has jumbled content.
Links from support matrix to the module pages works, yay.
Deep links into the docs will be broken, but so be it.
As far as ulab goes, we should also check with v923z whether he wants pyi files upstream, though we can do that second and move the file out if desired. Originally he was not interested in adapting his documentation to CPy standards (which is fine), but we should make an overture anyhow. But that assumes the ulab doc is put into shape first.
I made the script error correctly and then fixed up ulab.
Fixed!
I don't see that on my local copy.
Looks like a rogue copyright header.
We do have the ability to load a bunch of redirects into ReadTheDocs if need-be. https://docs.readthedocs.io/en/stable/user-defined-redirects.html
@v923z See the .pyi files I added. |
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.
Thanks for addressing my comments!
Ok, removed the debug prints. |
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.
thanks
I am a bit late to the party, but here are my comments. A second movement, if you wish, since @jepler started out with the overture.
Having said these, I am not against change. I brought up this issue at the very beginning, with the argument that a single source would reduce the documentation effort. I could probably part with the jupyter notebook, but I would definitely like to retain what was mentioned in the third point. If we can come up with a reasonable scheme that is acceptable to all concerned, I will not stand in the way. |
No description provided.