No project description provided
Project description
Poetry compose
A poetry plugin to manage multiple project from a single root, a-la monorepo.
Work in progress
This is a work in progress, you might find some bugs, some improvements and some annoyance. Do not hesitate to report them through github issues.
Getting started
Install plugin
poetry self add poetry-plugin-compose
Start linting all sub projects in a single line
poetry compose run flake8 .
or running pytest in every package that has it installed
poetry compose run -i pytest -- pytest -vvv
Project layout
Poetry compose is intended to run in a flat setup where each subdirectory that contains a pyproject.toml
file is considered a sub-project. Such as
database
__init__.py
pyproject.toml
database
__init__.py
tests
__init__.py
users
__init__.py
pyproject.toml
users
__init__.py
tests
__init__.py
profiles
__init__.py
pyproject.toml
profiles
__init__.py
tests
__init__.py
posts
__init__.py
pyproject.toml
posts
__init__.py
tests
__init__.py
scripts
run.sh
but poetry will recursively descend into every subdirectory, so you could have other setups such as
packages
database
__init__.py
pyproject.toml
database
__init__.py
tests
__init__.py
users
__init__.py
pyproject.toml
users
__init__.py
tests
__init__.py
profiles
__init__.py
pyproject.toml
profiles
__init__.py
tests
__init__.py
posts
__init__.py
pyproject.toml
posts
__init__.py
tests
__init__.py
scripts
run.sh
Dependencies
poetry compose supports finding dependency order of your packages and always compose commands in a valid order. poetry compose does not support circular dependencies though, and you should avoid them between your packages. You can find the computed dependency order using the following command:
poetry compose dependency-order
Linking two packages
the easiest way to link two sub packages is to cd into the dependent one and run the followng command:
cd profiles
poetry add -e ../users
local development
The recommended way to run plugin as you develop them is to install them in editable mode through poetry's packaged pip executable.
Example:
/Users/macbook/Library/"Application Support"/pypoetry/venv/bin/pip install -e ../poetry_multi_package
Documentation
Documentation is mostly generated from the command themselves. Also the root readme of the project serves as the welcome page of the docs. In order to sync the doc runs the following
cd scripts
poetry compose run -d scripts -- python generate_doc.py
Then to deploy
poetry compose run -d doc -- mkdocs gh-deploy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for poetry_plugin_compose-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a68ca690558a6074baf95b8f374f585a04dc04afcb809a16d78dfc6ff397a124 |
|
MD5 | 6f9f8ed59ab27d31c7cfd608dafdd969 |
|
BLAKE2b-256 | b4f8d4b727e5f4ac7455b7bb37fb802e1b54f503ba56ce4d6908014b60203b94 |
Hashes for poetry_plugin_compose-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f2ac21532fb5496846085310ff141b8c3d1f92e6bfe24fcc47f583a7bbc5026 |
|
MD5 | ca19c393f8e7a0d1c2c2ef83bb8673c2 |
|
BLAKE2b-256 | f17b22706e1835ee0f5cc41e57d0b45f129ed8fca5ab977ea72166c527b464da |