diff options
author | Dan Albert <danalbert@google.com> | 2024-03-08 00:12:37 +0000 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2024-03-08 00:12:37 +0000 |
commit | f4e62eaac8c4cab4a79d01d0acc6eb31b33f2a0d (patch) | |
tree | 7918218fac4e506892b54b5e235cd2d63a2beb61 | |
parent | f70d40ae76f8f1362461f2dae47a8b5545056699 (diff) | |
download | external_updater-f4e62eaac8c4cab4a79d01d0acc6eb31b33f2a0d.tar.gz |
Restore dropped workflow docs.
Poetry doesn't solve all of these problems, it only manages the venv.
Restore the other docs that were dropped when poetry was added.
Bug: None
Test: None
Change-Id: Ib12e26be5f9916064752e0bfe3390c8c712416b1
-rw-r--r-- | docs/dev.md | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/dev.md b/docs/dev.md index 3612a46..d6647e9 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -9,7 +9,8 @@ Development of `external_updater` requires a full checkout of the main branch of AOSP, and a lunched target (any target). See [Get started with Android Development] for a guide on setting up an AOSP build environment. -Note: This project uses Python 3.11. +Note: This project uses Python 3.11. You may find [pyenv] helpful for installing +and managing multiple versions of Python. Not all the Python tools used here are available in AOSP. For managing those, we recommend using Poetry. To install the necessary Python dependencies: @@ -19,6 +20,7 @@ $ poetry install ``` [README.md]: ../README.md +[pyenv]: https://github.com/pyenv/pyenv [Get started with Android Development]: https://source.android.com/docs/setup ## Development tasks @@ -31,13 +33,12 @@ $ poetry shell ``` `poetry shell` will activate the virtual environment by creating a nested shell. -To deactivate this virtual environment simply use `deactivate` or `exit`. +To deactivate this virtual environment simply use `deactivate` or `exit`. If you +prefer not to use `poetry shell`, you must prefix all Python commands with +`poetry run`, e.g. `poetry run pytest`. It's easier to just use `poetry shell`. +Run the type checker and linter with `make lint`. -Poetry provides a `run` command to execute the given command inside the -project's virtual environment. As an example, execute the following command to -run Mypy on `base_updater.py`: +Run the tests with `make test`. -```bash -$ poetry run mypy base_updater.py -``` +Run all of the above with `make check` or just `make`. |