Zephyr
Zephyr is a command-line utility that provides project and component scaffolding to build modular pipelines.
What is Zephyr
Zephyr allows you to quickly bootstrap boilerplate code at the project and module level by leveraging
cookiecutter. Zephyr also provides a way to bootstrap modular pipelines by converting a list of modules into a Metaflow pipeline.
Using Zephyr
Getting up and running with Zephyr is easy
Installing Zephyr
Install zephyr from pypi
pip install zephyr-bootstrap
Bootstrap project
To start simply use...
zephyr init
Follow the prompts to create a sample project
2021-05-25 21:38:16,467 | INFO : initializing project...
app_name [my_project]:
desc [My project Description]:
Project my_project created
The project comes ready with a loaded Makefile, example notebook, and everything to build a library package.
ls my_project/
data docker-compose.yml docs Makefile my_project notebooks pipelines README.md requirements.txt setup.py tests VERSION
Custom template
You can also use custom cookiecutters to bootstrap a project
zephyr init --custom https://github.com/drivendata/cookiecutter-data-science
Create Module
Once a project is created, you can create a new module using...
zephyr module create
Follow the prompts to bootstap a module
2021-05-25 21:40:44,452 | INFO : Creating module...
module_name [my_module]:
desc [My module description]:
project_name [my_project]:
Module my_module created
The module comes ready with a buildable docker image, example script, and sample proccesing code.
ls my_project/modules/my_module/
build_docker.sh controller.py Dockerfile example.py __init__.py linux_packages.txt README.md requirements.txt sample_inputs sample_outputs tests
Custom template
You can also use custom cookiecutters to bootstrap a module
zephyr module create --custom https://github.com/audreyfeldroy/cookiecutter-pypackage
Delete module
Can remove a module using...
zephyr module delete
Follow promopts to remove module
Current modules: ['my_module']
Type module to delete: my_module
Do you want to delete my_module [y/N]: y
2021-05-25 21:43:27,450 | INFO : Deleting module...my_module
Module my_module deleted
Pipeline
Can create a modular pipeline using...
zephyr pipeline create
Select what modules you want, by following the prompts
2021-05-25 21:53:59,024 | INFO : Creating pipeline...
Current modules: ['my_module', 'test_mod', 'mod_1', 'mod_2']
Enter comma sepearted modules for pipeline: mod_1,mod_2,my_module
Do you want to continue? with these modules: ['mod_1', 'mod_2', 'my_module'] [Y/n]:
pipeline_name [my_pipeline]:
Pipeline created
Test with...
python pipelines/my_pipeline/my_pipeline_pipeline.py run
The bootstrapped pipeline is ready to run.
Metaflow 2.2.8 executing My_pipelineFlow for user:banjtheman
Validating your flow...
The graph looks good!
Running pylint...
Pylint is happy!
2021-05-25 21:54:27.950 Workflow starting (run-id 1621994067931797):
2021-05-25 21:54:27.955 [1621994067931797/start/1 (pid 29700)] Task is starting.
2021-05-25 21:54:28.779 [1621994067931797/start/1 (pid 29700)] 2021-05-25 21:54:28,779 |INFO: Start step
2021-05-25 21:54:28.864 [1621994067931797/start/1 (pid 29700)] Task finished successfully.
2021-05-25 21:54:28.868 [1621994067931797/mod_1_step/2 (pid 29708)] Task is starting.
2021-05-25 21:54:29.519 [1621994067931797/mod_1_step/2 (pid 29708)] 2021-05-25 21:54:29,519 |INFO: Starting module mod_1
2021-05-25 21:54:29.604 [1621994067931797/mod_1_step/2 (pid 29708)] Task finished successfully.
2021-05-25 21:54:29.609 [1621994067931797/mod_2_step/3 (pid 29716)] Task is starting.
2021-05-25 21:54:30.335 [1621994067931797/mod_2_step/3 (pid 29716)] 2021-05-25 21:54:30,334 |INFO: Starting module mod_2
2021-05-25 21:54:30.427 [1621994067931797/mod_2_step/3 (pid 29716)] Task finished successfully.
2021-05-25 21:54:30.432 [1621994067931797/my_module_step/4 (pid 29724)] Task is starting.
2021-05-25 21:54:31.081 [1621994067931797/my_module_step/4 (pid 29724)] 2021-05-25 21:54:31,081 |INFO: Starting module my_module
2021-05-25 21:54:31.178 [1621994067931797/my_module_step/4 (pid 29724)] Task finished successfully.
2021-05-25 21:54:31.183 [1621994067931797/end/5 (pid 29732)] Task is starting.
2021-05-25 21:54:31.863 [1621994067931797/end/5 (pid 29732)] 2021-05-25 21:54:31,862 |INFO: Job's done
2021-05-25 21:54:31.953 [1621994067931797/end/5 (pid 29732)] Task finished successfully.
2021-05-25 21:54:31.953 Done!
Metadata
Release files for zephyr-bootstrap 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| zephyr_bootstrap-0.0.2.tar.gz | 10.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zephyr_bootstrap-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.0 kB
Release files / zephyr_bootstrap-0.0.2.tar.gz
| Download URL | zephyr_bootstrap-0.0.2.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
000b282e855942614e26586d1172064b34c3c453c53c3e9efe6a93c8eae90de3
|
|
BLAKE2b-256 checksum How to use checksums |
296a1b70fbc0a64d23185a94473d95ac98e75dd3784b402fb7568b233e0087f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.6
|
Release files / zephyr_bootstrap-0.0.2-py3-none-any.whl
| Download URL | zephyr_bootstrap-0.0.2-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9fef3028631bdf624cd53e7b0f64d62c620e7a6b34eba8ad97b295da4ef15c4a
|
|
BLAKE2b-256 checksum How to use checksums |
7b63acc5a4e6dc78f9088ac0260b6f368890133235f5c56cc403982f9696f666
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.6
|
Security for zephyr-bootstrap 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.