Metadata-Version: 2.1
Name: code-first-pipelines
Version: 0.8.0
Summary: A framework built on top of Ploomber that allows code-first definition of pipelines.
Author: Prediction and Learning at Simply Business
Author-email: pal@simplybusiness.co.uk
Requires-Python: >=3.8,<3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Provides-Extra: graphviz
Requires-Dist: cookiecutter
Requires-Dist: mlflow (>=1.26.0,<2.0.0)
Requires-Dist: ploomber (>=0.19.2,<0.20.0)
Requires-Dist: pygraphviz (>=1.9,<2.0); extra == "graphviz"
Requires-Dist: typer (>=0.4.1,<0.5.0)
Description-Content-Type: text/markdown

Code-First Pipelines
====================

A framework built on top of [Ploomber](https://ploomber.io/) that allows code-first definition of pipelines. 
**No YAML needed!**  

## Installation

TBA

## Usage

### ML Pipelines

```python
import pandas as pd
from cf_pipelines.ml import MLPipeline

my_pipeline = MLPipeline("My Cool Pipeline")

@my_pipeline.data_ingestion
def data_ingestion():
    input_data = pd.read_csv('input_data.csv')
    adult_data = input_data[input_data['age'] > 18]
    return {'adult_data.csv':adult_data}

my_pipeline.run()
```

See the [tutorial notebook](tutorials/Machine%20Learning%20Pipelines.ipynb) for a more comprehensive example.

## Getting started with a template 

Once installed, you can create a new pipeline template by running:

```shell
pipelines new [pipeline name]
```

## Development

### Extra dependencies

This project depends on Graphviz being installed in your system, follow the instructions [here](https://graphviz.org/download/).

We use [Poetry](https://python-poetry.org/) to manage this project's dependencies and virtual environment. 
Once cloned, just run `poetry install` to install them. Any time you want to work on this project, just run 
`poetry shell` to activate the virtual environment, and you will be ready.

We use some tools to enforce code formatting. To make sure your code meets these standards, run `make fmt` (this will 
modify the source files automatically) and then `make lint` to spot potential deficiencies.

Make sure you add tests for any new code contributed to this repo, and make sure you run all the tests with `make test`
before committing or opening a new pull request.

