Skip to content

AI Engineering template repository using `uv` as python dependency/package manager.

License

Notifications You must be signed in to change notification settings

VectorInstitute/aieng-template-uv

Repository files navigation

AI Engineering template (with uv)


code checks integration tests docs codecov GitHub License

A template repo for AI Engineering projects (using python) and uv. This template is like our original AI Engineering template, however, unlike how that template uses poetry, this one uses uv for dependency management (as well as packaging and publishing).

🧑🏿‍💻 Developing

Installing dependencies

The development environment can be set up using uv. Hence, make sure it is installed and then run:

uv sync
source .venv/bin/activate

In order to install dependencies for testing (codestyle, unit tests, integration tests), run:

uv sync --dev
source .venv/bin/activate

If you're coming from poetry then you'll notice that the virtual environment is actually stored in the project root folder and is by default named as .venv. The other important note is that while poetry uses a "flat" layout of the project, uv opts for the the "src" layout. (For more info, see here)

Poetry to UV

The table below provides the uv equivalent counterparts for some of the more common poetry commands.

Poetry UV
poetry new <project-name> # creates new project uv init <project-name>
poetry install # installs existing project uv sync
poetry install --with docs,test uv sync --group docs --group test
poetry add numpy uv add numpy
poetry add pytest pytest-asyncio --groups dev uv add pytest pytest-asyncio --groups dev
poetry remove numpy uv remove numpy
poetry lock uv lock
poetry run <cmd> # runs cmd with the project venv uv run <cmd>
poetry build uv build
poetry publish uv publish
poetry cache clear pypi --all uv cache clean

For the full list of uv commands, you can visit the official docs.

Tidbit

If you're curious about what "uv" stands for, it appears to have been more or less chosen randomly.

About

AI Engineering template repository using `uv` as python dependency/package manager.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages