From 356c6ad920ffcd6f013155b07541966b38217500 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Wed, 1 Apr 2026 16:30:16 -0400 Subject: [PATCH 1/8] Fixing return class bug --- bbconf/models/bed_models.py | 65 +++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/bbconf/models/bed_models.py b/bbconf/models/bed_models.py index d16d0c51..d85db81a 100644 --- a/bbconf/models/bed_models.py +++ b/bbconf/models/bed_models.py @@ -78,26 +78,26 @@ class BedStatsModel(BaseModel): class BedPEPHub(BaseModel): - sample_name: str = "" - genome: str = "" - organism: str = "" - species_id: str = "" - cell_type: str = "" - cell_line: str = "" - assay: str = Field("", description="Experimental protocol (e.g. ChIP-seq)") - library_source: str = Field( + sample_name: str | None = "" + genome: str | None = "" + organism: str | None = "" + species_id: str | None = "" + cell_type: str | None = "" + cell_line: str | None = "" + assay: str | None = Field("", description="Experimental protocol (e.g. ChIP-seq)") + library_source: str | None = Field( "", description="Library source (e.g. genomic, transcriptomic)" ) - genotype: str = Field("", description="Genotype of the sample") - target: str = Field("", description="Target of the assay (e.g. H3K4me3)") - antibody: str = Field("", description="Antibody used in the assay") - treatment: str = Field( + genotype: str | None = Field("", description="Genotype of the sample") + target: str | None = Field("", description="Target of the assay (e.g. H3K4me3)") + antibody: str | None = Field("", description="Antibody used in the assay") + treatment: str | None = Field( "", description="Treatment of the sample (e.g. drug treatment)" ) - tissue: str = Field("", description="Tissue type") - global_sample_id: str = Field("", description="Global sample identifier") - global_experiment_id: str = Field("", description="Global experiment identifier") - description: str = Field("", description="Description of the sample") + tissue: str | None = Field("", description="Tissue type") + global_sample_id: str | None = Field("", description="Global sample identifier") + global_experiment_id: str | None = Field("", description="Global experiment identifier") + description: str | None = Field("", description="Description of the sample") model_config = ConfigDict(extra="allow", populate_by_name=True) @@ -107,36 +107,29 @@ class StandardMeta(BaseModel): Standardized Bed file metadata """ - species_name: str = Field( - default="", description="Name of species. e.g. Homo sapiens.", alias="organism" + species_name: str | None = Field( + default=None, description="Name of species. e.g. Homo sapiens.", alias="organism" ) species_id: str = "" genotype: str = Field("", description="Genotype of the sample") phenotype: str = Field("", description="Phenotype of the sample") description: str | None = "" - cell_type: str = Field( - "", + cell_type: str | None = Field( + None, description="specific kind of cell with distinct characteristics found in an organism. e.g. Neurons, Hepatocytes, Adipocytes", ) - cell_line: str = Field( - "", + cell_line: str | None = Field( + None, description="population of cells derived from a single cell and cultured in the lab for extended use, e.g. HeLa, HepG2, k562", ) - tissue: str = Field("", description="Tissue type") + tissue: str | None = Field(None, description="Tissue type") - library_source: str = Field( - "", description="Library source (e.g. genomic, transcriptomic)" - ) - assay: str = Field( - "", - description="Experimental protocol (e.g. ChIP-seq)", - ) - antibody: str = Field("", description="Antibody used in the assay") - target: str = Field("", description="Target of the assay (e.g. H3K4me3)") - treatment: str = Field( - "", description="Treatment of the sample (e.g. drug treatment)" - ) + library_source: str | None = Field(None, description="Library source (e.g. genomic, transcriptomic)") + assay: str | None = Field(None, description="Experimental protocol (e.g. ChIP-seq)") + antibody: str | None = Field(None, description="Antibody used in the assay") + target: str | None = Field(None, description="Target of the assay (e.g. H3K4me3)") + treatment: str | None = Field(None, description="Treatment of the sample (e.g. drug treatment)") global_sample_id: list[str] | None = Field( None, description="Global sample identifier. e.g. GSM000" @@ -145,7 +138,7 @@ class StandardMeta(BaseModel): None, description="Global experiment identifier. e.g. GSE000" ) # excluded in training - original_file_name: str = Field("", description="Original file name") + original_file_name: str | None = Field(None, description="Original file name") model_config = ConfigDict( populate_by_name=True, From e883e446f8bd7ae8935e32912ce3e7bf64944c68 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Wed, 1 Apr 2026 16:31:49 -0400 Subject: [PATCH 2/8] fixed version fetch --- bbconf/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bbconf/__init__.py b/bbconf/__init__.py index 7452621d..8b9bc094 100644 --- a/bbconf/__init__.py +++ b/bbconf/__init__.py @@ -2,11 +2,14 @@ import coloredlogs +from importlib.metadata import version from bbconf.bbagent import BedBaseAgent from .const import PKG_NAME -__all__ = ["BedBaseAgent"] +__version__ = version(__package__) + +__all__ = ["BedBaseAgent", "__version__"] _LOGGER = logging.getLogger(PKG_NAME) coloredlogs.install( From aed6b7d59e97d8d020e20e467f259d840e5be124 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Thu, 2 Apr 2026 18:10:32 -0400 Subject: [PATCH 3/8] updated pandas version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3d331252..7d19db52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ "zarr < 3.0.0", "pyyaml >= 6.0.1", "s3fs >= 2024.3.1", - "pandas < 3.0.0", + "pandas>2.0.0, < 3.0.0", "pybiocfilecache == 0.6.1", "umap-learn >= 0.5.8", "qdrant_client >= 1.16.1", From 9effac0502664aa49dfc83f982d6afa0f05a0f6f Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Sun, 5 Apr 2026 19:00:09 -0400 Subject: [PATCH 4/8] updated version --- docs/changelog.md | 3 +++ pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 39ca0b25..2a6ceb2a 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format. +### [0.14.10] - 2026-04-05 +### Fixed: +- version info bug ### [0.14.9] - 2026-02-26 ### Changed: diff --git a/pyproject.toml b/pyproject.toml index 7d19db52..0e5a2aa5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "bbconf" -version = "0.14.9" +version = "0.14.10" description = "Configuration and data management tool for BEDbase" readme = "README.md" license = "BSD-2-Clause" From e6e8fd0edbeb74717905fceeeca3105721bab80b Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Sun, 5 Apr 2026 20:17:03 -0400 Subject: [PATCH 5/8] ruff lining --- bbconf/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bbconf/__init__.py b/bbconf/__init__.py index 8b9bc094..a5286f63 100644 --- a/bbconf/__init__.py +++ b/bbconf/__init__.py @@ -1,8 +1,8 @@ import logging +from importlib.metadata import version import coloredlogs -from importlib.metadata import version from bbconf.bbagent import BedBaseAgent from .const import PKG_NAME From 1c07aa0fbd8e444f90d41eee614c826976d0159e Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Sun, 5 Apr 2026 23:52:30 -0400 Subject: [PATCH 6/8] ruff format --- bbconf/models/bed_models.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bbconf/models/bed_models.py b/bbconf/models/bed_models.py index d85db81a..0bb9c192 100644 --- a/bbconf/models/bed_models.py +++ b/bbconf/models/bed_models.py @@ -96,8 +96,10 @@ class BedPEPHub(BaseModel): ) tissue: str | None = Field("", description="Tissue type") global_sample_id: str | None = Field("", description="Global sample identifier") - global_experiment_id: str | None = Field("", description="Global experiment identifier") - description: str | None = Field("", description="Description of the sample") + global_experiment_id: str | None = Field( + "", description="Global experiment identifier" + ) + description: str | None = Field("", description="Description of the sample") model_config = ConfigDict(extra="allow", populate_by_name=True) @@ -108,7 +110,9 @@ class StandardMeta(BaseModel): """ species_name: str | None = Field( - default=None, description="Name of species. e.g. Homo sapiens.", alias="organism" + default=None, + description="Name of species. e.g. Homo sapiens.", + alias="organism", ) species_id: str = "" genotype: str = Field("", description="Genotype of the sample") @@ -125,11 +129,15 @@ class StandardMeta(BaseModel): ) tissue: str | None = Field(None, description="Tissue type") - library_source: str | None = Field(None, description="Library source (e.g. genomic, transcriptomic)") + library_source: str | None = Field( + None, description="Library source (e.g. genomic, transcriptomic)" + ) assay: str | None = Field(None, description="Experimental protocol (e.g. ChIP-seq)") antibody: str | None = Field(None, description="Antibody used in the assay") target: str | None = Field(None, description="Target of the assay (e.g. H3K4me3)") - treatment: str | None = Field(None, description="Treatment of the sample (e.g. drug treatment)") + treatment: str | None = Field( + None, description="Treatment of the sample (e.g. drug treatment)" + ) global_sample_id: list[str] | None = Field( None, description="Global sample identifier. e.g. GSM000" From d040d04a8d7efeeca714b135ea6ae2fc38f17825 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Mon, 6 Apr 2026 00:08:20 -0400 Subject: [PATCH 7/8] Fixed failing tests --- bbconf/models/bed_models.py | 8 ++++---- tests/conftest.py | 2 +- tests/test_bedfile.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bbconf/models/bed_models.py b/bbconf/models/bed_models.py index 0bb9c192..c7056492 100644 --- a/bbconf/models/bed_models.py +++ b/bbconf/models/bed_models.py @@ -110,13 +110,13 @@ class StandardMeta(BaseModel): """ species_name: str | None = Field( - default=None, + default="", description="Name of species. e.g. Homo sapiens.", alias="organism", ) - species_id: str = "" - genotype: str = Field("", description="Genotype of the sample") - phenotype: str = Field("", description="Phenotype of the sample") + species_id: str | None = "" + genotype: str | None = Field("", description="Genotype of the sample") + phenotype: str | None = Field("", description="Phenotype of the sample") description: str | None = "" cell_type: str | None = Field( diff --git a/tests/conftest.py b/tests/conftest.py index 58466de1..f688d5fc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -105,7 +105,7 @@ def example_dict(): "promoterprox_frequency": 16, "promoterprox_percentage": 17, }, - metadata={"sample_name": "sample_name_1"}, + metadata={"sample_name": "sample_name_1", "species_name": "species_name", "species_id": "123"}, plots=plots, files=files, classification=classification, diff --git a/tests/test_bedfile.py b/tests/test_bedfile.py index 6312e29a..c6687574 100644 --- a/tests/test_bedfile.py +++ b/tests/test_bedfile.py @@ -215,7 +215,7 @@ def test_bed_update(self, bbagent_obj): with ContextManagerDBTesting(config=bbagent_obj.config, add_data=True): bed_file = bbagent_obj.bed.get(BED_TEST_ID, full=True) # assert bed_file.annotation.model_dump(exclude_defaults=True) == {} - assert bed_file.annotation.cell_line == "" + assert bed_file.annotation.cell_line is None new_metadata = { "cell_line": "K562", From 3d023fe93c691452c4410b57f7ca91b938e0663d Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Mon, 6 Apr 2026 00:08:57 -0400 Subject: [PATCH 8/8] fmt --- tests/conftest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index f688d5fc..85d0b01b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -105,7 +105,11 @@ def example_dict(): "promoterprox_frequency": 16, "promoterprox_percentage": 17, }, - metadata={"sample_name": "sample_name_1", "species_name": "species_name", "species_id": "123"}, + metadata={ + "sample_name": "sample_name_1", + "species_name": "species_name", + "species_id": "123", + }, plots=plots, files=files, classification=classification,