iints-sdk-python35 0.1.9__tar.gz → 0.1.11__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 (101) hide show
  1. {iints_sdk_python35-0.1.9/src/iints_sdk_python35.egg-info → iints_sdk_python35-0.1.11}/PKG-INFO +15 -1
  2. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/README.md +14 -0
  3. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/pyproject.toml +2 -1
  4. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/__init__.py +1 -1
  5. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/cli/cli.py +94 -0
  6. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/__init__.py +6 -1
  7. iints_sdk_python35-0.1.11/src/iints/data/datasets.json +132 -0
  8. iints_sdk_python35-0.1.11/src/iints/data/registry.py +146 -0
  9. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11/src/iints_sdk_python35.egg-info}/PKG-INFO +15 -1
  10. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints_sdk_python35.egg-info/SOURCES.txt +2 -0
  11. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/LICENSE +0 -0
  12. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/setup.cfg +0 -0
  13. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/__init__.py +0 -0
  14. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/algorithm_xray.py +0 -0
  15. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/baseline.py +0 -0
  16. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/clinical_benchmark.py +0 -0
  17. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/clinical_metrics.py +0 -0
  18. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/clinical_tir_analyzer.py +0 -0
  19. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/diabetes_metrics.py +0 -0
  20. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/edge_performance_monitor.py +0 -0
  21. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/explainability.py +0 -0
  22. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/explainable_ai.py +0 -0
  23. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/hardware_benchmark.py +0 -0
  24. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/metrics.py +0 -0
  25. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/reporting.py +0 -0
  26. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/sensor_filtering.py +0 -0
  27. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/analysis/validator.py +0 -0
  28. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/api/__init__.py +0 -0
  29. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/api/base_algorithm.py +0 -0
  30. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/api/template_algorithm.py +0 -0
  31. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/assets/iints_logo.png +0 -0
  32. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/cli/__init__.py +0 -0
  33. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/__init__.py +0 -0
  34. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/__init__.py +0 -0
  35. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/battle_runner.py +0 -0
  36. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/correction_bolus.py +0 -0
  37. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/discovery.py +0 -0
  38. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/fixed_basal_bolus.py +0 -0
  39. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/hybrid_algorithm.py +0 -0
  40. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/lstm_algorithm.py +0 -0
  41. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/mock_algorithms.py +0 -0
  42. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/pid_controller.py +0 -0
  43. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/algorithms/standard_pump_algo.py +0 -0
  44. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/device.py +0 -0
  45. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/device_manager.py +0 -0
  46. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/devices/__init__.py +0 -0
  47. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/devices/models.py +0 -0
  48. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/patient/__init__.py +0 -0
  49. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/patient/models.py +0 -0
  50. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/patient/patient_factory.py +0 -0
  51. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/patient/profile.py +0 -0
  52. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/safety/__init__.py +0 -0
  53. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/safety/input_validator.py +0 -0
  54. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/safety/supervisor.py +0 -0
  55. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/simulation/__init__.py +0 -0
  56. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/simulation/scenario_parser.py +0 -0
  57. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/simulator.py +0 -0
  58. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/core/supervisor.py +0 -0
  59. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/adapter.py +0 -0
  60. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/column_mapper.py +0 -0
  61. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/demo/__init__.py +0 -0
  62. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/demo/demo_cgm.csv +0 -0
  63. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/importer.py +0 -0
  64. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/ingestor.py +0 -0
  65. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/quality_checker.py +0 -0
  66. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/universal_parser.py +0 -0
  67. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/virtual_patients/clinic_safe_baseline.yaml +0 -0
  68. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/virtual_patients/clinic_safe_hyper_challenge.yaml +0 -0
  69. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/virtual_patients/clinic_safe_hypo_prone.yaml +0 -0
  70. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/virtual_patients/clinic_safe_midnight.yaml +0 -0
  71. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/virtual_patients/clinic_safe_pizza.yaml +0 -0
  72. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/virtual_patients/clinic_safe_stress_meal.yaml +0 -0
  73. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/virtual_patients/default_patient.yaml +0 -0
  74. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/data/virtual_patients/patient_559_config.yaml +0 -0
  75. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/emulation/__init__.py +0 -0
  76. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/emulation/legacy_base.py +0 -0
  77. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/emulation/medtronic_780g.py +0 -0
  78. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/emulation/omnipod_5.py +0 -0
  79. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/emulation/tandem_controliq.py +0 -0
  80. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/highlevel.py +0 -0
  81. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/learning/__init__.py +0 -0
  82. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/learning/autonomous_optimizer.py +0 -0
  83. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/learning/learning_system.py +0 -0
  84. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/metrics.py +0 -0
  85. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/presets/__init__.py +0 -0
  86. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/presets/presets.json +0 -0
  87. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/templates/__init__.py +0 -0
  88. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/templates/default_algorithm.py +0 -0
  89. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/templates/scenarios/__init__.py +0 -0
  90. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/templates/scenarios/example_scenario.json +0 -0
  91. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/utils/__init__.py +0 -0
  92. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/utils/plotting.py +0 -0
  93. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/validation/__init__.py +0 -0
  94. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/validation/schemas.py +0 -0
  95. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/visualization/__init__.py +0 -0
  96. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/visualization/cockpit.py +0 -0
  97. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints/visualization/uncertainty_cloud.py +0 -0
  98. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints_sdk_python35.egg-info/dependency_links.txt +0 -0
  99. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints_sdk_python35.egg-info/entry_points.txt +0 -0
  100. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints_sdk_python35.egg-info/requires.txt +0 -0
  101. {iints_sdk_python35-0.1.9 → iints_sdk_python35-0.1.11}/src/iints_sdk_python35.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iints-sdk-python35
3
- Version: 0.1.9
3
+ Version: 0.1.11
4
4
  Summary: A pre-clinical Edge-AI SDK for diabetes management validation.
5
5
  Author-email: Rune Bobbaers <rune.bobbaers@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/python35/IINTS-SDK
@@ -91,6 +91,20 @@ Try the bundled demo data pack:
91
91
  iints import-demo --output-dir results/demo_import
92
92
  ```
93
93
 
94
+ Official real-world datasets (download on demand):
95
+ ```bash
96
+ iints data list
97
+ iints data info aide_t1d
98
+ iints data fetch aide_t1d
99
+ ```
100
+ Some datasets require approval and are marked as `request` in the registry.
101
+ `iints data info` prints BibTeX + citation text for easy referencing.
102
+
103
+ Offline sample dataset (no download required):
104
+ ```bash
105
+ iints data fetch sample --output-dir data_packs/sample
106
+ ```
107
+
94
108
  Or run the full demo workflow (import + run + report) in one script:
95
109
  ```bash
96
110
  python3 examples/demo_quickstart_flow.py
@@ -56,6 +56,20 @@ Try the bundled demo data pack:
56
56
  iints import-demo --output-dir results/demo_import
57
57
  ```
58
58
 
59
+ Official real-world datasets (download on demand):
60
+ ```bash
61
+ iints data list
62
+ iints data info aide_t1d
63
+ iints data fetch aide_t1d
64
+ ```
65
+ Some datasets require approval and are marked as `request` in the registry.
66
+ `iints data info` prints BibTeX + citation text for easy referencing.
67
+
68
+ Offline sample dataset (no download required):
69
+ ```bash
70
+ iints data fetch sample --output-dir data_packs/sample
71
+ ```
72
+
59
73
  Or run the full demo workflow (import + run + report) in one script:
60
74
  ```bash
61
75
  python3 examples/demo_quickstart_flow.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "iints-sdk-python35"
7
- version = "0.1.9"
7
+ version = "0.1.11"
8
8
  authors = [
9
9
  { name="Rune Bobbaers", email="rune.bobbaers@gmail.com" },
10
10
  ]
@@ -55,6 +55,7 @@ iints = [
55
55
  "templates/*.py",
56
56
  "templates/scenarios/*.json",
57
57
  "assets/*.png",
58
+ "data/*.json",
58
59
  "data/virtual_patients/*.yaml",
59
60
  "data/demo/*.csv",
60
61
  "presets/*.json",
@@ -3,7 +3,7 @@
3
3
  import pandas as pd # Required for type hints like pd.DataFrame
4
4
  from typing import Optional
5
5
 
6
- __version__ = "0.1.9"
6
+ __version__ = "0.1.11"
7
7
 
8
8
  # API Components for Algorithm Development
9
9
  from .api.base_algorithm import (
@@ -26,6 +26,13 @@ from iints.data.importer import (
26
26
  scenario_from_csv,
27
27
  scenario_from_dataframe,
28
28
  )
29
+ from iints.data.registry import (
30
+ load_dataset_registry,
31
+ get_dataset,
32
+ fetch_dataset,
33
+ DatasetFetchError,
34
+ DatasetRegistryError,
35
+ )
29
36
  from iints.validation import (
30
37
  build_stress_events,
31
38
  format_validation_error,
@@ -43,9 +50,11 @@ app = typer.Typer(help="IINTS-AF SDK CLI - Intelligent Insulin Titration System
43
50
  docs_app = typer.Typer(help="Generate documentation and technical summaries for IINTS-AF components.")
44
51
  presets_app = typer.Typer(help="Clinic-safe presets and quickstart runs.")
45
52
  profiles_app = typer.Typer(help="Patient profiles and physiological presets.")
53
+ data_app = typer.Typer(help="Official datasets and data packs.")
46
54
  app.add_typer(docs_app, name="docs")
47
55
  app.add_typer(presets_app, name="presets")
48
56
  app.add_typer(profiles_app, name="profiles")
57
+ app.add_typer(data_app, name="data")
49
58
 
50
59
  def _load_algorithm_instance(algo: Path, console: Console) -> iints.InsulinAlgorithm:
51
60
  if not algo.is_file():
@@ -847,6 +856,91 @@ def validate(
847
856
  console.print("[green]Scenario validation passed.[/green]")
848
857
 
849
858
 
859
+ @data_app.command("list")
860
+ def data_list():
861
+ """List official datasets and access requirements."""
862
+ console = Console()
863
+ datasets = load_dataset_registry()
864
+ table = Table(title="IINTS-AF Official Datasets", show_header=True, header_style="bold cyan")
865
+ table.add_column("ID", style="green")
866
+ table.add_column("Name", style="white")
867
+ table.add_column("Access", style="magenta")
868
+ table.add_column("Source", style="yellow")
869
+ for entry in datasets:
870
+ table.add_row(
871
+ entry.get("id", ""),
872
+ entry.get("name", ""),
873
+ entry.get("access", ""),
874
+ entry.get("source", ""),
875
+ )
876
+ console.print(table)
877
+
878
+
879
+ @data_app.command("info")
880
+ def data_info(
881
+ dataset_id: Annotated[str, typer.Argument(help="Dataset id (see `iints data list`)")],
882
+ ):
883
+ """Show metadata and access info for a dataset."""
884
+ console = Console()
885
+ try:
886
+ dataset = get_dataset(dataset_id)
887
+ except DatasetRegistryError as e:
888
+ console.print(f"[bold red]{e}[/bold red]")
889
+ raise typer.Exit(code=1)
890
+ console.print_json(json.dumps(dataset, indent=2))
891
+ citation = dataset.get("citation", {})
892
+ if citation:
893
+ text = citation.get("text")
894
+ bibtex = citation.get("bibtex")
895
+ if text:
896
+ console.print("\n[bold]Citation (text)[/bold]")
897
+ console.print(text)
898
+ if bibtex:
899
+ console.print("\n[bold]Citation (BibTeX)[/bold]")
900
+ console.print(bibtex)
901
+
902
+
903
+ @data_app.command("fetch")
904
+ def data_fetch(
905
+ dataset_id: Annotated[str, typer.Argument(help="Dataset id (see `iints data list`)")],
906
+ output_dir: Annotated[Optional[Path], typer.Option(help="Output directory (default: data_packs/official/<id>)")] = None,
907
+ extract: Annotated[bool, typer.Option(help="Extract zip files if present")] = True,
908
+ verify: Annotated[bool, typer.Option(help="Verify SHA-256 if available and emit SHA256SUMS.txt")] = True,
909
+ ):
910
+ """Download a dataset (public-download only)."""
911
+ console = Console()
912
+ try:
913
+ dataset = get_dataset(dataset_id)
914
+ except DatasetRegistryError as e:
915
+ console.print(f"[bold red]{e}[/bold red]")
916
+ raise typer.Exit(code=1)
917
+
918
+ if output_dir is None:
919
+ output_dir = Path("data_packs") / "official" / dataset_id
920
+ output_dir = output_dir.expanduser()
921
+ if not output_dir.is_absolute():
922
+ output_dir = (Path.cwd() / output_dir).resolve()
923
+ else:
924
+ output_dir = output_dir.resolve()
925
+
926
+ access = dataset.get("access", "manual")
927
+ landing = dataset.get("landing_page", "")
928
+ if access in {"request", "manual"}:
929
+ console.print("[yellow]Manual download required for this dataset.[/yellow]")
930
+ if landing:
931
+ console.print(f"Source: {landing}")
932
+ console.print("After downloading, place files in:")
933
+ console.print(f" {output_dir}")
934
+ return
935
+
936
+ try:
937
+ downloaded = fetch_dataset(dataset_id, output_dir=output_dir, extract=extract, verify=verify)
938
+ console.print(f"[green]Downloaded {len(downloaded)} file(s) to {output_dir}[/green]")
939
+ except DatasetFetchError as e:
940
+ console.print(f"[bold red]{e}[/bold red]")
941
+ raise typer.Exit(code=1)
942
+
943
+
850
944
  @app.command("import-data")
851
945
  def import_data(
852
946
  input_csv: Annotated[Path, typer.Option(help="Path to CGM CSV file")],
@@ -18,6 +18,7 @@ from .importer import (
18
18
  )
19
19
  from .quality_checker import DataQualityChecker, QualityReport, DataGap, DataAnomaly
20
20
  from .universal_parser import UniversalParser, StandardDataPack, ParseResult
21
+ from .registry import load_dataset_registry, get_dataset, list_dataset_ids, fetch_dataset
21
22
 
22
23
  __all__ = [
23
24
  'DataAdapter',
@@ -38,5 +39,9 @@ __all__ = [
38
39
  'DataAnomaly',
39
40
  'UniversalParser',
40
41
  'StandardDataPack',
41
- 'ParseResult'
42
+ 'ParseResult',
43
+ 'load_dataset_registry',
44
+ 'get_dataset',
45
+ 'list_dataset_ids',
46
+ 'fetch_dataset',
42
47
  ]
@@ -0,0 +1,132 @@
1
+ [
2
+ {
3
+ "id": "sample",
4
+ "name": "IINTS Sample CGM (Bundled)",
5
+ "source": "IINTS-AF",
6
+ "access": "bundled",
7
+ "license": "Demo-only (bundled with SDK)",
8
+ "description": "Tiny CGM sample for quickstart and offline demos.",
9
+ "bundled_path": "data/demo/demo_cgm.csv",
10
+ "sha256": "e869e033887e595ab4c41cb14cde6f2328cc9d55e0fb2c741e7fbe3e0ae3af96",
11
+ "citation": {
12
+ "text": "IINTS-AF Team. IINTS Sample CGM (bundled). Accessed 2026-02-16.",
13
+ "bibtex": "@misc{iints_sample_cgm, title={IINTS Sample CGM (bundled)}, author={IINTS-AF Team}, year={2026}, note={Bundled with IINTS-AF SDK, accessed 2026-02-16}}"
14
+ }
15
+ },
16
+ {
17
+ "id": "aide_t1d",
18
+ "name": "AIDE T1D Public Dataset",
19
+ "source": "Jaeb Center for Health Research",
20
+ "access": "public-download",
21
+ "license": "Public dataset (see Jaeb public datasets page)",
22
+ "description": "Automated Insulin Delivery in Elderly with Type 1 Diabetes (AIDE T1D) public dataset.",
23
+ "landing_page": "https://public.jaeb.org/datasets/",
24
+ "download_urls": [
25
+ "https://live-jchrpublicdatasets.s3.amazonaws.com/Diabetes/Public%20Datasets/AIDET1D_Public_Dataset.zip"
26
+ ],
27
+ "sha256": null,
28
+ "sha256_note": "Checksum not published by source; SHA256SUMS.txt will be generated after download.",
29
+ "citation": {
30
+ "text": "Jaeb Center for Health Research. Automated Insulin Delivery in Elderly with Type 1 Diabetes (AIDE T1D) Public Dataset. Public Study Websites. Accessed 2026-02-16. https://public.jaeb.org/datasets/",
31
+ "bibtex": "@misc{jaeb_aide_t1d, title={Automated Insulin Delivery in Elderly with Type 1 Diabetes (AIDE T1D) Public Dataset}, author={Jaeb Center for Health Research}, howpublished={Public Study Websites}, note={Accessed 2026-02-16}, url={https://public.jaeb.org/datasets/}}"
32
+ }
33
+ },
34
+ {
35
+ "id": "pedap",
36
+ "name": "PEDAP Public Dataset",
37
+ "source": "Jaeb Center for Health Research",
38
+ "access": "public-download",
39
+ "license": "Public dataset (see Jaeb public datasets page)",
40
+ "description": "Pediatric Artificial Pancreas (PEDAP) public dataset (Release 5).",
41
+ "landing_page": "https://public.jaeb.org/datasets/",
42
+ "download_urls": [
43
+ "https://live-jchrpublicdatasets.s3.amazonaws.com/Diabetes/Public%20Datasets/PEDAP%20Public%20Dataset%20-%20Release%205%20-%202025-05-12.zip"
44
+ ],
45
+ "sha256": null,
46
+ "sha256_note": "Checksum not published by source; SHA256SUMS.txt will be generated after download.",
47
+ "citation": {
48
+ "text": "Jaeb Center for Health Research. Pediatric Artificial Pancreas (PEDAP) Public Dataset, Release 5. Public Study Websites. Accessed 2026-02-16. https://public.jaeb.org/datasets/",
49
+ "bibtex": "@misc{jaeb_pedap_2025, title={Pediatric Artificial Pancreas (PEDAP) Public Dataset, Release 5}, author={Jaeb Center for Health Research}, howpublished={Public Study Websites}, note={Accessed 2026-02-16}, url={https://public.jaeb.org/datasets/}}"
50
+ }
51
+ },
52
+ {
53
+ "id": "azt1d",
54
+ "name": "AZT1D: A Real-World Dataset for Type 1 Diabetes",
55
+ "source": "Mendeley Data",
56
+ "access": "manual",
57
+ "license": "CC BY 4.0",
58
+ "description": "Real-world T1D dataset (CGM + insulin + meals) from 25 individuals on AID systems.",
59
+ "landing_page": "https://data.mendeley.com/datasets/gk9m674wcx/1",
60
+ "doi": "10.17632/gk9m674wcx.1",
61
+ "citation": {
62
+ "text": "Khamesian S, Arefeen A, Thompson BM, Grando A, Ghasemzadeh H. AZT1D: A Real-World Dataset for Type 1 Diabetes. Mendeley Data, v1, 2025. doi:10.17632/gk9m674wcx.1",
63
+ "bibtex": "@misc{azt1d_2025, title={AZT1D: A Real-World Dataset for Type 1 Diabetes}, author={Khamesian, Saman and Arefeen, Asiful and Thompson, Bithika M. and Grando, Adela and Ghasemzadeh, Hassan}, year={2025}, doi={10.17632/gk9m674wcx.1}, publisher={Mendeley Data}}"
64
+ }
65
+ },
66
+ {
67
+ "id": "hupa_ucm",
68
+ "name": "HUPA-UCM Diabetes Dataset",
69
+ "source": "Mendeley Data",
70
+ "access": "manual",
71
+ "license": "CC BY 4.0",
72
+ "description": "Free-living T1D dataset with CGM, insulin, meals, and activity data.",
73
+ "landing_page": "https://data.mendeley.com/datasets/3hbcscwz44/1",
74
+ "doi": "10.17632/3hbcscwz44.1",
75
+ "citation": {
76
+ "text": "Hidalgo JI, Alvarado J, Botella M, Aramendi A, Velasco JM, Garnica O. HUPA-UCM Diabetes Dataset. Mendeley Data, v1, 2024. doi:10.17632/3hbcscwz44.1",
77
+ "bibtex": "@misc{hupa_ucm_2024, title={HUPA-UCM Diabetes Dataset}, author={Hidalgo, J. Ignacio and Alvarado, Jorge and Botella, Marta and Aramendi, Aranzazu and Velasco, J. Manuel and Garnica, Oscar}, year={2024}, doi={10.17632/3hbcscwz44.1}, publisher={Mendeley Data}}"
78
+ }
79
+ },
80
+ {
81
+ "id": "openaps_data_commons",
82
+ "name": "OpenAPS Data Commons",
83
+ "source": "OpenAPS",
84
+ "access": "request",
85
+ "license": "Data use agreement (see OpenAPS)",
86
+ "description": "Community-contributed open APS data commons.",
87
+ "landing_page": "https://openaps.org/outcomes/data-commons/",
88
+ "citation": {
89
+ "text": "OpenAPS. OpenAPS Data Commons. Accessed 2026-02-16. https://openaps.org/outcomes/data-commons/",
90
+ "bibtex": "@misc{openaps_datacommons, title={OpenAPS Data Commons}, author={OpenAPS}, note={Accessed 2026-02-16}, url={https://openaps.org/outcomes/data-commons/}}"
91
+ }
92
+ },
93
+ {
94
+ "id": "tidepool_bigdata",
95
+ "name": "Tidepool Big Data Donation",
96
+ "source": "Tidepool",
97
+ "access": "request",
98
+ "license": "Research collaboration / approval required",
99
+ "description": "Large-scale real-world diabetes data donation program.",
100
+ "landing_page": "https://www.tidepool.org/bigdata",
101
+ "citation": {
102
+ "text": "Tidepool. Big Data Donation Project. Accessed 2026-02-16. https://www.tidepool.org/bigdata",
103
+ "bibtex": "@misc{tidepool_bddp, title={Big Data Donation Project}, author={Tidepool}, note={Accessed 2026-02-16}, url={https://www.tidepool.org/bigdata}}"
104
+ }
105
+ },
106
+ {
107
+ "id": "niddk_central",
108
+ "name": "NIDDK Central Repository",
109
+ "source": "NIDDK",
110
+ "access": "request",
111
+ "license": "Repository access agreement",
112
+ "description": "NIH/NIDDK centralized repository of clinical diabetes studies.",
113
+ "landing_page": "https://repository.niddk.nih.gov/",
114
+ "citation": {
115
+ "text": "NIDDK Central Repository. Accessed 2026-02-16. https://repository.niddk.nih.gov/",
116
+ "bibtex": "@misc{niddk_central_repo, title={NIDDK Central Repository}, author={NIDDK}, note={Accessed 2026-02-16}, url={https://repository.niddk.nih.gov/}}"
117
+ }
118
+ },
119
+ {
120
+ "id": "t1d_exchange",
121
+ "name": "T1D Exchange Clinic Registry",
122
+ "source": "Jaeb Center / T1D Exchange",
123
+ "access": "request",
124
+ "license": "Data request / approval required",
125
+ "description": "Large clinical registry for type 1 diabetes research.",
126
+ "landing_page": "https://datacatalog.med.nyu.edu/dataset/10129",
127
+ "citation": {
128
+ "text": "NYU Data Catalog. T1D Exchange Clinic Registry. Accessed 2026-02-16. https://datacatalog.med.nyu.edu/dataset/10129",
129
+ "bibtex": "@misc{t1d_exchange_registry, title={T1D Exchange Clinic Registry}, author={NYU Data Catalog}, note={Accessed 2026-02-16}, url={https://datacatalog.med.nyu.edu/dataset/10129}}"
130
+ }
131
+ }
132
+ ]
@@ -0,0 +1,146 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ import urllib.request
5
+ import zipfile
6
+ import hashlib
7
+ import shutil
8
+ from dataclasses import dataclass
9
+ from pathlib import Path
10
+ from typing import Any, Dict, List, Optional
11
+ from importlib.abc import Traversable
12
+
13
+ try: # Python 3.9+
14
+ from importlib.resources import files
15
+ except Exception: # pragma: no cover
16
+ from importlib import resources as files # type: ignore
17
+
18
+
19
+ class DatasetRegistryError(RuntimeError):
20
+ pass
21
+
22
+
23
+ class DatasetFetchError(RuntimeError):
24
+ pass
25
+
26
+
27
+ def _registry_path() -> Traversable:
28
+ try:
29
+ return files("iints.data").joinpath("datasets.json") # type: ignore[attr-defined]
30
+ except Exception as exc:
31
+ raise DatasetRegistryError(f"Unable to locate datasets.json: {exc}") from exc
32
+
33
+
34
+ def load_dataset_registry() -> List[Dict[str, Any]]:
35
+ registry_path = _registry_path()
36
+ return json.loads(registry_path.read_text())
37
+
38
+
39
+ def get_dataset(dataset_id: str) -> Dict[str, Any]:
40
+ for entry in load_dataset_registry():
41
+ if entry.get("id") == dataset_id:
42
+ return entry
43
+ raise DatasetRegistryError(f"Unknown dataset '{dataset_id}'. Run 'iints data list' to see options.")
44
+
45
+
46
+ def list_dataset_ids() -> List[str]:
47
+ ids: List[str] = []
48
+ for entry in load_dataset_registry():
49
+ dataset_id = entry.get("id")
50
+ if isinstance(dataset_id, str) and dataset_id:
51
+ ids.append(dataset_id)
52
+ return ids
53
+
54
+
55
+ def _download_file(url: str, output_path: Path) -> Path:
56
+ output_path.parent.mkdir(parents=True, exist_ok=True)
57
+ try:
58
+ urllib.request.urlretrieve(url, output_path)
59
+ except Exception as exc:
60
+ raise DatasetFetchError(f"Failed to download {url}: {exc}") from exc
61
+ return output_path
62
+
63
+
64
+ def _sha256(path: Path) -> str:
65
+ digest = hashlib.sha256()
66
+ with path.open("rb") as handle:
67
+ for chunk in iter(lambda: handle.read(8192), b""):
68
+ digest.update(chunk)
69
+ return digest.hexdigest()
70
+
71
+
72
+ def _get_expected_hash(dataset: Dict[str, Any], index: int = 0) -> Optional[str]:
73
+ expected = dataset.get("sha256")
74
+ if isinstance(expected, list):
75
+ if index < len(expected):
76
+ return expected[index] or None
77
+ return None
78
+ if isinstance(expected, str):
79
+ return expected or None
80
+ return None
81
+
82
+
83
+ def _maybe_extract_zip(path: Path, output_dir: Path) -> None:
84
+ if path.suffix.lower() != ".zip":
85
+ return
86
+ try:
87
+ with zipfile.ZipFile(path, "r") as zip_ref:
88
+ zip_ref.extractall(output_dir)
89
+ except Exception as exc:
90
+ raise DatasetFetchError(f"Failed to extract {path.name}: {exc}") from exc
91
+
92
+
93
+ def fetch_dataset(
94
+ dataset_id: str,
95
+ output_dir: Path,
96
+ extract: bool = True,
97
+ verify: bool = True,
98
+ ) -> List[Path]:
99
+ dataset = get_dataset(dataset_id)
100
+ urls = dataset.get("download_urls") or []
101
+ access = dataset.get("access", "manual")
102
+
103
+ if access == "bundled":
104
+ bundled_path = dataset.get("bundled_path")
105
+ if not bundled_path:
106
+ raise DatasetFetchError("Bundled dataset missing bundled_path entry.")
107
+ try:
108
+ source_path = files("iints.data").joinpath(bundled_path) # type: ignore[attr-defined]
109
+ except Exception as exc:
110
+ raise DatasetFetchError(f"Unable to locate bundled dataset: {exc}") from exc
111
+ output_dir.mkdir(parents=True, exist_ok=True)
112
+ target = output_dir / Path(bundled_path).name
113
+ # Traversable may not be a real filesystem path; stream bytes instead.
114
+ with source_path.open("rb") as src, target.open("wb") as dst:
115
+ shutil.copyfileobj(src, dst)
116
+ expected = _get_expected_hash(dataset, 0)
117
+ if verify and expected:
118
+ actual = _sha256(target)
119
+ if actual != expected:
120
+ raise DatasetFetchError(f"SHA-256 mismatch for {target.name}. Expected {expected}, got {actual}.")
121
+ return [target]
122
+
123
+ if not urls:
124
+ raise DatasetFetchError(
125
+ "This dataset requires manual download or approval. Use 'iints data info' for instructions."
126
+ )
127
+ output_dir.mkdir(parents=True, exist_ok=True)
128
+ downloaded: List[Path] = []
129
+ for idx, url in enumerate(urls):
130
+ filename = url.split("/")[-1]
131
+ target = output_dir / filename
132
+ downloaded.append(_download_file(url, target))
133
+ expected = _get_expected_hash(dataset, idx)
134
+ if verify and expected:
135
+ actual = _sha256(target)
136
+ if actual != expected:
137
+ raise DatasetFetchError(f"SHA-256 mismatch for {target.name}. Expected {expected}, got {actual}.")
138
+ elif verify and expected is None:
139
+ # If no hash is provided, at least emit the computed hash for user reference.
140
+ actual = _sha256(target)
141
+ checksum_path = output_dir / "SHA256SUMS.txt"
142
+ with checksum_path.open("a") as handle:
143
+ handle.write(f"{actual} {target.name}\n")
144
+ if extract:
145
+ _maybe_extract_zip(target, output_dir)
146
+ return downloaded
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iints-sdk-python35
3
- Version: 0.1.9
3
+ Version: 0.1.11
4
4
  Summary: A pre-clinical Edge-AI SDK for diabetes management validation.
5
5
  Author-email: Rune Bobbaers <rune.bobbaers@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/python35/IINTS-SDK
@@ -91,6 +91,20 @@ Try the bundled demo data pack:
91
91
  iints import-demo --output-dir results/demo_import
92
92
  ```
93
93
 
94
+ Official real-world datasets (download on demand):
95
+ ```bash
96
+ iints data list
97
+ iints data info aide_t1d
98
+ iints data fetch aide_t1d
99
+ ```
100
+ Some datasets require approval and are marked as `request` in the registry.
101
+ `iints data info` prints BibTeX + citation text for easy referencing.
102
+
103
+ Offline sample dataset (no download required):
104
+ ```bash
105
+ iints data fetch sample --output-dir data_packs/sample
106
+ ```
107
+
94
108
  Or run the full demo workflow (import + run + report) in one script:
95
109
  ```bash
96
110
  python3 examples/demo_quickstart_flow.py
@@ -54,9 +54,11 @@ src/iints/core/simulation/scenario_parser.py
54
54
  src/iints/data/__init__.py
55
55
  src/iints/data/adapter.py
56
56
  src/iints/data/column_mapper.py
57
+ src/iints/data/datasets.json
57
58
  src/iints/data/importer.py
58
59
  src/iints/data/ingestor.py
59
60
  src/iints/data/quality_checker.py
61
+ src/iints/data/registry.py
60
62
  src/iints/data/universal_parser.py
61
63
  src/iints/data/demo/__init__.py
62
64
  src/iints/data/demo/demo_cgm.csv