Skip to content
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

Micropython plugin NOVA #297

Open
14 of 28 tasks
elmot opened this issue Jul 23, 2024 · 8 comments
Open
14 of 28 tasks

Micropython plugin NOVA #297

elmot opened this issue Jul 23, 2024 · 8 comments
Labels
NOVA New UI and communication approach

Comments

@elmot
Copy link
Collaborator

elmot commented Jul 23, 2024

Let's build another UI for the plugin, closer to ideas implemented in Thonny:

@elmot elmot assigned lancelote and unassigned lancelote Jul 23, 2024
@lukaskremla
Copy link

Thank you for picking up support of this useful plugin again! The list of upcoming features looks great, I am really looking forward to the update.

Only two things to add, could we also get standalone support for ESP32 devices? They work through ESP8266 but I am not sure if that is the way they are meant to work. And talking about making the plugin more like Thonny, the flashing speed is sometimes quite slow for uploading larger files (websites that have over 1 mb can take a while to upload. Speeding up the flashing would also make working with this plugin more pleasant.

@elmot
Copy link
Collaborator Author

elmot commented Jul 24, 2024

Thanks, that's our plan, but we have a very low manpower now.
So any contribution, especially in testing, is more than welcome.

Standalone ESP32

Well, I tried ESP32 as ESP8266, and it more or less works.
Actually we hardly can keep up with all the boards and board variants, so I'd prefer make boards support more generic.
For best boards support, please push micropython guys to publish better stubs for their libraries.

flashing speed
Yeah, that's a problem. I hope that getting rid of adafruit-ampy should help a lot.
Out of my experiments, webrepl upload is drastically faster than serial, and I am focusing on that first. Thanks to ESP32 nature, that platform is going to be improved a lot.

@elmot elmot added the NOVA New UI and communication approach label Jul 24, 2024
@Josverl
Copy link
Contributor

Josverl commented Aug 23, 2024

For best boards support, please push micropython guys to publish better stubs for their libraries.

micropython-stubs maintainer here;
@elmot Can you be a little bit more specific on what you need ?
As far as I am aware you are currently bundling stubs that are mostly a few years old , while there are much newer versions that already work in PyCharm.

Im sure they are not perfect , but neither are outdated stubs.
If I know what you want , then it may be possible to close the gap with , and reduce effort overall.

@elmot
Copy link
Collaborator Author

elmot commented Aug 26, 2024

@Josverl, that's cool to see your encourage.
Yeah, now the stubs shipped are quite old, there were no active maintainers for a while.

I'd prefer to download the stubs from somewhere rather than keep ours inside the plugin. But don't see a reliable way to do that.

I think I have seen your repository, and I could not find the algorithm to find the best stub for a particular board.
Please help and give me the algorithm I can use.

@Josverl
Copy link
Contributor

Josverl commented Aug 26, 2024

Pip is your friend.

The stubs for all released versions are published to PyPI, so if you know the port, and optionally the board, you can use pip to install the stubs into a venv or folder.
pip install -U micropython-<port>[-<board>]stubs --no-user --target ./typings

For both boards and ports you need the identical names as used in the micropython repo.

Adding a version or requirements-dev.txt file makes that more repeatable.
see

I have rolled-my-own docs for pycharm configuration, But more than happy to add or integrate with this project on specific or alternate instructions.

Update:
I have automated the generation of the docpage that lists of all stub packages available on PyPI.
https://micropython-stubs.readthedocs.io/en/main/packages.html

@Josverl
Copy link
Contributor

Josverl commented Aug 26, 2024

One thing that is good about the manual updates that have been done on the stubs in this repo is that there contributors have taken the effort to improve the paramater and return type annotations beyond what I am able to generate automatically.
This was started by Howard Lovatt and continued by others, partly based on the micropython-stubs as is clear in several if not most of the stubs.
I do note that corresponding license has not been included, but I assume this has been an unintentional oversight.

I have ben considering to merge these annotations and @Overloads (back) into the micropython-stubs.
They will need to be verified against drift/differences with the current v1.23.0 ( and -preview) interfaces, either manually or automated. Whether or not I will actually do this will depend on the licensing , as I aim to keep the stubs under MIT license.

The plans in the MicroPython org are to 'adopt' the micropython-stubs and use them as the base for documentation (rather than the reverse) . While the the timelines are not quite clear, the intent is.

In the mean time I keep looking for improvements , this is something that could possibly reduce the effort here, while improving the quality overall.

@elmot
Copy link
Collaborator Author

elmot commented Aug 28, 2024

Thanks, that's goldy.
I am afraid this piece of work is a bit out of scope of NOVA, that's next step.
I'd now focus on the new UI and the communication level, and then to a new stub approach.

@Josverl
Copy link
Contributor

Josverl commented Aug 29, 2024

Makes sense, there are a few other options as well,
Tracking progress in the stubs repo : Josverl/micropython-stubs#762

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NOVA New UI and communication approach
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants