Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/cli-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
python-version: ["3.12"]
os: [ ubuntu-latest ] # can't use macOS when using service containers or container jobs
os: [ubuntu-latest] # can't use macOS when using service containers or container jobs
runs-on: ${{ matrix.os }}
services:
postgres:
Expand All @@ -24,23 +24,17 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install uv
run: pip install uv

- name: Install dev dependencies
run: if [ -f requirements/requirements-dev.txt ]; then uv pip install -r requirements/requirements-dev.txt --system; fi

- name: Install test dependencies
run: if [ -f requirements/requirements-test.txt ]; then uv pip install -r requirements/requirements-test.txt --system; fi

- name: Install package
run: uv pip install . --system
- name: Install package with test dependencies
run: uv pip install ".[test]" --system

- name: Run tests
run: coverage run -m pytest
Expand All @@ -55,4 +49,4 @@ jobs:
SMOKESHOW_GITHUB_CONTEXT: coverage
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
6 changes: 5 additions & 1 deletion .github/workflows/black.yml → .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- uses: psf/black@stable
with:
python-version: "3.12"
- run: pip install ruff
- run: ruff check .
- run: ruff format --check .
24 changes: 12 additions & 12 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ on:

jobs:
deploy:

runs-on: ubuntu-latest
name: upload release to PyPI
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: read
id-token: write

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
run: |
python setup.py sdist bdist_wheel

- name: Install build dependencies
run: python -m pip install --upgrade pip build

- name: Build package
run: python -m build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
19 changes: 7 additions & 12 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,18 @@ jobs:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: pip install uv

- name: Install dev dependencies
run: if [ -f requirements/requirements-dev.txt ]; then uv pip install -r requirements/requirements-dev.txt --system; fi

- name: Install test dependencies
run: if [ -f requirements/requirements-test.txt ]; then uv pip install -r requirements/requirements-test.txt --system; fi

- name: Install package
run: uv pip install . --system
- name: Install package with test dependencies
run: uv pip install ".[test]" --system

- name: Run pytest tests
run: pytest tests -x -vv
run: pytest tests -x -vv
20 changes: 0 additions & 20 deletions .pre-commit-config.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions MANIFEST.in

This file was deleted.

29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@

## What is this?

`bbconf` is a configuration and management tool for BEDbase, facilitating the reading of configuration files,
setting up connections to PostgreSQL, PEPhub, S3, and Qdrant databases, managing file paths, and storing transformer models.
It formalizes communication pathways for pipelines and downstream tools, ensuring seamless interaction."
`bbconf` is a configuration and data management library for the [BEDbase](https://bedbase.org) 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 `BedBaseAgent` object that all downstream tools use to interact with the platform

---

Expand All @@ -28,10 +32,27 @@ It formalizes communication pathways for pipelines and downstream tools, ensurin

To install `bbclient` use this command:
```
pip install bbclient
pip install bbconf
```
or install the latest version from the GitHub repository:
```
pip install git+https://github.com/databio/bbconf.git
```


## Quick start

```python
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)
```
3 changes: 1 addition & 2 deletions bbconf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

from bbconf.bbagent import BedBaseAgent

from ._version import __version__
from .const import PKG_NAME

__all__ = ["BedBaseAgent", "__version__"]
__all__ = ["BedBaseAgent"]

_LOGGER = logging.getLogger(PKG_NAME)
coloredlogs.install(
Expand Down
1 change: 0 additions & 1 deletion bbconf/_version.py

This file was deleted.

Loading