Skip to content

Commit 1dc71a2

Browse files
Merge pull request #111 from databio/dev
Release 0.14.9
2 parents 94c3440 + db1a226 commit 1dc71a2

33 files changed

Lines changed: 1134 additions & 883 deletions

.github/workflows/cli-coverage.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
python-version: ["3.12"]
12-
os: [ ubuntu-latest ] # can't use macOS when using service containers or container jobs
12+
os: [ubuntu-latest] # can't use macOS when using service containers or container jobs
1313
runs-on: ${{ matrix.os }}
1414
services:
1515
postgres:
@@ -24,23 +24,17 @@ jobs:
2424
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v6
2828

29-
- uses: actions/setup-python@v5
29+
- uses: actions/setup-python@v6
3030
with:
3131
python-version: '3.12'
3232

3333
- name: Install uv
3434
run: pip install uv
3535

36-
- name: Install dev dependencies
37-
run: if [ -f requirements/requirements-dev.txt ]; then uv pip install -r requirements/requirements-dev.txt --system; fi
38-
39-
- name: Install test dependencies
40-
run: if [ -f requirements/requirements-test.txt ]; then uv pip install -r requirements/requirements-test.txt --system; fi
41-
42-
- name: Install package
43-
run: uv pip install . --system
36+
- name: Install package with test dependencies
37+
run: uv pip install ".[test]" --system
4438

4539
- name: Run tests
4640
run: coverage run -m pytest
@@ -55,4 +49,4 @@ jobs:
5549
SMOKESHOW_GITHUB_CONTEXT: coverage
5650
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5751
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
58-
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
52+
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ jobs:
88
steps:
99
- uses: actions/checkout@v6
1010
- uses: actions/setup-python@v6
11-
- uses: psf/black@stable
11+
with:
12+
python-version: "3.12"
13+
- run: pip install ruff
14+
- run: ruff check .
15+
- run: ruff format --check .

.github/workflows/python-publish.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ on:
66

77
jobs:
88
deploy:
9-
109
runs-on: ubuntu-latest
1110
name: upload release to PyPI
1211
permissions:
13-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
12+
contents: read
13+
id-token: write
1414

1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6
1717
- name: Set up Python
18-
uses: actions/setup-python@v5
18+
uses: actions/setup-python@v6
1919
with:
2020
python-version: '3.x'
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
25-
- name: Build and publish
26-
run: |
27-
python setup.py sdist bdist_wheel
21+
22+
- name: Install build dependencies
23+
run: python -m pip install --upgrade pip build
24+
25+
- name: Build package
26+
run: python -m build
27+
2828
- name: Publish package distributions to PyPI
29-
uses: pypa/gh-action-pypi-publish@release/v1
29+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/run-pytest.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,18 @@ jobs:
2727
- 5432:5432
2828
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2929
steps:
30-
- uses: actions/checkout@v4
31-
- name: Set up Python
32-
uses: actions/setup-python@v5
30+
- uses: actions/checkout@v6
31+
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v6
3334
with:
3435
python-version: ${{ matrix.python-version }}
3536

3637
- name: Install uv
3738
run: pip install uv
3839

39-
- name: Install dev dependencies
40-
run: if [ -f requirements/requirements-dev.txt ]; then uv pip install -r requirements/requirements-dev.txt --system; fi
41-
42-
- name: Install test dependencies
43-
run: if [ -f requirements/requirements-test.txt ]; then uv pip install -r requirements/requirements-test.txt --system; fi
44-
45-
- name: Install package
46-
run: uv pip install . --system
40+
- name: Install package with test dependencies
41+
run: uv pip install ".[test]" --system
4742

4843
- name: Run pytest tests
49-
run: pytest tests -x -vv
44+
run: pytest tests -x -vv

.pre-commit-config.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

MANIFEST.in

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212

1313
## What is this?
1414

15-
`bbconf` is a configuration and management tool for BEDbase, facilitating the reading of configuration files,
16-
setting up connections to PostgreSQL, PEPhub, S3, and Qdrant databases, managing file paths, and storing transformer models.
17-
It formalizes communication pathways for pipelines and downstream tools, ensuring seamless interaction."
15+
`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:
16+
17+
- Reading and validating YAML configuration files
18+
- Setting up and managing connections to PostgreSQL, Qdrant, S3, and PEPHub
19+
- Loading ML models (Region2Vec, text embedders, sparse encoders, UMAP) used for BED file search
20+
- Providing high-level Python interfaces for querying and managing BED files and BED sets
21+
- Exposing a unified `BedBaseAgent` object that all downstream tools use to interact with the platform
1822

1923
---
2024

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

2933
To install `bbclient` use this command:
3034
```
31-
pip install bbclient
35+
pip install bbconf
3236
```
3337
or install the latest version from the GitHub repository:
3438
```
3539
pip install git+https://github.com/databio/bbconf.git
3640
```
3741

42+
43+
## Quick start
44+
45+
```python
46+
from bbconf import BedBaseAgent
47+
48+
agent = BedBaseAgent(config="config.yaml")
49+
50+
# Access submodules
51+
agent.bed # BED file operations
52+
agent.bedset # BED set operations
53+
agent.objects # Generic object/file operations
54+
55+
# Get platform statistics
56+
stats = agent.get_stats()
57+
print(stats.bedfiles_number, stats.bedsets_number)
58+
```

bbconf/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
from bbconf.bbagent import BedBaseAgent
66

7-
from ._version import __version__
87
from .const import PKG_NAME
98

10-
__all__ = ["BedBaseAgent", "__version__"]
9+
__all__ = ["BedBaseAgent"]
1110

1211
_LOGGER = logging.getLogger(PKG_NAME)
1312
coloredlogs.install(

bbconf/_version.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)