mtbls-mhd-integration 0.0.5__py3-none-any.whl → 0.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mtbls2mhd/__init__.py +1 -1
- mtbls2mhd/v0_1/legacy/builder.py +15 -5
- mtbls2mhd/v0_1/legacy/convertor.py +0 -8
- {mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/METADATA +1 -1
- {mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/RECORD +9 -9
- {mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/WHEEL +1 -1
- {mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/entry_points.txt +0 -0
- {mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/licenses/LICENSE +0 -0
- {mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/top_level.txt +0 -0
mtbls2mhd/__init__.py
CHANGED
mtbls2mhd/v0_1/legacy/builder.py
CHANGED
|
@@ -1840,7 +1840,7 @@ class MhdLegacyDatasetBuilder:
|
|
|
1840
1840
|
|
|
1841
1841
|
def build(
|
|
1842
1842
|
self,
|
|
1843
|
-
mhd_id: str,
|
|
1843
|
+
mhd_id: None | str,
|
|
1844
1844
|
mhd_output_folder_path: Path,
|
|
1845
1845
|
mtbls_study_id: str,
|
|
1846
1846
|
mtbls_study_path: Path,
|
|
@@ -1894,8 +1894,8 @@ class MhdLegacyDatasetBuilder:
|
|
|
1894
1894
|
error = f"{data.investigation_file_path} file does not have any study. Skipping..."
|
|
1895
1895
|
logger.warning(error)
|
|
1896
1896
|
return False, error
|
|
1897
|
+
db_metadata = data.study_db_metadata
|
|
1897
1898
|
if not revision:
|
|
1898
|
-
db_metadata = data.study_db_metadata
|
|
1899
1899
|
revision_date = (
|
|
1900
1900
|
datetime.datetime.strptime(db_metadata.revision_date, "%Y-%m-%d")
|
|
1901
1901
|
if db_metadata and db_metadata.revision_date
|
|
@@ -1942,7 +1942,7 @@ class MhdLegacyDatasetBuilder:
|
|
|
1942
1942
|
# TODO get revision, dataset_licence from study
|
|
1943
1943
|
mhd_builder = MhDatasetBuilder(
|
|
1944
1944
|
repository_name=repository_name,
|
|
1945
|
-
mhd_identifier=
|
|
1945
|
+
mhd_identifier=None,
|
|
1946
1946
|
repository_identifier=study.identifier,
|
|
1947
1947
|
schema_name=target_mhd_model_schema_uri,
|
|
1948
1948
|
profile_uri=target_mhd_model_profile_uri,
|
|
@@ -1970,6 +1970,16 @@ class MhdLegacyDatasetBuilder:
|
|
|
1970
1970
|
study.public_release_date,
|
|
1971
1971
|
data.study_db_metadata.release_date,
|
|
1972
1972
|
)
|
|
1973
|
+
public_release_date = (
|
|
1974
|
+
datetime.datetime.strptime(db_metadata.first_public_date, "%Y-%m-%d")
|
|
1975
|
+
if db_metadata and db_metadata.revision_date
|
|
1976
|
+
else None
|
|
1977
|
+
)
|
|
1978
|
+
submission_date = (
|
|
1979
|
+
datetime.datetime.strptime(db_metadata.first_public_date, "%Y-%m-%d")
|
|
1980
|
+
if db_metadata and db_metadata.first_private_date
|
|
1981
|
+
else None
|
|
1982
|
+
)
|
|
1973
1983
|
|
|
1974
1984
|
mhd_study = mhd_domain.Study(
|
|
1975
1985
|
repository_identifier=study.identifier,
|
|
@@ -1977,8 +1987,8 @@ class MhdLegacyDatasetBuilder:
|
|
|
1977
1987
|
mhd_identifier=mhd_id,
|
|
1978
1988
|
title=study.title,
|
|
1979
1989
|
description=study.description,
|
|
1980
|
-
submission_date=
|
|
1981
|
-
public_release_date=
|
|
1990
|
+
submission_date=submission_date,
|
|
1991
|
+
public_release_date=public_release_date,
|
|
1982
1992
|
dataset_url_list=[mtbls_study_repository_url],
|
|
1983
1993
|
)
|
|
1984
1994
|
|
|
@@ -36,14 +36,6 @@ class LegacyProfileV01Convertor(BaseMhdConvertor):
|
|
|
36
36
|
mtbls_study_path = Path(config.mtbls_studies_root_path) / Path(
|
|
37
37
|
repository_identifier
|
|
38
38
|
)
|
|
39
|
-
# cached_mtbls_model_files_root_path = Path("/tmp/mtbls2mhd") / Path(
|
|
40
|
-
# ".mtbls_model_cache"
|
|
41
|
-
# )
|
|
42
|
-
# cached_mtbls_model_files_root_path.mkdir(parents=True, exist_ok=True)
|
|
43
|
-
# cache_file_name = mhd_identifier or repository_identifier
|
|
44
|
-
# cached_mtbls_model_file_path = cached_mtbls_model_files_root_path / Path(
|
|
45
|
-
# cache_file_name
|
|
46
|
-
# )
|
|
47
39
|
try:
|
|
48
40
|
success, message = mhd_dataset_builder.build(
|
|
49
41
|
mhd_id=mhd_identifier,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
mtbls2mhd/__init__.py,sha256=
|
|
1
|
+
mtbls2mhd/__init__.py,sha256=6olT1Yu2MjF4fiYjEEUo6rlu5zdyZoIfu0GwJFhKXvA,157
|
|
2
2
|
mtbls2mhd/config.py,sha256=BjOqAyfDhp9byoFjJz70xh4HRR8pu1yrm_5jweqygSI,2310
|
|
3
3
|
mtbls2mhd/convertor_factory.py,sha256=4loatqIRIvIhcaeIS0cSonJNYJu47o56ZllX6593ypk,1133
|
|
4
4
|
mtbls2mhd/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -8,16 +8,16 @@ mtbls2mhd/commands/create_mhd_file.py,sha256=0sDr-Cm0JhhEB5V1g66uoag3rlcaAnGP8Md
|
|
|
8
8
|
mtbls2mhd/commands/validate.py,sha256=iwIKegviRxdH0r8scRXbDISlwQUzAq5uVoCHinU7x6Q,473
|
|
9
9
|
mtbls2mhd/v0_1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
mtbls2mhd/v0_1/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
mtbls2mhd/v0_1/legacy/builder.py,sha256=
|
|
12
|
-
mtbls2mhd/v0_1/legacy/convertor.py,sha256=
|
|
11
|
+
mtbls2mhd/v0_1/legacy/builder.py,sha256=XySknfa0W40H4x1b9XrLD_fBf7zCWrZx__54nQCAp2g,85783
|
|
12
|
+
mtbls2mhd/v0_1/legacy/convertor.py,sha256=M4-3NB56C0DN8H5vmM0yC0J_qW87ZImjjL1vzDEBc5s,2208
|
|
13
13
|
mtbls2mhd/v0_1/legacy/db_metadata_collector.py,sha256=4OyA_KD2X2zr7AHn8pQZJ0Y2_bW5r2_2wgTtQ93LM6A,13193
|
|
14
14
|
mtbls2mhd/v0_1/legacy/folder_metadata_collector.py,sha256=1lELGwTsr12nBGwTog_Z8qi9dLt4awma56vBYoI678k,7439
|
|
15
15
|
mtbls2mhd/v0_1/legacy/mtbls_study_schema.py,sha256=gUTbRmI8GfHI5leLiw8dxsmWnV3NnWw5RPX_LQWRFRQ,3162
|
|
16
16
|
mtbls2mhd/v0_1/ms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
mtbls2mhd/v0_1/ms/convertor.py,sha256=kLIUpxOrH6hcs2Y9Bq1D0Mdvypg40pLyEJpHtGj6H_g,89
|
|
18
|
-
mtbls_mhd_integration-0.0.
|
|
19
|
-
mtbls_mhd_integration-0.0.
|
|
20
|
-
mtbls_mhd_integration-0.0.
|
|
21
|
-
mtbls_mhd_integration-0.0.
|
|
22
|
-
mtbls_mhd_integration-0.0.
|
|
23
|
-
mtbls_mhd_integration-0.0.
|
|
18
|
+
mtbls_mhd_integration-0.0.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
19
|
+
mtbls_mhd_integration-0.0.7.dist-info/METADATA,sha256=G6riSBg2kLRmDrW6yDeXFCTULOvQCJ3HeofdF9LGzjg,682
|
|
20
|
+
mtbls_mhd_integration-0.0.7.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
21
|
+
mtbls_mhd_integration-0.0.7.dist-info/entry_points.txt,sha256=WQjM4flaYMyvHyv9zGKjCVk1i1_FGdNlhTmFVGgLgxs,61
|
|
22
|
+
mtbls_mhd_integration-0.0.7.dist-info/top_level.txt,sha256=b7pI95n6HIQMFXDD0yL1NwldiDc-XdeWql4Iw-uYygQ,10
|
|
23
|
+
mtbls_mhd_integration-0.0.7.dist-info/RECORD,,
|
{mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{mtbls_mhd_integration-0.0.5.dist-info → mtbls_mhd_integration-0.0.7.dist-info}/top_level.txt
RENAMED
|
File without changes
|