Experimental Polylith repo setup
Pyenv is a tool that allows you to install multiple versions of python in your system. This is useful if you want to use different versions of python for different projects.
Follow the instructions below to install pyenv correctly:
https://github.com/pyenv/pyenv/wiki#suggested-build-environment
https://github.com/pyenv/pyenv?tab=readme-ov-file#installation
https://github.com/pyenv/pyenv?tab=readme-ov-file#set-up-your-shell-environment-for-pyenv
git clone https://github.com/sykire/sykire.git
First cd
into the project directory and then run the following command:
pyenv install
Pipx is a tool that allow to install applications in isolated environments. This prevents conflicts between the dependencies of different applications.
Follow the instructions below to install pipx correctly: https://github.com/pypa/pipx?tab=readme-ov-file#install-pipx
Poetry is a tool that allow to manage python projects. It is used to manage dependencies, build, and publish python packages.
pipx install poetry
These plugins are required to use the polylith tool. Polylith is a tool that allow you to manage multiple projects in a single repository.
poetry self add poetry-multiproject-plugin
poetry self add poetry-polylith-plugin
The official Polylith documentation A Python implementation of the Polylith tool
We won't create a new workspace because we are already in a workspace. But if you want to create a new workspace, you can use the following command:
poetry poly create workspace --name=your-root-namespace --theme=loose
A brick is a component that can be used to build other components, bases, or projects. These are the compositional elements of the Polylith architecture.
poetry poly create component --name=your-component-name
Bases are applications that will serve as entry points for our systems. Example: a web application, REST API, library, etc.
poetry poly create base --name=your-base-name
Projects connect bases with configurations and provide a way to build, deploy, publish or run our systems. Example: docker, kubernetes, terraform, etc.
poetry poly create project --name=your-project-name
poetry poly info
poetry poly diff --short
poetry poly diff --bricks