Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 1.39 KB

README.md

File metadata and controls

69 lines (47 loc) · 1.39 KB

Example Python Monorepo for poetry users

This is an example repository when you create monorepo by pants from repositories managed by poetry.

In order to run this repository, pants binary is necessary. Please install beforehand.

Configuration

Configuration of directories is shown below.

  • libs directory contains source code for in-house libraries.
    • In this example, fizzbuzz library is located.
  • projects directory contains source code for applications.
    • project_a refers to fizzbuzz library, but project_b does not.
.
├── libs
│   └── fizzbuzz
│       ├── fizzbuzz/
│       ├── pyproject.toml
│       ├── README.md
│       └── tests/
├── pants.toml
├── projects
│   ├── project_a
│   │   ├── pyproject.toml
│   │   └── src/
│   └── project_b
│       ├── pyproject.toml
│       └── src/

Example Goals

Test fizzbuzz library

pants libs/fizzbuzz ::

Format all files

pants fmt ::

Run project code

pants run projects/project_a/src/main.py -- --show-fizzbuzz

Generate lock files

pants generate-lockfiles

Refenrece