Skip to content

Commit 1222c85

Browse files
Add support instructions to README
1 parent 743676e commit 1222c85

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,20 @@ Simply making sure that the Python module is statically type checked is 95% of t
6060
work needed to be done to make the project work. The rest is just glue code to test
6161
the compiled code and package it.
6262

63-
### Help wanted!
63+
### Supported libraries
6464

65-
Currently only two modules have been migrated: `tomllib` and `difflib`.
65+
| Library | Supported |
66+
| ---------- | :-------: |
67+
| `tomllib` ||
68+
| `difflib` ||
69+
| `asyncio` | ⬜️ |
70+
| `urllib` | ⬜️ |
71+
| `zipfile` | ⬜️ |
72+
| `argparse` | ⬜️ |
73+
| `uuid` | ⬜️ |
6674

67-
PRs type checking other Python modules are welcome!
75+
**PRs type checking other Python modules are welcome!**
76+
Check the [How to add a library](#how-to-add-a-library) section on the exact steps.
6877

6978
## Local Development / Testing
7079

@@ -89,3 +98,16 @@ PRs type checking other Python modules are welcome!
8998
```
9099

91100
- Run `pytest compiled_tests` to run tests.
101+
102+
### How to add a library
103+
104+
Say you wanted to add the `heapq` library to the project. The steps will be as follows:
105+
106+
- verify `./build.py test heapq` passes. This will run the CPython test suite on the existing code.
107+
- Tweak the code and add annotations until `./build.py mypy heapq` passes.
108+
109+
Verify `./build.py test heapq` still passes.
110+
- Tweak the code until `./build.py mypyc heapq` passes.
111+
112+
Verify `./build.py test heapq` still passes.
113+
- Run `./build.py test_compiled heapq` to ensure the compiled version still passes all tests.

0 commit comments

Comments
 (0)