Skip to content

riku-sakamoto/pants_example_python

Repository files navigation

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

About

Example python monorepo using pants

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published