Skip to content

Commit d355585

Browse files
committed
added dataset version to dataset.yml and switched cd.version() to read the dataset version from there
1 parent ec443af commit d355585

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

coderdata/dataset.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: "v0.1.4"
12
datasets:
23
beataml:
34
description: "Beat acute myeloid leukemia (BeatAML) focuses on acute myeloid leukemia tumor data. Data includes drug response, proteomics, and transcriptomics datasets."

coderdata/utils/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ def version() -> dict:
1919
dict
2020
Contains package and dataset build version.
2121
"""
22+
with resources.open_text('coderdata', 'dataset.yml') as f:
23+
data_information = yaml.load(f, Loader=yaml.FullLoader)
2224
return {
2325
'package' : __version__,
24-
'dataset' : f"{__version_tuple__[0]}.{__version_tuple__[1]}"
26+
# getting the dataset version from 'dataset.yml'
27+
'dataset' : data_information['version'],
28+
# exprapolating the dataset version from the api version number
29+
# 'dataset' : f"{__version_tuple__[0]}.{__version_tuple__[1]}"
2530
}
2631

2732

0 commit comments

Comments
 (0)