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.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd089da586a61a96e6a5280ca8d270b80c4209c9d75a66680525be4696b637d5 |
|
MD5 | 3c9f47463884190cdc48e2b916ef0345 |
|
BLAKE2b-256 | 6834260fb73a088ceadd045f2db64824857e2620a760057ae34095ade4b2fc24 |