How to Set Up a Development Environment
Setting up a development environment to work on a contribution or just play with the code is quite simple.
Clone the repo.
$ git clone https://codeberg.org/plotski/upsies && cd upsies
Create a virtual environment that contains upsies and its dependencies as well as any development tools like pytest, tox and ruff.
$ make venv
Activate the virtual environment.
$ source venv/bin/activate
Run
pytestto see if everything works as expected.$ pytest(Optional) Set up pyenv.
This is very useful to run tests with older as well as newer Python versions.
It’s not as easy as it should be and way too complicated to explain here, but there’s a tutorial: https://realpython.com/intro-to-pyenv/
If you have multiple Python versions installed, you can run the tests for each one like this:
$ tox
From time to time it is a good idea to install a fresh virtual environment to make sure all the latest versions are installed. I usually do this before making a new release.
$ make clean && make venv && source venv/bin/activate