Skip to main content

bclearer Pipeline Development Kit (PDK)

Licence: AGPL v3

The bCLEARer Pipeline Development Kit (PDK) bundles the libraries, scaffolding tools, and reference assets used to build semantic data pipelines on the bCLEARer platform. It delivers the core building blocks for configuration, data interoperability, orchestration, and ontology modelling so you can go from a pipeline blueprint to a running implementation quickly.

Highlights

  • Generate complete pipeline skeletons with the bclearer-pipeline-builder CLI (interactive authoring, JSON-driven creation, structural updates, and template extraction).
  • Connect to the ecosystems your pipelines touch: CSV/Excel/JSON, Delta Lake, PySpark, HDF5, MongoDB, MS Access, PostgreSQL, SQL Server, Neo4j, CozoDB, Raphtory, Enterprise Architect, and more.
  • Operate pipelines confidently with orchestration helpers covering app lifecycle management, UUID/identity services, logging, reporting, static analysis, version-control utilities, and unit-of-measure management.
  • Model your universe with the BNOP ontology module—our BORO Native Objects implementation featuring factories, relationship management, and XML migrations.

Workspace Packages

Package Path Highlights
bclearer-core libraries/core Configuration managers, canonical identifiers (CKIDs), pipeline stage definitions, and the pipeline builder engine + CLI.
bclearer-interop-services libraries/interop_services Data I/O adapters and transformations spanning DataFrames, parquet/delta, document stores, graph backends (Neo4j, Raphtory, CozoDB), RDBMS connectors, EA integrations, and session orchestration.
bclearer-orchestration-services libraries/orchestration_services Application runner wrappers, logging and reporting helpers, UUID generation, static code analysis, string/unicode tooling, unit-of-measure libraries, and version-control services.
bnop libraries/ontology BORO Native Objects (Python) ontology runtime with factories, facades, migrations, and serializers used across bCLEARer pipelines.

Repository Layout

  • pipelines/ – reference pipelines generated by the builder (template domain, BOSON, CFI, Uniclass).
  • documentation/ – architecture notes and feature blueprints (pipeline framework, Neo4j, Raphtory, universe designer, RDF/Jena, and more).
  • docker/ – container recipes for running services locally.
  • release_management/ – scripts supporting builds and releases.
  • ui/ – the React-based tooling used to drive pipeline authoring experiences.

Getting Started

Requires Python 3.12+.

WSL prerequisites

If running on WSL, install the ODBC driver library before installing Python dependencies:

sudo apt-get update && sudo apt-get install -y unixodbc-dev

Without this, pyodbc will fail with ImportError: libodbc.so.2: cannot open shared object file: No such file or directory.

Install the workspace (recommended)

pip install uv
uv sync
source .venv/bin/activate

uv sync installs all workspace members (bclearer-core, bclearer-interop-services, bclearer-orchestration-services, bnop) in editable mode.

Alternative: standard pip

python -m venv .venv
source .venv/bin/activate
pip install -e .

Install individual packages from PyPI if you only need a subset, for example pip install bclearer-core.

Pipeline builder CLI

The pipeline builder turns JSON (or interactive prompts) into a fully structured bCLEARer pipeline: domains, pipelines, thin slices, stages, sub-stages, orchestrators, and b-units.

# Generate a sample configuration file
bclearer-pipeline-builder sample --output pipeline_config.json

# Create a pipeline in the current directory
bclearer-pipeline-builder create --config pipeline_config.json --output ./pipelines

# Update an existing pipeline from configuration
bclearer-pipeline-builder update --config pipeline_config.json --pipeline ./pipelines/example_domain

# Extract templates from a curated pipeline
bclearer-pipeline-builder update-templates --template-path pipelines/template_pipeline

Run bclearer-pipeline-builder help or python -m bclearer_core.pipeline_builder help for the full command reference. The generated pipelines follow the bCLEARer pipeline framework.

Working with the libraries

Data interchange

from bclearer_interop_services.b_dictionary_service.table_as_dictionary_service import (
    TableAsDictionaryFromCsvFileReader,
    TableAsDictionaryToDataFrameConverter,
)

reader = TableAsDictionaryFromCsvFileReader()
table_dict = reader.read("data/example.csv")

converter = TableAsDictionaryToDataFrameConverter()
dataframe = converter.convert(table_dict)

Beyond CSV and DataFrames you will find adapters for Excel, JSON, XML, HDF5, Parquet/Delta Lake, PySpark sessions, MongoDB, MS Access, PostgreSQL, SQL Server, CozoDB, Neo4j, Raphtory, Enterprise Architect, filesystem snapshots, and more.

Ontology modelling

from bnop.bnop_facades import BnopFacades
from bclearer_orchestration_services.identification_services.uuid_service.uuid_helpers.uuid_factory import (
    create_new_uuid,
)

repository_uuid = create_new_uuid()

product_type = BnopFacades.create_new_bnop_type(repository_uuid)
product = BnopFacades.create_bnop_object(
    object_uuid=create_new_uuid(),
    owning_repository_uuid=repository_uuid,
    presentation_name="Example Product",
)

BnopFacades.write_bnop_object_to_xml("bnop_snapshot.xml")

Use CKIDs from bclearer_core.ckids to classify tuples and relationships when you need richer BORO semantics.

Orchestration helpers

from bclearer_orchestration_services.b_app_runner_service.b_application_runner import run_b_application

def bootstrap():
    print("hello bCLEARer")

run_b_application(bootstrap)

Complement this with utilities from identification_services, log_environment_utility_service, static_code_analysis_service, and version_control_services to manage runtime behaviour and governance.

Testing & quality gates

pytest                     # run the complete suite
pytest tests/unit_tests    # every unit suite in one process
pytest -m "not heavy"      # skip connectors that rely on external services
uv run ruff check .        # lint
uv run ruff format .       # format
uv run ruff format --check .   # what CI checks

One invocation is a supported shape

CI splits the unit tests across per-suite steps so each can carry its own coverage target. That split is for reporting. It is not a requirement, and pytest tests/unit_tests in a single process is expected to be green: measured at 659d2987, 1429 passed and 0 collection errors, both serially and under -n auto.

It was not always so. ONT-3404 recorded six collection ImportErrors in a single invocation and attributed them to the stdlib xml.etree being shadowed under an xdist worker. Re-measured, the cause was neither the stdlib nor xdist: a test module installed a hollow stand-in module at sys.modules["defusedxml.ElementTree"] at import time, and everything that imported iterparse from it later in the same process failed. sys.modules.setdefault does not protect against this, because sys.modules holds a submodule key only once something has imported that submodule.

Three things now hold it. The stand-in is guarded and aliases the real xml.etree.ElementTree. tests/unit_tests/ontology/bnop/rdf_jena/test_defusedxml_is_not_shadowed.py fails inside the ontology suite alone if a hollow module is ever installed again, which puts the guard in the suite that owns the defect rather than in whichever suite happens to be collected after it. And CI's combined step now also runs libraries/interop_services/tests/powerdesigner_interop_service, which was the one suite no invocation in ci.yml ever put in the same process as the ontology suite.

If a single invocation ever goes red again, that is a defect to fix, not a reason to split further. A split that hides an interaction is not a passing test suite, it is four smaller ones that never meet.

ruff is the only linter and the only formatter. black and isort were retired in ONT-3749: both were configured, neither was installed by any hook, and black disagreed with the committed tree on 2700 of its 4571 files.

pre-commit install is safe to run. The tree is ruff format clean, so the formatting hook rewrites nothing: pre-commit run ruff-format --all-files passes. The push hooks run the same test suites and the same ruff ratchet that CI runs.

One caveat, measured rather than assumed. The older trailing-whitespace and end-of-file-fixer hooks are not clean across the whole tree: pre-commit run --all-files fixes 164 files, almost all of them markdown, JSON snapshots and TypeScript, with 5 Python files carrying trailing blank lines that the formatter leaves alone. Those hooks only ever touch what you stage, and they only strip whitespace, so they cannot bury a change the way the retired black hook could. Cleaning them up is separate work.

Most tests live under libraries/*/tests. Heavy tests target databases or graph backends and are opt-in via the heavy marker.

Documentation & next steps

  • Architecture overview: documentation/bclearer_pipeline_framework.md
  • Feature workstreams: documentation/features/
  • UI tooling walkthroughs: documentation/ui/

Contributing

  1. Fork the repository and create a feature branch.
  2. Sync dependencies (uv sync or pip install -e .).
  3. Add tests where sensible and run the quality gates.
  4. Submit a pull request with context on the change.

We welcome issues and ideas—open a discussion in GitHub or drop us a line.

Licence

This project is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See LICENSE for the full text.

Commercial licences are available for organisations that cannot comply with the AGPL's network-use and source-disclosure terms. Contact support@ontoledgy.io for details.

Contact

Mesbah Khan — khanm@ontoledgy.io

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bclearer-0.5.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bclearer-0.5.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file bclearer-0.5.0.tar.gz.

File metadata

  • Download URL: bclearer-0.5.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for bclearer-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a892299d9e6280c5fd8f48742e6f07d29a62480d6e453a7f1bca2eeebf8254c8
MD5 101e78f5a4513627aefce17723c849c6
BLAKE2b-256 77db54f367505bc91b40fd70e49eab2a58623ab9bc8794d2057897d456c52c1c

See more details on using hashes here.

File details

Details for the file bclearer-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: bclearer-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for bclearer-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2cd511d7033a9ac0f2263c95397ce0d641ef6d3e919c2af1eeffb67a536ba09d
MD5 d4557c3e2eb29ba18e0a3d6af29a9dca
BLAKE2b-256 d12f0c84f6ddb3196927f1463ffbfac763fa060f9558c3558453c93da5849442

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page