idc-index-data 23.2.4__tar.gz → 23.2.5__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 (22) hide show
  1. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/.gitignore +4 -11
  2. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/PKG-INFO +1 -1
  3. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/hatch_build.py +22 -0
  4. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/pyproject.toml +1 -0
  5. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/src/idc_index_data/_version.py +2 -2
  6. idc_index_data-23.2.4/src/idc_index_data/analysis_results_index.parquet +0 -0
  7. idc_index_data-23.2.4/src/idc_index_data/clinical_index.parquet +0 -0
  8. idc_index_data-23.2.4/src/idc_index_data/collections_index.parquet +0 -0
  9. idc_index_data-23.2.4/src/idc_index_data/sm_index.parquet +0 -0
  10. idc_index_data-23.2.4/src/idc_index_data/sm_instance_index.parquet +0 -0
  11. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/LICENSE +0 -0
  12. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/README.md +0 -0
  13. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/noxfile.py +0 -0
  14. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/scripts/python/generate-indices.py +0 -0
  15. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/scripts/python/idc_index_data_manager.py +0 -0
  16. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/scripts/python/update_idc_index_version.py +0 -0
  17. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/src/idc_index_data/__init__.py +0 -0
  18. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/src/idc_index_data/_version.pyi +0 -0
  19. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/src/idc_index_data/py.typed +0 -0
  20. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/tests/test_column_description_parser.py +0 -0
  21. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/tests/test_package.py +0 -0
  22. {idc_index_data-23.2.4 → idc_index_data-23.2.5}/tests/test_real_sql_parsing.py +0 -0
@@ -28,21 +28,14 @@ MANIFEST
28
28
 
29
29
  # Generated data files (created during build)
30
30
  idc_index.csv.zip
31
- idc_index.parquet
32
- prior_versions_index.parquet
31
+ *.parquet
33
32
 
34
33
  # Generated schema files (created during build)
35
34
  *_schema.json
36
35
 
37
- # Generated SQL files at project root (created during build)
38
- # Note: The source SQL files in scripts/sql and assets are tracked in git
39
- idc_index.sql
40
- prior_versions_index.sql
41
- collections_index.sql
42
- analysis_results_index.sql
43
- clinical_index.sql
44
- sm_index.sql
45
- sm_instance_index.sql
36
+ # Generated SQL files (created during build)
37
+ # Note: tracked SQL files already in the repo remain unaffected
38
+ *.sql
46
39
 
47
40
  # Auto-generated version file (created by hatch-vcs)
48
41
  src/idc_index_data/_version.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: idc-index-data
3
- Version: 23.2.4
3
+ Version: 23.2.5
4
4
  Summary: ImagingDataCommons index to query and download data.
5
5
  Project-URL: Homepage, https://github.com/ImagingDataCommons/idc-index-data
6
6
  Project-URL: Bug Tracker, https://github.com/ImagingDataCommons/idc-index-data/issues
@@ -6,6 +6,7 @@ import os
6
6
  import subprocess
7
7
  import sys
8
8
  from pathlib import Path
9
+ from typing import ClassVar
9
10
 
10
11
  from hatchling.builders.hooks.plugin.interface import BuildHookInterface
11
12
 
@@ -15,6 +16,24 @@ class IDCBuildHook(BuildHookInterface):
15
16
 
16
17
  PLUGIN_NAME = "custom"
17
18
 
19
+ PARQUET_WHITELIST: ClassVar[set[str]] = {
20
+ "idc_index.parquet",
21
+ "prior_versions_index.parquet",
22
+ }
23
+
24
+ def _prune_unwhitelisted_parquet_files(self) -> None:
25
+ """Remove parquet files not explicitly whitelisted from the package dir."""
26
+ package_dir = Path(self.root) / "src" / "idc_index_data"
27
+ if not package_dir.exists():
28
+ return
29
+
30
+ for parquet_file in package_dir.glob("*.parquet"):
31
+ if parquet_file.name not in self.PARQUET_WHITELIST:
32
+ parquet_file.unlink()
33
+ self.app.display_info(
34
+ f"Removed non-whitelisted parquet: {parquet_file.name}"
35
+ )
36
+
18
37
  def initialize(self, version: str, build_data: dict) -> None: # noqa: ARG002
19
38
  """
20
39
  Generate data files before build.
@@ -31,6 +50,9 @@ class IDCBuildHook(BuildHookInterface):
31
50
  - artifacts: List of additional files to include
32
51
  - force_include: Dict mapping source -> dest paths
33
52
  """
53
+ # Remove parquet files that are optional to reduce package size
54
+ self._prune_unwhitelisted_parquet_files()
55
+
34
56
  # 1. Validate environment
35
57
  if not os.environ.get("GCP_PROJECT"):
36
58
  self.app.display_warning("Skipping data generation: GCP_PROJECT not set")
@@ -77,6 +77,7 @@ version-file = "src/idc_index_data/_version.py"
77
77
 
78
78
  [tool.hatch.build.targets.wheel]
79
79
  packages = ["src/idc_index_data"]
80
+ ignore-vcs = true
80
81
 
81
82
  [tool.hatch.build.hooks.custom]
82
83
  module = "hatch_build:IDCBuildHook"
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '23.2.4'
32
- __version_tuple__ = version_tuple = (23, 2, 4)
31
+ __version__ = version = '23.2.5'
32
+ __version_tuple__ = version_tuple = (23, 2, 5)
33
33
 
34
34
  __commit_id__ = commit_id = None
File without changes