Repo structure

This and sister repos

repo

Why

Where

example

micropython-stubber

needed to make stubs

in your source folder

develop/micropython-stubber

micropython-stubs

stores collected stubs

next to the stubber

develop/micropython-stubs

Note

  • recommended is to create a symlink from develop/micropython-stubber\all-stubs to develop/micropython-stubs

Structure of this repo

The file structure is based on my personal windows environment, but you should be able to adapt that without much hardship to you own preference and OS.

What

Details

Where

stub root

symlink to connect the 2 sister-repos

all_stubs

firmware stubber

MicroPython

board/createstubs.py

minified firmware stubber

MicroPython

minified/createstubs.py

PC based scripts

CPython

src/*

PC based scripts

CPython

process.py

pytest tests

test/*

Naming Convention and Stub folder structure

What

Why

Where

stub root

connect the 2 repos

all_stubs

cpython stubs for micropython core

adapt for differences between CPython and MicroPython

stubs/cpython-core

generated stub files

needed to use stubs

stubs/{firmware}-{port}-{version}-frozen

Frozen stub files

better code intellisense

stubs/{firmware}-{version}-frozen

Note: I found that, for me, using submodules caused more problems than it solved. So instead I link the two main repo’s using a symlink.

cd /develop 

git clone  https://github.com/josverl/micropython-stubber.git 
git clone  https://github.com/josverl/micropython-stubs.git 

cd micropython-stubber
poetry install

stubber clone