Skip to content

Commit 3377d79

Browse files
Merge pull request #114 from databio/schema_bug
Schema bug
2 parents db1a226 + 1c07aa0 commit 3377d79

4 files changed

Lines changed: 44 additions & 37 deletions

File tree

bbconf/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import logging
2+
from importlib.metadata import version
23

34
import coloredlogs
45

56
from bbconf.bbagent import BedBaseAgent
67

78
from .const import PKG_NAME
89

9-
__all__ = ["BedBaseAgent"]
10+
__version__ = version(__package__)
11+
12+
__all__ = ["BedBaseAgent", "__version__"]
1013

1114
_LOGGER = logging.getLogger(PKG_NAME)
1215
coloredlogs.install(

bbconf/models/bed_models.py

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,28 @@ class BedStatsModel(BaseModel):
7878

7979

8080
class BedPEPHub(BaseModel):
81-
sample_name: str = ""
82-
genome: str = ""
83-
organism: str = ""
84-
species_id: str = ""
85-
cell_type: str = ""
86-
cell_line: str = ""
87-
assay: str = Field("", description="Experimental protocol (e.g. ChIP-seq)")
88-
library_source: str = Field(
81+
sample_name: str | None = ""
82+
genome: str | None = ""
83+
organism: str | None = ""
84+
species_id: str | None = ""
85+
cell_type: str | None = ""
86+
cell_line: str | None = ""
87+
assay: str | None = Field("", description="Experimental protocol (e.g. ChIP-seq)")
88+
library_source: str | None = Field(
8989
"", description="Library source (e.g. genomic, transcriptomic)"
9090
)
91-
genotype: str = Field("", description="Genotype of the sample")
92-
target: str = Field("", description="Target of the assay (e.g. H3K4me3)")
93-
antibody: str = Field("", description="Antibody used in the assay")
94-
treatment: str = Field(
91+
genotype: str | None = Field("", description="Genotype of the sample")
92+
target: str | None = Field("", description="Target of the assay (e.g. H3K4me3)")
93+
antibody: str | None = Field("", description="Antibody used in the assay")
94+
treatment: str | None = Field(
9595
"", description="Treatment of the sample (e.g. drug treatment)"
9696
)
97-
tissue: str = Field("", description="Tissue type")
98-
global_sample_id: str = Field("", description="Global sample identifier")
99-
global_experiment_id: str = Field("", description="Global experiment identifier")
100-
description: str = Field("", description="Description of the sample")
97+
tissue: str | None = Field("", description="Tissue type")
98+
global_sample_id: str | None = Field("", description="Global sample identifier")
99+
global_experiment_id: str | None = Field(
100+
"", description="Global experiment identifier"
101+
)
102+
description: str | None = Field("", description="Description of the sample")
101103

102104
model_config = ConfigDict(extra="allow", populate_by_name=True)
103105

@@ -107,35 +109,34 @@ class StandardMeta(BaseModel):
107109
Standardized Bed file metadata
108110
"""
109111

110-
species_name: str = Field(
111-
default="", description="Name of species. e.g. Homo sapiens.", alias="organism"
112+
species_name: str | None = Field(
113+
default=None,
114+
description="Name of species. e.g. Homo sapiens.",
115+
alias="organism",
112116
)
113117
species_id: str = ""
114118
genotype: str = Field("", description="Genotype of the sample")
115119
phenotype: str = Field("", description="Phenotype of the sample")
116120
description: str | None = ""
117121

118-
cell_type: str = Field(
119-
"",
122+
cell_type: str | None = Field(
123+
None,
120124
description="specific kind of cell with distinct characteristics found in an organism. e.g. Neurons, Hepatocytes, Adipocytes",
121125
)
122-
cell_line: str = Field(
123-
"",
126+
cell_line: str | None = Field(
127+
None,
124128
description="population of cells derived from a single cell and cultured in the lab for extended use, e.g. HeLa, HepG2, k562",
125129
)
126-
tissue: str = Field("", description="Tissue type")
130+
tissue: str | None = Field(None, description="Tissue type")
127131

128-
library_source: str = Field(
129-
"", description="Library source (e.g. genomic, transcriptomic)"
130-
)
131-
assay: str = Field(
132-
"",
133-
description="Experimental protocol (e.g. ChIP-seq)",
132+
library_source: str | None = Field(
133+
None, description="Library source (e.g. genomic, transcriptomic)"
134134
)
135-
antibody: str = Field("", description="Antibody used in the assay")
136-
target: str = Field("", description="Target of the assay (e.g. H3K4me3)")
137-
treatment: str = Field(
138-
"", description="Treatment of the sample (e.g. drug treatment)"
135+
assay: str | None = Field(None, description="Experimental protocol (e.g. ChIP-seq)")
136+
antibody: str | None = Field(None, description="Antibody used in the assay")
137+
target: str | None = Field(None, description="Target of the assay (e.g. H3K4me3)")
138+
treatment: str | None = Field(
139+
None, description="Treatment of the sample (e.g. drug treatment)"
139140
)
140141

141142
global_sample_id: list[str] | None = Field(
@@ -145,7 +146,7 @@ class StandardMeta(BaseModel):
145146
None, description="Global experiment identifier. e.g. GSE000"
146147
) # excluded in training
147148

148-
original_file_name: str = Field("", description="Original file name")
149+
original_file_name: str | None = Field(None, description="Original file name")
149150

150151
model_config = ConfigDict(
151152
populate_by_name=True,

docs/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
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.
44

5+
### [0.14.10] - 2026-04-05
6+
### Fixed:
7+
- version info bug
58

69
### [0.14.9] - 2026-02-26
710
### Changed:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "bbconf"
3-
version = "0.14.9"
3+
version = "0.14.10"
44
description = "Configuration and data management tool for BEDbase"
55
readme = "README.md"
66
license = "BSD-2-Clause"
@@ -32,7 +32,7 @@ dependencies = [
3232
"zarr < 3.0.0",
3333
"pyyaml >= 6.0.1",
3434
"s3fs >= 2024.3.1",
35-
"pandas < 3.0.0",
35+
"pandas>2.0.0, < 3.0.0",
3636
"pybiocfilecache == 0.6.1",
3737
"umap-learn >= 0.5.8",
3838
"qdrant_client >= 1.16.1",

0 commit comments

Comments
 (0)