Welcome! This guide explains how to set up a local development environment for contributing to pyadtpulse.
Before you start, ensure you have installed:
- Any supported version of Python3
- The newest version of Git
- A code editor (e.g., VSCode)
This project uses uv, a fast Python package manager, to manage dependencies.
If you don't have uv installed yet see the uv installation guide
Note: These steps will:
- Create the
.venvvirtual environment directory (even if it already exists) - Install all dependencies from uv.lock into the
.venv - Update .git/hooks/pre-commit to use pre-commit installed in your .venv
From the root of the project, run:
uv syncuv run pre-commit install
ctrl + shift + p (Command Pallet)Python: Select Interpreter- Select the environment to use. should be:
./.venv/bin/python
With uv, we don't need to activate the .venv to interact with it.
- new dependancies can be added using
uv add package_name - The .venv will be used automatically when running python scripts or packages using:
uv run ./script.pyoruv run pytest testsfor example
.python-version is used by uv to install the correct version of python in the .venv the requires-python field in pyproject.toml is used by uv to determine functioning versions of dependancies.
if the python version needs to be updated, the exact version to use should be updated in .python-version, and the pyproject.toml should be reviewed to ensure its criteria works with the .python-version
for example: if the pyproject.toml has requires-python == "3.13.3" and .python-version = 3.13.4, there will be issues.
uv build uv publish --token {{pypi_secret}}