bbconf
BEDBASE project configuration package (agent)
What is this?
bbconf is a configuration and data management library for the BEDbase platform. It serves as the central backbone for all BEDbase tools and pipelines by:
- Reading and validating YAML configuration files
- Setting up and managing connections to PostgreSQL, Qdrant, S3, and PEPHub
- Loading ML models (Region2Vec, text embedders, sparse encoders, UMAP) used for BED file search
- Providing high-level Python interfaces for querying and managing BED files and BED sets
- Exposing a unified
BedBaseAgentobject that all downstream tools use to interact with the platform
Documentation: https://docs.bedbase.org/bedboss
Source Code: https://github.com/databio/bbconf
Installation
To install bbclient use this command:
pip install bbconf
or install the latest version from the GitHub repository:
pip install git+https://github.com/databio/bbconf.git
Quick start
from bbconf import BedBaseAgent
agent = BedBaseAgent(config="config.yaml")
# Access submodules
agent.bed # BED file operations
agent.bedset # BED set operations
agent.objects # Generic object/file operations
# Get platform statistics
stats = agent.get_stats()
print(stats.bedfiles_number, stats.bedsets_number)
Database migrations
bbconf uses Alembic to version the database
schema. The migration scripts live in bbconf/alembic, and alembic.ini (repo
root) is used for local CLI work. The first (baseline) revision is
8b0b706d0827; it reproduces exactly the schema that Base.metadata.create_all()
builds, including the pg_trgm extension and the trigram / partial / expression
indexes.
To update schema for desirable database, use different database url in alembic.ini,
otherwise run test database
Creating a new revision
After changing the models in bbconf/db_utils.py:
alembic revision --autogenerate -m "Describe your change"
Review the generated file. Alembic cannot autogenerate a few constructs used by
bbconf — the pg_trgm extension and expression-based indexes may need a manual
op.execute(...) — so always check the diff before committing.
Applying migrations
alembic upgrade head # upgrade to the latest revision
alembic downgrade -1 # roll back one revision
alembic current # show the DB's current revision
Running migrations automatically
To upgrade the database to head automatically when bbconf starts, set
run_migrations: true under the database section of the config file:
database:
host: localhost
port: 5432
user: postgres
password: docker
database: bedbase
run_migrations: true
Note: enable this only after the database has been stamped/upgraded to a known revision. Turning it on against an un-stamped existing database will fail on startup, because the baseline revision creates tables that already exist.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bbconf-0.15.0.tar.gz.
File metadata
- Download URL: bbconf-0.15.0.tar.gz
- Upload date:
- Size: 423.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c99540782ceddb570704f631f934b5676d7495219fb4e6a344b25f57b18c7dae
|
|
| MD5 |
f9fb08060869bc36a2b4f252eb75c84e
|
|
| BLAKE2b-256 |
0be70bce07372e58b1f5ae356e4658e57431b275807556473abe7201da24173e
|
Provenance
The following attestation bundles were made for bbconf-0.15.0.tar.gz:
Publisher:
python-publish.yml on databio/bbconf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bbconf-0.15.0.tar.gz -
Subject digest:
c99540782ceddb570704f631f934b5676d7495219fb4e6a344b25f57b18c7dae - Sigstore transparency entry: 2506811409
- Sigstore integration time:
-
Permalink:
databio/bbconf@c8ece776d959111dca5c36f1f44343c711c5723b -
Branch / Tag:
refs/tags/v0.15.0 - Owner: https://github.com/databio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c8ece776d959111dca5c36f1f44343c711c5723b -
Trigger Event:
release
-
Statement type:
File details
Details for the file bbconf-0.15.0-py3-none-any.whl.
File metadata
- Download URL: bbconf-0.15.0-py3-none-any.whl
- Upload date:
- Size: 66.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97a46586fcce42693e9ce0011e1fef4ee9545729c270149a6ecb4f7c49eaa4aa
|
|
| MD5 |
738f5423b3eb0dac8076484753ee7f34
|
|
| BLAKE2b-256 |
54b6ce1c9293cc5efa8ec6fb0c443d7a1fef9d7be4c28d5b2d3bdad0b6c4aae8
|
Provenance
The following attestation bundles were made for bbconf-0.15.0-py3-none-any.whl:
Publisher:
python-publish.yml on databio/bbconf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bbconf-0.15.0-py3-none-any.whl -
Subject digest:
97a46586fcce42693e9ce0011e1fef4ee9545729c270149a6ecb4f7c49eaa4aa - Sigstore transparency entry: 2506811451
- Sigstore integration time:
-
Permalink:
databio/bbconf@c8ece776d959111dca5c36f1f44343c711c5723b -
Branch / Tag:
refs/tags/v0.15.0 - Owner: https://github.com/databio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c8ece776d959111dca5c36f1f44343c711c5723b -
Trigger Event:
release
-
Statement type: