Season of Docs : MicroPython

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Cross platform code and docs

Post by pythoncoder » Wed Jul 15, 2020 4:53 am

aivarannamaa wrote:
Tue Jul 14, 2020 9:16 pm
...
One tricky issue is that different ports of MicroPython come with different set of modules which may include different functions. It would be great if the documentation work done on one port could be reused and tweaked for other ports...
I have developed a number of modules for MicroPython intended for general use across platforms. The task has become progressively harder as the number of platforms has increased. It is now virtually impossible to guarantee cross-platform operation because the ports have different features, a difference which is undocumented. I raised this RFC on the subject.

I appreciate that there are inevitable hardware issues. But you can't even guarantee that pure Python code will work cross-platform because core language features can be missing. This even applies to the Unix port, which I find baffling given that the original Raspberry Pi 1 had 500MB of RAM.

In response to the RFC, @Damien suggested a good solution. I suggest that anyone working on the docs might want to consider this issue.
Peter Hinch
Index to my micropython libraries.

v923z
Posts: 168
Joined: Mon Dec 28, 2015 6:19 pm

Re: Season of Docs : MicroPython

Post by v923z » Thu Jul 16, 2020 6:42 am

@jnanjeky I think, some of what you want to write up is already in https://micropython-usermod.readthedocs.io/en/latest/.

jnanjeky
Posts: 7
Joined: Mon May 11, 2020 6:26 pm

Re: Season of Docs : MicroPython

Post by jnanjeky » Thu Jul 23, 2020 3:35 pm

Yes, some of the information on internals is not so new. Its about recollecting relevant parts and added missing areas on the interpreter itself.

hlovatt
Posts: 68
Joined: Thu Aug 15, 2019 3:52 am
Location: Sydney

Re: Season of Docs : MicroPython

Post by hlovatt » Sat Jul 25, 2020 4:05 am

I have generated a couple of typesheds (type hint interfaces): `pyb.pyi` and `uarray.pyi`. The files are at https://github.com/hlovatt/PyBoardTypeshed and the code used to generate them is at https://github.com/hlovatt/PyBoardTypeshedGenerator. These are helpful for IDEs that understand types and/or show documentation: PyCharm, VSCode, etc.

Post Reply