2024-08-28 13:35:21 -04:00
|
|
|
# AutoGen Python packages
|
2024-06-20 15:19:56 -04:00
|
|
|
|
2024-08-28 13:35:21 -04:00
|
|
|
See [`autogen-core`](./packages/autogen-core/) package for main functionality.
|
2024-08-29 09:46:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
**TL;DR**, run all checks with:
|
|
|
|
|
|
|
|
```sh
|
2024-10-09 08:05:44 +10:00
|
|
|
uv sync --all-extras
|
2024-08-29 09:46:06 -04:00
|
|
|
source .venv/bin/activate
|
2024-08-29 17:58:00 -04:00
|
|
|
poe check
|
2024-08-29 09:46:06 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
### Setup
|
|
|
|
|
|
|
|
- [Install `uv`](https://docs.astral.sh/uv/getting-started/installation/).
|
|
|
|
|
|
|
|
### Virtual environment
|
|
|
|
|
|
|
|
To get a shell with the package available (virtual environment),
|
|
|
|
in the current directory,
|
|
|
|
run:
|
|
|
|
|
|
|
|
```sh
|
2024-10-09 08:05:44 +10:00
|
|
|
uv sync --all-extras
|
2024-08-29 09:46:06 -04:00
|
|
|
source .venv/bin/activate
|
|
|
|
```
|
|
|
|
|
|
|
|
### Common tasks
|
|
|
|
|
|
|
|
- Format: `poe format`
|
|
|
|
- Lint: `poe lint`
|
|
|
|
- Test: `poe test`
|
|
|
|
- Mypy: `poe mypy`
|
|
|
|
- Pyright: `poe pyright`
|
|
|
|
- Build docs: `poe --directory ./packages/autogen-core/ docs-build`
|
|
|
|
- Auto rebuild+serve docs: `poe --directory ./packages/autogen-core/ docs-serve`
|
|
|
|
|
|
|
|
> [!NOTE]
|
|
|
|
> These need to be run in the virtual environment.
|
|
|
|
|
2024-08-29 10:29:12 -04:00
|
|
|
|
|
|
|
### Create new package
|
|
|
|
|
|
|
|
To create a new package, run:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
uv sync
|
|
|
|
source .venv/bin/activate
|
|
|
|
cookiecutter ./templates/new-package/
|
|
|
|
```
|