Skip to main content
PyPI version Python versions Build Black Coverage

This package (and related script) extracts the content of a subdirectory in a monorepo and it creates a stand alone repo (copying the related history).

Let say you have a monorepo with multiple projects (project1, project2 etc.) and we wan to make project1 a stand alone repo (retaining the project1 history):

monorepo/
├── README.TXT
├── misc
│   └── more
└── subfolder
    ├── project1           # <-- we want to extract this
    │   └── a
    │       ├── hello.txt
    │       └── subtree
    ├── project2
    └── project3

Using mono2repo to extract project1:

mono2repo init -v project1 monorepo/subfolder/project1

Will generate:

monorepo/
├── README.TXT
├── misc
...
project1/
└── a
    ├── hello.txt
    └── subtree

Installation

You can install mono2repo via pip from PyPI:

$ pip install mono2repo

Example

For this example we first create the summary repo from the main pelican monorepo, then we update the summary with the new upstream changes:

https://github.com/getpelican/pelican-plugins.git
....
└ summary/
 ├── Readme.rst
 └── summary.py

Create a new repo

First we create a new repo:

mono2repo init summary-extracted \
    https://github.com/getpelican/pelican-plugins.git/summary

Update the repo

Update the summary-extracted with the latest summary related changes:

mono2repo update summary-extracted

Release files for mono2repo 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mono2repo 0.1.2
File Size Uploaded
mono2repo-0.1.2.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mono2repo 0.1.2
File Interpreter ABI Platform
mono2repo-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / mono2repo-0.1.2.tar.gz

Download URL mono2repo-0.1.2.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f6b12fc0930198d4693821ed2832251417ac9cf3e9942f579af5a9cb187daf03
BLAKE2b-256 checksum
How to use checksums
47089f4c3ff20ec3048308dcf5551b58dae1e2f8bda66ff43677d9f242ffd0f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / mono2repo-0.1.2-py3-none-any.whl

Download URL mono2repo-0.1.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c0fe39f830134e24c81d11ca58efccb80de761f431e6c6d5c3572a1991b44a1
BLAKE2b-256 checksum
How to use checksums
c2f160bb65370507ca5b4be4d056b33580632e7f03d1caa6c3325f4e71cda417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page