Note
All the code katas are solved using Python. Most of the katas are configured in a similar way, using uv as package manager and python 3.12. Those katas that need extra or different configurations will have its specific instructions in the README file.
The project can be configured either by using pip
or pyenv
. Both ways will be explained.
Using pip
- Create a virtual environment:
python -m venv .venv
- Activate the virtual environment:
source .venv/bin/activate # Linux / Mac .venv\Scripts\activate # Windows
- Install the dependencies:
pip install -r requirements.txt
Using pyenv and uv
These instructions are extracted from pyenv documentation. You can find everything here
-
Install pyenv:
curl https://pyenv.run | bash
-
Set you bash profile to load pyenv. In my case I use fish:
set -Ux PYENV_ROOT $HOME/.pyenv fish_add_path $PYENV_ROOT/bin echo pyenv init - | source >> ~/.config/fish/config.fish
-
Select the python version you want to use:
pyenv install 3.12 pyenv local 3.12
-
Install the dependencies:
pip install uv uv sync --all-groups
To run the tests, execute one of the following commands:
pytest
or
uv run pytest kata_name/tests
Note
I tend to use a Makefile to store the most common commands. You can check the Makefile in the root of the project.