An opinionated CLI tool for Python monorepo MGMT.
Project description
Scream
What you do when you see a bunch of python... packages.
or...
An opinionated CLI tool for Python monorepo MGMT.
It's objective is to ease the creation, testing, and deploying of multiple python packages in a single repository. To ensure non-overlapping names with PYPI, this tool forces you to use namespace packages. Namespaces are defined according to python's pkgutil-style.
Highlights
- Creates a consistent blueprint for all packages in a single repository.
- Promotes code re-use.
- Consistent Styling.
- Consistent Testing / Linting / Docs.
- Uses tox to setup virtualenvs for tests.
- Pre-commit hooks to help prevent those gosh darn mistakes.
Commands
scream new <package_name>
- Creates new template package.scream test [--dry-run][--all]
- Installs a package.scream install <package_name>
- Test packages that have changed or who's dependencies have changed since master.scream build
- Builds a python wheel and bundles it with all it's dependencies as wheels.
Quickstart
mkdir mymonorepo
cd mymonorepo
scream init
scream new com_packagea
scream new com_packageb
scream test --all
coverage report
Using your monorepo packages
The two common ways you would install packages from this monorepo are:
- Using
scream build
in your CI tool to build packages and ship them to your machines. - Standard pip install individual packages to any machine from private or public github repos.
If your repository is public, you can simply install a subpackage anywhere using:
pip install 'git+ssh://git@github.com/ORG/REPO.git@master#subdirectory=examplea'
If your repository is private, you need a few extra steps to make sure packages that depend on other packages in this monorepo can be installed.
- Specify
dependency_links
in thesetup.cfg
for each 'local' dependency:
dependency_links =
git+ssh://git@github.com/ORG/REPO.git@master#egg=examplea-0#subdirectory=subpackages/examplea
- pip install as before, but specifiy the flag
--process-dependency-links
pip install 'git+ssh://git@github.com/ORG/REPO.git@master#subdirectory=examplea' --process-dependency-links
Important User Configs
- In your packages
setup.cfg
the variablepython_requires
determines which versions of python your package will be tested against.
Upcoming Features
- Auto version handling.
- Pre commit hook to flake8.
- Pre commit hook to avoid committing a large file.
- Docs builder
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 scream-0.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a29c365b62e80d2b3751676b190b8b6faa4b790a7be84cd526bc5081d0cd1c3 |
|
MD5 | 477ef6cb65961ba4164798fb89292246 |
|
BLAKE2b-256 | 4795da916f62906c29e0d7b652f75d96fe721e9686d79b3524539bb0182cfdbe |