-
Notifications
You must be signed in to change notification settings - Fork 1
Contributing MicroPython type stubs for Pyscript #1
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
Conversation
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
|
As I have been informed that my contributions are not welcome, and there was no response to this, I'm not sure what to do. @ntoll @WebReflection, feel free to let me know your interest. |
|
@Josverl I can only but apologise. These past few weeks have been manic. I'll engage with this first thing on Monday and we can figure out how to move forward. Thanks for your patience, and to be clear, your contributions ARE very much welcomed. |
|
No worry's, and no apologies or rush needed. I'll switch over the authorities path for building the wasm stub packages once it is merged. Likely some updates coming up with MicroPython v1.27.x , and may need to think how to clarify/integrate semver and Calver, and how to publish Calver to PiPI |
not sure what that refers to, but if it's about recent AI generated content and it wasn't AI but you then it's me that should apologies because I didn't follow any of that answer and it felt really automated ... unless I am misunderstanding all the things, in which case I'd like to understand where you have been informed about that but again, if it's my latest edit, I am sorry. edit I've now read the other discussion indeed and expanded more in there ... please don't feel not welcomed, as that wasn't the purpose of my reply in there, rather a "please don't do this" 'cause it doesn't properly help us moving forward, thanks again for your understanding. |
|
@Josverl I've just (finally) taken a look through this. Thank you so much for this most valuable contribution and I see no reason why these shouldn't be merged. Before merging I have just a couple of questions:
Any light you can shine on this would be most welcome! 🤗 |
Yes, but not from source, but at runtime.
Wrt to the integration of the documentation --> Docstrings. Im afraid that currently that is manual copy/paste+Edit. For micropyton i have hand coded a parser for rst to create Docstrings/ docstubs , but as you documentation is in .md, formatted differently that parser is no good for pyscript. The .Js reflected modules required a seperate approach as they (mostly) don't surface as Python constructable classes, but as instances. With a lot of inheritance. I think a relevant question before diving deeply into tooling is whether to:
Each has pros and cons, but I am in favor of maintaining the stubs, automated where possible, and maintain functional docs directly in the publishing format, with crossrefs between them. From the generating documentation from stubs there are several tools to either .MD or .RST For pyscript.com --> .pyi you may need a custom built parser, or a decent LLM, a good print, and a human review. |
|
I have limited understanding of how you generate documentation, but it may be something that we can hook into to feed/build some of the stubs. |
|
@Josverl thanks for the comprehensive context setting, really appreciate it. So there are two things going on here:
|
|
See #2 |
I created these stubs for the micropython-stub project,
but I think they are better at home in the pyscript org.
The stubs have been created using a combination of scripting, manual edits and and integration of snippets of documentation from the pyscript docs.
for the micropython version the docs are orginised in a parsable manner - I have not found the time to even attempt the same for pyscript as the documentation structure is significantly different.
Possibly the documentation or API reference could be created from the stubs, and integrated into the documentation. But that is a wider discussion.
Structure
@gregersn
As the incoming stubs or overlapping with, and I think more complete than the pre-existing stubs, I have moved them into a subfolder, as they may still be relevant to Pyscript + Cpython use.
what is your recommendation on this ?
Happy to adjust as needed.
Licensing
I publish all my stubs under the MIT License, but have no object to dual licensing under MIT and Apache