Skip to main content

create a standalone repo from a monorepo subdir.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mono2repo-0.1.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

mono2repo-0.1.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file mono2repo-0.1.2.tar.gz.

File metadata

  • Download URL: mono2repo-0.1.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mono2repo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f6b12fc0930198d4693821ed2832251417ac9cf3e9942f579af5a9cb187daf03
MD5 0f1b8f710402e3e79de85fea71a1c387
BLAKE2b-256 47089f4c3ff20ec3048308dcf5551b58dae1e2f8bda66ff43677d9f242ffd0f7

See more details on using hashes here.

File details

Details for the file mono2repo-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mono2repo-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mono2repo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4c0fe39f830134e24c81d11ca58efccb80de761f431e6c6d5c3572a1991b44a1
MD5 5f4dba5fdc284925726285f987072e02
BLAKE2b-256 c2f160bb65370507ca5b4be4d056b33580632e7f03d1caa6c3325f4e71cda417

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page