idc-index-data 22.1.3__tar.gz → 22.1.4__tar.gz

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.
Files changed (39) hide show
  1. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/PKG-INFO +1 -1
  2. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/assets/sm_instance_index.sql +8 -8
  3. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/pyproject.toml +1 -1
  4. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/scripts/python/idc_index_data_manager.py +9 -3
  5. idc_index_data-22.1.4/scripts/sql/analysis_results_index.sql +42 -0
  6. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/tests/test_real_sql_parsing.py +0 -12
  7. idc_index_data-22.1.3/scripts/sql/analysis_results_index.sql +0 -16
  8. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.git_archival.txt +0 -0
  9. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.gitattributes +0 -0
  10. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.github/CONTRIBUTING.md +0 -0
  11. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.github/copilot-instructions.md +0 -0
  12. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.github/dependabot.yml +0 -0
  13. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.github/matchers/pylint.json +0 -0
  14. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.github/workflows/cd.yml +0 -0
  15. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.github/workflows/ci.yml +0 -0
  16. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.github/workflows/external-indices.yml +0 -0
  17. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.gitignore +0 -0
  18. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.pre-commit-config.yaml +0 -0
  19. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/.readthedocs.yaml +0 -0
  20. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/CMakeLists.txt +0 -0
  21. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/LICENSE +0 -0
  22. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/README.md +0 -0
  23. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/assets/README.md +0 -0
  24. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/assets/clinical_index.sql +0 -0
  25. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/assets/sm_index.sql +0 -0
  26. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/docs/conf.py +0 -0
  27. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/docs/index.md +0 -0
  28. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/noxfile.py +0 -0
  29. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/pytest.ini +0 -0
  30. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/scripts/python/generate-indices.py +0 -0
  31. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/scripts/python/update_idc_index_version.py +0 -0
  32. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/scripts/sql/collections_index.sql +0 -0
  33. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/scripts/sql/idc_index.sql +0 -0
  34. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/scripts/sql/prior_versions_index.sql +0 -0
  35. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/src/idc_index_data/__init__.py +0 -0
  36. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/src/idc_index_data/_version.pyi +0 -0
  37. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/src/idc_index_data/py.typed +0 -0
  38. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/tests/test_column_description_parser.py +0 -0
  39. {idc_index_data-22.1.3 → idc_index_data-22.1.4}/tests/test_package.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: idc-index-data
3
- Version: 22.1.3
3
+ Version: 22.1.4
4
4
  Summary: ImagingDataCommons index to query and download data.
5
5
  Author-Email: Andrey Fedorov <andrey.fedorov@gmail.com>, Vamsi Thiriveedhi <vthiriveedhi@mgh.harvard.edu>, Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
6
6
  License: Copyright 2024 Andrey Fedorov
@@ -50,10 +50,10 @@ WITH
50
50
  SELECT
51
51
  # description:
52
52
  # unique identifier of the instance
53
- dicom_all.SOPInstanceUID,
53
+ dicom_all.SOPInstanceUID AS SOPInstanceUID,
54
54
  # description:
55
55
  # unique identifier of the series
56
- dicom_all.SeriesInstanceUID,
56
+ dicom_all.SeriesInstanceUID AS SeriesInstanceUID,
57
57
  -- Embedding Medium
58
58
  # description:
59
59
  # embedding medium used for the slide preparation
@@ -119,23 +119,23 @@ SELECT
119
119
  SAFE_CAST(SharedFunctionalGroupsSequence[SAFE_OFFSET(0)].PixelMeasuresSequence[SAFE_OFFSET(0)]. PixelSpacing[SAFE_OFFSET(0)] AS FLOAT64) AS PixelSpacing_0,
120
120
  # description:
121
121
  # DICOM ImageType attribute
122
- dicom_all.ImageType,
122
+ dicom_all.ImageType AS ImageType,
123
123
  # description:
124
124
  # DICOM TransferSyntaxUID attribute
125
- dicom_all.TransferSyntaxUID,
125
+ dicom_all.TransferSyntaxUID AS TransferSyntaxUID,
126
126
  # description:
127
127
  # size of the instance file in bytes
128
- dicom_all.instance_size,
128
+ dicom_all.instance_size AS instance_size,
129
129
  # description:
130
130
  # number of columns in the image
131
- dicom_all.TotalPixelMatrixColumns,
131
+ dicom_all.TotalPixelMatrixColumns AS TotalPixelMatrixColumns,
132
132
  # description:
133
133
  # number of rows in the image
134
- dicom_all.TotalPixelMatrixRows,
134
+ dicom_all.TotalPixelMatrixRows AS TotalPixelMatrixRows,
135
135
  -- attributes needed to retrieve the selected instances/files
136
136
  # description:
137
137
  # unique identifier of the instance within the IDC
138
- dicom_all.crdc_instance_uuid
138
+ dicom_all.crdc_instance_uuid AS crdc_instance_uuid
139
139
  FROM
140
140
  `bigquery-public-data.idc_v22.dicom_all` AS dicom_all
141
141
  LEFT JOIN
@@ -13,7 +13,7 @@ build-backend = "scikit_build_core.build"
13
13
 
14
14
  [project]
15
15
  name = "idc-index-data"
16
- version = "22.1.3"
16
+ version = "22.1.4"
17
17
  authors = [
18
18
  { name = "Andrey Fedorov", email = "andrey.fedorov@gmail.com" },
19
19
  { name = "Vamsi Thiriveedhi", email = "vthiriveedhi@mgh.harvard.edu" },
@@ -130,10 +130,16 @@ class IDCIndexDataManager:
130
130
  logger.debug(
131
131
  "Parsed description for column '%s': %s",
132
132
  column_name,
133
- description[:50] + "..."
134
- if len(description) > 50
135
- else description,
133
+ description,
136
134
  )
135
+ # throw exception if description is empty
136
+ if not description:
137
+ raise ValueError(
138
+ "Description for column '"
139
+ + column_name
140
+ + "' is empty, and empty descriptions are not allowed."
141
+ )
142
+
137
143
  else:
138
144
  i += 1
139
145
  else:
@@ -0,0 +1,42 @@
1
+ SELECT
2
+ # description:
3
+ # unique identifier of the analysis results collection
4
+ ID AS analysis_result_id,
5
+ # description:
6
+ # name of the analysis results collection
7
+ Title AS analysis_result_title,
8
+ # description:
9
+ # Digital Object Identifier (DOI) of the analysis results collection
10
+ source_doi,
11
+ # description:
12
+ # URL for the location of additional information about the analysis results collection
13
+ source_url,
14
+ # description:
15
+ # number of subjects analyzed in the analysis results collection
16
+ Subjects,
17
+ # description:
18
+ # collections analyzed in the analysis results collection
19
+ Collections,
20
+ # description:
21
+ # analysis artifacts included in the analysis results collection
22
+ AnalysisArtifacts,
23
+ # description:
24
+ # timestamp of the last update to the analysis results collection
25
+ Updated,
26
+ # description:
27
+ # license URL for the analysis results collection
28
+ license_url,
29
+ # description:
30
+ # license name for the analysis results collection
31
+ license_long_name,
32
+ # description:
33
+ # short name for the license of the analysis results collection
34
+ license_short_name,
35
+ # description:
36
+ # detailed description of the analysis results collection
37
+ Description,
38
+ # description:
39
+ # citation for the analysis results collection that should be used for acknowledgment
40
+ Citation
41
+ FROM
42
+ `bigquery-public-data.idc_v22.analysis_results_metadata`
@@ -84,18 +84,6 @@ def test_real_sql_files() -> None:
84
84
  else:
85
85
  print(f"✗ Missing expected column: {col}")
86
86
 
87
- # Test analysis_results_index.sql (should have no descriptions)
88
- analysis_sql_path = sql_dir / "analysis_results_index.sql"
89
- if analysis_sql_path.exists():
90
- with analysis_sql_path.open("r") as f:
91
- sql_query = f.read()
92
-
93
- descriptions = IDCIndexDataManager.parse_column_descriptions(sql_query)
94
- print("\n=== analysis_results_index.sql ===")
95
- print(f"Found {len(descriptions)} column descriptions (expected 0)")
96
- assert len(descriptions) == 0, "Expected no descriptions in this file"
97
- print("✓ Correctly found no descriptions")
98
-
99
87
 
100
88
  if __name__ == "__main__":
101
89
  test_real_sql_files()
@@ -1,16 +0,0 @@
1
- SELECT
2
- ID AS analysis_result_id,
3
- Title AS analysis_result_title,
4
- source_doi,
5
- source_url,
6
- Subjects,
7
- Collections,
8
- AnalysisArtifacts,
9
- Updated,
10
- license_url,
11
- license_long_name,
12
- license_short_name,
13
- Description,
14
- Citation
15
- FROM
16
- `bigquery-public-data.idc_v22.analysis_results_metadata`
File without changes