xref: /aosp_15_r20/tools/external_updater/docs/dev.md (revision 3c875a214f382db1236d28570d1304ce57138f32)
1# external_updater developer documentation
2
3The documentation on this page is for developers of `external_updater`. If
4you're looking for user documentation, see the [README.md].
5
6## Development environment
7
8Development of `external_updater` requires a full checkout of the main branch of
9AOSP, and a lunched target (any target). See [Get started with Android
10Development] for a guide on setting up an AOSP build environment.
11
12Note: This project uses Python 3.11. You may find [pyenv] helpful for installing
13and managing multiple versions of Python.
14
15Not all the Python tools used here are available in AOSP. For managing those, we
16recommend using Poetry. To install the necessary Python dependencies:
17
18```bash
19$ poetry install
20```
21
22[README.md]: ../README.md
23[pyenv]: https://github.com/pyenv/pyenv
24[Get started with Android Development]: https://source.android.com/docs/setup
25
26## Development tasks
27
28The easiest way to activate the virtual environment is
29to create a nested shell with:
30
31```bash
32$ poetry shell
33```
34
35`poetry shell` will activate the virtual environment by creating a nested shell.
36To deactivate this virtual environment simply use `deactivate` or `exit`. If you
37prefer not to use `poetry shell`, you must prefix all Python commands with
38`poetry run`, e.g. `poetry run pytest`. It's easier to just use `poetry shell`.
39
40Run the type checker and linter with `make lint`.
41
42Run the tests with `make test`.
43
44Run all of the above with `make check` or just `make`.
45