Skip to content

Commit 795796b

Browse files
committed
Rename to pipelinechain
1 parent 1562794 commit 795796b

File tree

7 files changed

+18
-16
lines changed

7 files changed

+18
-16
lines changed

.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
pull_request:
55
paths:
66
- 'tests/**.py'
7-
- 'borkpipeline/**.py'
7+
- 'pipelinechain/**.py'
88
push:
99
paths:
1010
- 'tests/**.py'
11-
- 'borkpipeline/**.py'
11+
- 'pipelinechain/**.py'
1212

1313
jobs:
1414
build:

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# BorkPipeline
1+
# PipelineChain
22

3-
[![Tests](https://github.com/borkweb/borkpipeline/workflows/Tests/badge.svg)](https://github.com/borkweb/borkpipeline/actions?query=branch%3Amain)
3+
[![Tests](https://github.com/borkweb/pipelinechain/workflows/Tests/badge.svg)](https://github.com/borkweb/pipelinechain/actions?query=branch%3Amain)
44

55
A Pipeline / [Chain of Responsibility](https://refactoring.guru/design-patterns/chain-of-responsibility) design pattern implementation based on [Laravel's Pipeline implementation](https://github.com/illuminate/pipeline/blob/master/Pipeline.python).
66

@@ -58,7 +58,7 @@ flowchart LR
5858
Install PyPipeline via pip:
5959

6060
```bash
61-
pip install borkpipeline
61+
pip install pipelinechain
6262
```
6363

6464
## Getting started
@@ -90,7 +90,7 @@ flowchart LR
9090
```
9191

9292
```python
93-
from borkpipeline.pipeline import Pipeline
93+
from pipelinechain import Pipeline
9494

9595
# Create a new pipeline instance.
9696
pipeline = Pipeline()
@@ -126,7 +126,7 @@ flowchart LR
126126
```
127127

128128
```python
129-
from borkpipeline.pipeline import Pipeline
129+
from pipelinechain import Pipeline
130130

131131
# Create a new pipeline instance.
132132
pipeline = Pipeline()
@@ -169,7 +169,7 @@ flowchart LR
169169
```
170170

171171
```python
172-
from borkpipeline.pipeline import Pipeline
172+
from pipelinechain import Pipeline
173173

174174
pipeline = Pipeline()
175175

@@ -226,7 +226,7 @@ flowchart LR
226226
```
227227

228228
```python
229-
from borkpipeline.pipeline import Pipeline
229+
from pipelinechain import Pipeline
230230

231231
pipeline = Pipeline().through([TitlePipe(), StripPipe()])
232232
result = pipeline.send(' hello world ').then_return()
@@ -272,7 +272,7 @@ flowchart LR
272272
```
273273

274274
```python
275-
from borkpipeline.pipeline import Pipeline
275+
from pipelinechain import Pipeline
276276

277277
pipeline = Pipeline().via('execute').through([StripPipe(), ReversePipe()])
278278
result = pipeline.send(' hello ').then_return()
@@ -288,7 +288,7 @@ can do this with a `return` statement!
288288
#### Example pipeline
289289

290290
```python
291-
from borkpipeline.pipeline import Pipeline
291+
from pipelinechain import Pipeline
292292

293293
def check_content(passable, next_pipe):
294294
if 'stop' in passable:
@@ -326,7 +326,7 @@ flowchart LR
326326
```
327327

328328
```python
329-
from borkpipeline.pipeline import Pipeline
329+
from pipelinechain import Pipeline
330330

331331
pipeline = Pipeline().through([str.strip, str.upper])
332332
result = pipeline.send(' hello world ').then(lambda x: len(x))

borkpipeline/__init__.py

Whitespace-only changes.

borkpipeline/pipeline.py renamed to pipelinechain/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from typing import Any, Callable, List, Optional, Union
2+
from dataclasses import dataclass
23
from functools import reduce
34
from inspect import signature
45

6+
@dataclass
57
class Pipeline:
68
"""
79
A Chain of Responsibility implementation adapted from https://github.com/stellarwp/pipeline

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ requires = ["setuptools>=61.0.0", "wheel"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "borkpipeline"
8+
name = "pipelinechain"
99
version = "1.0.0"
1010
description = "A library that implements the Chain of Responsibility pattern."
1111
readme = "README.md"
@@ -20,4 +20,4 @@ keywords = ["pipeline", "library"]
2020
requires-python = ">=3.8"
2121

2222
[project.urls]
23-
Homepage = "https://github.com/borkweb/borkpipeline"
23+
Homepage = "https://github.com/borkweb/pipelinechain"

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import find_packages, setup
22

33
setup(
4-
name='borkpipeline',
4+
name='pipelinechain',
55
packages=find_packages(),
66
version='1.0.0',
77
description='A library that implements the Chain of Responsibility pattern.',

tests/test_pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from borkpipeline.pipeline import Pipeline
1+
from pipelinechain import Pipeline
22
import unittest
33

44
class TestPipeline(unittest.TestCase):

0 commit comments

Comments
 (0)