Skip to content

Commit 866e095

Browse files
authored
readme: Add developer guidance section.
1 parent 0c31e0b commit 866e095

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MicroPython applications.
66

77
The libraries here fall into four categories corresponding to the four top-level directories:
88

9-
* **python-stdlib**: Compatible versions of modules from the [Python Standard Library](https://docs.python.org/3/library/). These should be drop-in replacements for the Python libraries, although many have reduced functionality or missing methods or classes (which may not be an issue for many most cases).
9+
* **python-stdlib**: Compatible versions of modules from the [Python Standard Library](https://docs.python.org/3/library/). These should be drop-in replacements for the Python libraries, although many have reduced functionality or missing methods or classes (which may not be an issue for many most cases).
1010

1111
* **python-ecosys**: Compatible, but reduced-functionality versions of modules from the larger Python ecosystem, for example that might be found in the [Python Package Index](https://pypi.org/).
1212

@@ -24,6 +24,29 @@ directory on your device.
2424

2525
Other libraries are packages, in which case you'll need to copy the directory instead. For example, to add `collections.defaultdict`, copy `collections/collections/__init__.py` and `collections.defaultdict/collections/defaultdict.py` to a directory named `lib/collections` on your device.
2626

27+
Developer Guidance
28+
------------------
29+
30+
To everyone interested in contributing here, thank you! While we might take a while to get back to you (resources / man-hours are tight) we do value your efforts.
31+
32+
To make reviews quicker & easier, please try to follow these guidelines as much as possible:
33+
34+
* Submit packages to the corect folder; in particular packages in `python-stdlib` should only have functions that match the api (or a subset thereof) of the cpython standard library equivalent. If you want to add extra functionality, please put that in a separate / companion package that can be submitted to a different folder.
35+
36+
* If you're adding changes / new packages that match existing cpython ones, please include a link to the matching cpython docs in the MR.
37+
38+
* For a new package, try to fill out the `setup.py` and `metadata.txt` as best you can, looking at other ones here as example.
39+
- In particular with `python-stdlib` packages, note whether it's a copy of the cpython module patched for compatibility vs a re-implementation to match the api.
40+
41+
* When pushing commits / opening MR's please try to match the format `package/name: Description of change.`
42+
Take a look at the git history [here](https://github.com/micropython/micropython-lib/commits/master) for examples.
43+
44+
* Unit tests are highly encouraged! Passing tests make for quicker reviews!
45+
46+
* Please run `pip3 install -U black; python3 tools/codeformat.py ./path/to/my/module` before committing changes to ensure the formatting matches the standard here.
47+
48+
* If you want / need to use your package faster than we can get back to you here, remember you're also more than welcome to keep your packages in personal repo's and [publish on PyPI](https://docs.micropython.org/en/latest/reference/packages.html) for use with upip! If you run into issues with this process you can still raise an issue here and we'll try to assist.
49+
2750
Future plans (and new contributor ideas)
2851
----------------------------------------
2952

0 commit comments

Comments
 (0)