This guide outlines the setup process for our development environment, focusing on packaging and dependency management.
we use pre-commit to run RUFF.
We use Poetry as our primary tool for packaging and managing dependencies. Poetry provides a simple yet powerful way to manage project dependencies and publish packages.
For the most detailed and up-to-date information, please refer to the official Poetry 📚.
To ensure that Python CLI applications are installed globally on your system while being isolated in their own virtual environments, we utilize pipx
.
- First, install pipx following the instructions on the official website.
- Once pipx is installed, you can easily install Poetry by running the following command in your terminal:
pipx install poetry
- (optional) install vscode extension for poetry
poetry install
https://python-poetry.org/docs/repositories/
You can also work inside a docker container(devcontainer).
To make sure you have access/permissions inside the devcontainer.
From inside the devcontainer after launch, check user and take ownership:
whoami
sudo chown -R $USER:$USER /workspaces/ -R
other option is to run as root from within the devcontainer.json
"remoteUser": "root"
vulture for finding dead python 🐍
pipx run vulture . --exclude venv
deptry for checking dependencies
pipx run deptry .