Initialize the project

- describe how a local develop environment can be set up
- we use poetry to manage the project
  => add pyproject.toml and poetry.lock files
- add a package for the source code
  => "src" layout structure to ensure that pytest runs the tests
     against a packaged version installed in a virtual environment
     and not the *.py files in the project directory
     (Source: https://hynek.me/articles/testing-packaging/)
- ignore poetry's artifacts in git
This commit is contained in:
Alexander Hess 2024-09-10 01:15:36 +02:00
commit e832333ed9
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
5 changed files with 82 additions and 0 deletions

View file

@ -17,6 +17,34 @@ All contributions become open-source themselves, under the
[MIT license](https://github.com/webartifex/lalib/blob/main/LICENSE.txt).
### Local Develop Environment
In order to play with the `lalib` codebase,
you need to set up a develop environment on your own computer.
First, get your own copy of this repository:
`git clone git@github.com:webartifex/lalib.git`
While `lalib` comes without any dependencies
except core Python and the standard library for the user,
we assume a couple of packages and tools be installed
to ensure code quality during development.
These can be viewed in the
[pyproject.toml](https://github.com/webartifex/lalib/blob/main/pyproject.toml) file
and are managed with [poetry](https://python-poetry.org/docs/)
which needs to be installed as well.
`poetry` also creates and manages a
[virtual environment](https://docs.python.org/3/tutorial/venv.html)
with the develop tools,
and pins their exact installation versions in the
[poetry.lock](https://github.com/webartifex/lalib/blob/main/poetry.lock) file.
To replicate the project maintainer's develop environment, run:
`poetry install`
### Branching Strategy
The branches in this repository follow the