A command line client and functions for collation.
Project description
Pipelib
Pipelib is a library for creating pipelines. You can parse, compare, and order iterables. With Pipelib you can:
- Create a custom pipeline to parse and compare version strings
- Use a collection of provided sorting functions for custom sorts.
- Assemble different processing blocks to pre-process inputs first.
The initial ideas came from Singularity Registry HPC (shpc) that had a need to parse and compare version strings from docker container tags.
under development
Design
import pipelib.main.steps as steps
import pipelib.main.pipeline as pipeline
# A pipeline to process a list of strings
steps = (
# A step that converts everything to lowercase
steps.AllLowercase(),
# step that includes anything with "two"
(steps.ExcludeFilter(), {"filters": ['two']})
)
# Strings to process
items = ['item-ONE', 'item-TWO', 'item-two-THREE']
p = pipeline.Pipeline(steps)
# The updated and transformed items
updated = p.run(items)
# ['item-one']
TODO
- automated discovery of steps
- automated testing for structure / output of each test
- docstrings should have examples to show usage
- custom version parsing / comparson class
- pipeline steps will need a way to sort / compare / filter
Contributors
We use the all-contributors tool to generate a contributors graphic below.
Vanessasaurus 💻 |
License
This code is licensed under the MPL 2.0 LICENSE.
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
pipelib-0.0.0.tar.gz
(17.6 kB
view hashes)