iints-sdk-python35 1.3.2__tar.gz → 1.4.0__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 (210) hide show
  1. iints_sdk_python35-1.4.0/LICENSE +173 -0
  2. iints_sdk_python35-1.3.2/LICENSE → iints_sdk_python35-1.4.0/LICENSE-MIT-IINTS-LEGACY +0 -7
  3. iints_sdk_python35-1.4.0/NOTICE +17 -0
  4. {iints_sdk_python35-1.3.2/src/iints_sdk_python35.egg-info → iints_sdk_python35-1.4.0}/PKG-INFO +23 -17
  5. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/README.md +18 -14
  6. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/pyproject.toml +10 -4
  7. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/__init__.py +1 -1
  8. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/backends/ollama.py +32 -2
  9. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/mdmp_guard.py +2 -3
  10. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/prepare.py +1 -1
  11. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/clinical_metrics.py +13 -7
  12. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/validator.py +10 -4
  13. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/patient/bergman_model.py +3 -2
  14. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/patient/models.py +1 -1
  15. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/patient/patient_factory.py +8 -8
  16. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/patient/profile.py +1 -1
  17. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/safety/config.py +13 -4
  18. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/safety/input_validator.py +12 -7
  19. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/adapter.py +7 -2
  20. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/ingestor.py +7 -2
  21. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/quality_checker.py +12 -4
  22. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/registry.py +23 -1
  23. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/highlevel.py +1 -1
  24. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/learning/autonomous_optimizer.py +13 -1
  25. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/mdmp/backend.py +2 -3
  26. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/predictor.py +9 -1
  27. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0/src/iints_sdk_python35.egg-info}/PKG-INFO +23 -17
  28. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints_sdk_python35.egg-info/SOURCES.txt +41 -0
  29. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints_sdk_python35.egg-info/entry_points.txt +1 -0
  30. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints_sdk_python35.egg-info/requires.txt +1 -1
  31. iints_sdk_python35-1.4.0/src/iints_sdk_python35.egg-info/top_level.txt +5 -0
  32. iints_sdk_python35-1.4.0/src/mdmp_ai/__init__.py +3 -0
  33. iints_sdk_python35-1.4.0/src/mdmp_ai/lineage.py +198 -0
  34. iints_sdk_python35-1.4.0/src/mdmp_core/__init__.py +133 -0
  35. iints_sdk_python35-1.4.0/src/mdmp_core/audit.py +166 -0
  36. iints_sdk_python35-1.4.0/src/mdmp_core/bias_hooks.py +36 -0
  37. iints_sdk_python35-1.4.0/src/mdmp_core/bundle.py +142 -0
  38. iints_sdk_python35-1.4.0/src/mdmp_core/certification.py +38 -0
  39. iints_sdk_python35-1.4.0/src/mdmp_core/cli.py +1351 -0
  40. iints_sdk_python35-1.4.0/src/mdmp_core/compare.py +56 -0
  41. iints_sdk_python35-1.4.0/src/mdmp_core/conformance.py +429 -0
  42. iints_sdk_python35-1.4.0/src/mdmp_core/contracts.py +164 -0
  43. iints_sdk_python35-1.4.0/src/mdmp_core/crypto.py +372 -0
  44. iints_sdk_python35-1.4.0/src/mdmp_core/data/conformance/vectors/delegation.json +56 -0
  45. iints_sdk_python35-1.4.0/src/mdmp_core/data/conformance/vectors/fingerprint.json +24 -0
  46. iints_sdk_python35-1.4.0/src/mdmp_core/data/conformance/vectors/grading.json +83 -0
  47. iints_sdk_python35-1.4.0/src/mdmp_core/data/conformance/vectors/signing.json +37 -0
  48. iints_sdk_python35-1.4.0/src/mdmp_core/delegate.py +476 -0
  49. iints_sdk_python35-1.4.0/src/mdmp_core/diffing.py +128 -0
  50. iints_sdk_python35-1.4.0/src/mdmp_core/drift.py +203 -0
  51. iints_sdk_python35-1.4.0/src/mdmp_core/exceptions.py +33 -0
  52. iints_sdk_python35-1.4.0/src/mdmp_core/fingerprint.py +92 -0
  53. iints_sdk_python35-1.4.0/src/mdmp_core/fingerprint_store.py +42 -0
  54. iints_sdk_python35-1.4.0/src/mdmp_core/hf.py +60 -0
  55. iints_sdk_python35-1.4.0/src/mdmp_core/keys/mdmp_pub_v1.pem +3 -0
  56. iints_sdk_python35-1.4.0/src/mdmp_core/llm_provenance.py +34 -0
  57. iints_sdk_python35-1.4.0/src/mdmp_core/migrate.py +182 -0
  58. iints_sdk_python35-1.4.0/src/mdmp_core/policy.py +185 -0
  59. iints_sdk_python35-1.4.0/src/mdmp_core/prov.py +31 -0
  60. iints_sdk_python35-1.4.0/src/mdmp_core/registry.py +350 -0
  61. iints_sdk_python35-1.4.0/src/mdmp_core/runner.py +292 -0
  62. iints_sdk_python35-1.4.0/src/mdmp_core/schema_export.py +92 -0
  63. iints_sdk_python35-1.4.0/src/mdmp_core/synthetic.py +30 -0
  64. iints_sdk_python35-1.4.0/src/mdmp_core/trust.py +216 -0
  65. iints_sdk_python35-1.4.0/src/mdmp_core/visualizer.py +61 -0
  66. iints_sdk_python35-1.4.0/src/mdmp_flavors/__init__.py +146 -0
  67. iints_sdk_python35-1.4.0/src/mdmp_integrations/__init__.py +9 -0
  68. iints_sdk_python35-1.4.0/src/mdmp_integrations/dvc.py +30 -0
  69. iints_sdk_python35-1.4.0/src/mdmp_integrations/mlflow.py +14 -0
  70. iints_sdk_python35-1.4.0/src/mdmp_integrations/wandb.py +19 -0
  71. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/tests/test_bergman.py +6 -0
  72. iints_sdk_python35-1.3.2/src/iints_sdk_python35.egg-info/top_level.txt +0 -1
  73. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/setup.cfg +0 -0
  74. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/__init__.py +0 -0
  75. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/assistant.py +0 -0
  76. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/backends/__init__.py +0 -0
  77. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/backends/base.py +0 -0
  78. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/backends/mistral_api.py +0 -0
  79. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/cli.py +0 -0
  80. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/model_catalog.py +0 -0
  81. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/ai/prompts.py +0 -0
  82. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/__init__.py +0 -0
  83. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/algorithm_xray.py +0 -0
  84. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/baseline.py +0 -0
  85. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/booth_demo.py +0 -0
  86. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/carelink_workbench.py +0 -0
  87. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/clinical_benchmark.py +0 -0
  88. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/clinical_tir_analyzer.py +0 -0
  89. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/diabetes_metrics.py +0 -0
  90. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/edge_efficiency.py +0 -0
  91. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/edge_performance_monitor.py +0 -0
  92. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/explainability.py +0 -0
  93. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/explainable_ai.py +0 -0
  94. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/hardware_benchmark.py +0 -0
  95. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/metrics.py +0 -0
  96. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/population_report.py +0 -0
  97. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/poster.py +0 -0
  98. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/reporting.py +0 -0
  99. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/safety_index.py +0 -0
  100. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/analysis/sensor_filtering.py +0 -0
  101. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/api/__init__.py +0 -0
  102. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/api/base_algorithm.py +0 -0
  103. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/api/registry.py +0 -0
  104. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/api/template_algorithm.py +0 -0
  105. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/assets/iints_logo.png +0 -0
  106. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/cli/__init__.py +0 -0
  107. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/cli/cli.py +0 -0
  108. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/__init__.py +0 -0
  109. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/__init__.py +0 -0
  110. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/battle_runner.py +0 -0
  111. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/correction_bolus.py +0 -0
  112. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/discovery.py +0 -0
  113. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/fixed_basal_bolus.py +0 -0
  114. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/hybrid_algorithm.py +0 -0
  115. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/lstm_algorithm.py +0 -0
  116. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/mock_algorithms.py +0 -0
  117. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/pid_controller.py +0 -0
  118. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/algorithms/standard_pump_algo.py +0 -0
  119. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/device.py +0 -0
  120. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/device_manager.py +0 -0
  121. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/devices/__init__.py +0 -0
  122. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/devices/models.py +0 -0
  123. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/patient/__init__.py +0 -0
  124. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/safety/__init__.py +0 -0
  125. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/safety/supervisor.py +0 -0
  126. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/simulation/__init__.py +0 -0
  127. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/simulation/scenario_parser.py +0 -0
  128. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/simulator.py +0 -0
  129. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/core/supervisor.py +0 -0
  130. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/__init__.py +0 -0
  131. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/column_mapper.py +0 -0
  132. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/contracts.py +0 -0
  133. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/datasets.json +0 -0
  134. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/demo/__init__.py +0 -0
  135. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/demo/demo_cgm.csv +0 -0
  136. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/guardians.py +0 -0
  137. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/importer.py +0 -0
  138. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/mdmp_visualizer.py +0 -0
  139. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/nightscout.py +0 -0
  140. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/runner.py +0 -0
  141. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/synthetic_mirror.py +0 -0
  142. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/tidepool.py +0 -0
  143. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/universal_parser.py +0 -0
  144. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/virtual_patients/clinic_safe_baseline.yaml +0 -0
  145. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/virtual_patients/clinic_safe_hyper_challenge.yaml +0 -0
  146. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/virtual_patients/clinic_safe_hypo_prone.yaml +0 -0
  147. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/virtual_patients/clinic_safe_midnight.yaml +0 -0
  148. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/virtual_patients/clinic_safe_pizza.yaml +0 -0
  149. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/virtual_patients/clinic_safe_stress_meal.yaml +0 -0
  150. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/virtual_patients/default_patient.yaml +0 -0
  151. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/data/virtual_patients/patient_559_config.yaml +0 -0
  152. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/demo_assets.py +0 -0
  153. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/emulation/__init__.py +0 -0
  154. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/emulation/legacy_base.py +0 -0
  155. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/emulation/medtronic_780g.py +0 -0
  156. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/emulation/omnipod_5.py +0 -0
  157. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/emulation/tandem_controliq.py +0 -0
  158. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/learning/__init__.py +0 -0
  159. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/learning/learning_system.py +0 -0
  160. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/mdmp/__init__.py +0 -0
  161. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/metrics.py +0 -0
  162. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/population/__init__.py +0 -0
  163. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/population/generator.py +0 -0
  164. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/population/runner.py +0 -0
  165. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/presets/__init__.py +0 -0
  166. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/presets/evidence_sources.yaml +0 -0
  167. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/presets/forecast_calibration_profiles.yaml +0 -0
  168. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/presets/golden_benchmark.yaml +0 -0
  169. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/presets/presets.json +0 -0
  170. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/presets/safety_contract_default.yaml +0 -0
  171. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/presets/validation_profiles.yaml +0 -0
  172. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/__init__.py +0 -0
  173. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/audit.py +0 -0
  174. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/calibration_gate.py +0 -0
  175. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/config.py +0 -0
  176. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/dataset.py +0 -0
  177. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/evaluation.py +0 -0
  178. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/losses.py +0 -0
  179. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/metrics.py +0 -0
  180. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/research/model_registry.py +0 -0
  181. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/scenarios/__init__.py +0 -0
  182. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/scenarios/generator.py +0 -0
  183. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/__init__.py +0 -0
  184. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/default_algorithm.py +0 -0
  185. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/demos/__init__.py +0 -0
  186. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/demos/live_stage_demo.py +0 -0
  187. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/scenarios/__init__.py +0 -0
  188. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/scenarios/chaos_insulin_stacking.json +0 -0
  189. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/scenarios/chaos_runaway_ai.json +0 -0
  190. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/scenarios/example_scenario.json +0 -0
  191. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/templates/scenarios/exercise_stress.json +0 -0
  192. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/utils/__init__.py +0 -0
  193. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/utils/plotting.py +0 -0
  194. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/utils/run_io.py +0 -0
  195. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/validation/__init__.py +0 -0
  196. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/validation/golden.py +0 -0
  197. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/validation/replay.py +0 -0
  198. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/validation/run_validation.py +0 -0
  199. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/validation/safety_contract.py +0 -0
  200. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/validation/schemas.py +0 -0
  201. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/visualization/__init__.py +0 -0
  202. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/visualization/cockpit.py +0 -0
  203. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints/visualization/uncertainty_cloud.py +0 -0
  204. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/src/iints_sdk_python35.egg-info/dependency_links.txt +0 -0
  205. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/tests/test_cli_booth_demo.py +0 -0
  206. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/tests/test_cli_carelink_workbench.py +0 -0
  207. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/tests/test_cli_demo_export.py +0 -0
  208. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/tests/test_cli_poster.py +0 -0
  209. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/tests/test_install_doctor.py +0 -0
  210. {iints_sdk_python35-1.3.2 → iints_sdk_python35-1.4.0}/tests/test_population.py +0 -0
@@ -0,0 +1,173 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+
135
+ 6. Trademarks. This License does not grant permission to use the trade
136
+ names, trademarks, service marks, or product names of the Licensor,
137
+ except as required for reasonable and customary use in describing the
138
+ origin of the Work and reproducing the content of the NOTICE file.
139
+
140
+ 7. Disclaimer of Warranty. Unless required by applicable law or
141
+ agreed to in writing, Licensor provides the Work (and each
142
+ Contributor provides its Contributions) on an "AS IS" BASIS,
143
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
144
+ implied, including, without limitation, any warranties or conditions
145
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
146
+ PARTICULAR PURPOSE. You are solely responsible for determining the
147
+ appropriateness of using or redistributing the Work and assume any
148
+ risks associated with Your exercise of permissions under this License.
149
+
150
+ 8. Limitation of Liability. In no event and under no legal theory,
151
+ whether in tort (including negligence), contract, or otherwise,
152
+ unless required by applicable law (such as deliberate and grossly
153
+ negligent acts) or agreed to in writing, shall any Contributor be
154
+ liable to You for damages, including any direct, indirect, special,
155
+ incidental, or consequential damages of any character arising as a
156
+ result of this License or out of the use or inability to use the
157
+ Work (including but not limited to damages for loss of goodwill,
158
+ work stoppage, computer failure or malfunction, or any and all
159
+ other commercial damages or losses), even if such Contributor has
160
+ been advised of the possibility of such damages.
161
+
162
+ 9. Accepting Warranty or Additional Liability. While redistributing
163
+ the Work or Derivative Works thereof, You may choose to offer,
164
+ and charge a fee for, acceptance of support, warranty, indemnity,
165
+ or other liability obligations and/or rights consistent with this
166
+ License. However, in accepting such obligations, You may act only
167
+ on Your own behalf and on Your sole responsibility, not on behalf
168
+ of any other Contributor, and only if You agree to indemnify,
169
+ defend, and hold each Contributor harmless for any liability
170
+ incurred by, or claims asserted against, such Contributor by reason
171
+ of your accepting any such warranty or additional liability.
172
+
173
+ END OF TERMS AND CONDITIONS
@@ -19,10 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
-
23
- ACADEMIC USE DISCLAIMER:
24
- This software is intended for academic research purposes only. It is not
25
- intended for clinical use or as a medical device. Users must comply with
26
- all applicable regulations and obtain proper approvals before any clinical
27
- application. The authors disclaim any responsibility for clinical use of
28
- this software.
@@ -0,0 +1,17 @@
1
+ IINTS-AF SDK
2
+ Copyright (c) 2026 IINTS-AF Contributors
3
+
4
+ This distribution now bundles MDMP components directly inside the SDK source tree,
5
+ including `mdmp_core`, `mdmp_ai`, `mdmp_flavors`, and `mdmp_integrations`.
6
+
7
+ Bundled MDMP code originates from the MDMP project and is included here under
8
+ the Apache License, Version 2.0.
9
+
10
+ The original IINTS-AF SDK was previously distributed under the MIT License.
11
+ The preserved MIT notice for legacy IINTS-origin portions is included in:
12
+
13
+ `LICENSE-MIT-IINTS-LEGACY`
14
+
15
+ Research-use notice:
16
+ This software is intended for academic and pre-clinical research purposes only.
17
+ It is not a medical device and does not provide clinical dosing advice.
@@ -1,20 +1,22 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iints-sdk-python35
3
- Version: 1.3.2
3
+ Version: 1.4.0
4
4
  Summary: A pre-clinical Edge-AI SDK for diabetes management validation.
5
5
  Author-email: Rune Bobbaers <rune.bobbaers@gmail.com>
6
+ License-Expression: Apache-2.0
6
7
  Project-URL: Homepage, https://github.com/python35/IINTS-SDK
7
8
  Classifier: Programming Language :: Python :: 3
8
9
  Classifier: Programming Language :: Python :: 3.10
9
10
  Classifier: Programming Language :: Python :: 3.11
10
11
  Classifier: Programming Language :: Python :: 3.12
11
12
  Classifier: Programming Language :: Python :: 3.13
12
- Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Development Status :: 5 - Production/Stable
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
+ License-File: NOTICE
19
+ License-File: LICENSE-MIT-IINTS-LEGACY
18
20
  Requires-Dist: fpdf2>=2.8.0
19
21
  Requires-Dist: matplotlib>=3.5.0
20
22
  Requires-Dist: numpy>=1.24.0
@@ -46,7 +48,7 @@ Requires-Dist: h5py>=3.10.0; extra == "research"
46
48
  Requires-Dist: onnx>=1.16.0; extra == "research"
47
49
  Requires-Dist: onnxscript>=0.1.0; extra == "research"
48
50
  Provides-Extra: mdmp
49
- Requires-Dist: mdmp-protocol>=0.3.0; extra == "mdmp"
51
+ Requires-Dist: cryptography>=42.0.0; extra == "mdmp"
50
52
  Dynamic: license-file
51
53
 
52
54
  # IINTS-AF SDK
@@ -83,6 +85,8 @@ iints presets run --name baseline_t1d --algo algorithms/example_algorithm.py
83
85
 
84
86
  If you want the clearest install/path rules first, read:
85
87
  - `docs/INSTALLATION.md`
88
+ - `docs/AI_ASSISTANT.md` for the small Ollama setup and SDK linking flow
89
+ - `docs/EVIDENCE_BASE.md` for the full medical + technical source legend
86
90
 
87
91
  Short rule:
88
92
  - installed `iints ...` commands can run from any folder
@@ -160,6 +164,12 @@ ollama pull ministral-3:8b
160
164
  iints ai models
161
165
  ```
162
166
 
167
+ If you want the short "install Ollama + link it to the SDK" guide, read:
168
+ - `docs/AI_ASSISTANT.md`
169
+
170
+ If you want the full legend of medical, dataset, runtime, and emulator references used across the project docs:
171
+ - `docs/EVIDENCE_BASE.md`
172
+
163
173
  Recommended first-time setup:
164
174
 
165
175
  ```bash
@@ -345,13 +355,13 @@ iints mdmp validate mdmp_contract.yaml data/my_cgm.csv --output-json results/mdm
345
355
  iints mdmp visualizer results/mdmp_report.json --output-html results/mdmp_dashboard.html
346
356
  ```
347
357
 
348
- Use standalone MDMP backend (optional):
358
+ Use bundled `mdmp_core` backend (optional):
349
359
 
350
360
  ```bash
351
361
  export IINTS_MDMP_BACKEND=mdmp_core
352
362
  ```
353
363
 
354
- Staleness / lineage checks (standalone MDMP CLI):
364
+ Staleness / lineage checks via the bundled `mdmp` CLI:
355
365
 
356
366
  ```bash
357
367
  mdmp fingerprint-record data/my_cgm.csv --output-json results/fingerprint.json --expires-days 365
@@ -361,21 +371,17 @@ mdmp registry init --registry registry/mdmp_registry.json
361
371
  mdmp registry push --registry registry/mdmp_registry.json --report results/mdmp_report.json
362
372
  ```
363
373
 
364
- ## Dual Repo Workflow
365
- - SDK repo: `python35/IINTS-SDK`
366
- - MDMP repo: `python35/MDMP`
374
+ ## Bundled MDMP
367
375
 
368
- Local helper scripts:
369
- - `tools/dev/dual_repo_status.sh`
370
- - `tools/dev/dual_repo_commit_push.sh`
376
+ MDMP now ships inside the SDK, so the SDK no longer depends on a separate public MDMP repository checkout.
371
377
 
372
- Full process: `docs/DUAL_REPO_WORKFLOW.md`
378
+ That means:
379
+ - `iints mdmp ...` stays available
380
+ - the bundled `mdmp` CLI can still be used
381
+ - local AI signing and verification can still use `mdmp_core`
373
382
 
374
- MDMP sync CI gate:
375
- - `.github/workflows/mdmp-sync.yml`
376
- - Uses private-repo checkout when `MDMP_REPO_TOKEN` is configured.
377
- - Falls back to `mdmp-protocol` from PyPI when checkout is unavailable.
378
- - Auto dependency updates for MDMP are handled via Dependabot (`.github/dependabot.yml`).
383
+ Reference:
384
+ - `docs/DUAL_REPO_WORKFLOW.md`
379
385
 
380
386
  ## Tools Layout
381
387
 
@@ -32,6 +32,8 @@ iints presets run --name baseline_t1d --algo algorithms/example_algorithm.py
32
32
 
33
33
  If you want the clearest install/path rules first, read:
34
34
  - `docs/INSTALLATION.md`
35
+ - `docs/AI_ASSISTANT.md` for the small Ollama setup and SDK linking flow
36
+ - `docs/EVIDENCE_BASE.md` for the full medical + technical source legend
35
37
 
36
38
  Short rule:
37
39
  - installed `iints ...` commands can run from any folder
@@ -109,6 +111,12 @@ ollama pull ministral-3:8b
109
111
  iints ai models
110
112
  ```
111
113
 
114
+ If you want the short "install Ollama + link it to the SDK" guide, read:
115
+ - `docs/AI_ASSISTANT.md`
116
+
117
+ If you want the full legend of medical, dataset, runtime, and emulator references used across the project docs:
118
+ - `docs/EVIDENCE_BASE.md`
119
+
112
120
  Recommended first-time setup:
113
121
 
114
122
  ```bash
@@ -294,13 +302,13 @@ iints mdmp validate mdmp_contract.yaml data/my_cgm.csv --output-json results/mdm
294
302
  iints mdmp visualizer results/mdmp_report.json --output-html results/mdmp_dashboard.html
295
303
  ```
296
304
 
297
- Use standalone MDMP backend (optional):
305
+ Use bundled `mdmp_core` backend (optional):
298
306
 
299
307
  ```bash
300
308
  export IINTS_MDMP_BACKEND=mdmp_core
301
309
  ```
302
310
 
303
- Staleness / lineage checks (standalone MDMP CLI):
311
+ Staleness / lineage checks via the bundled `mdmp` CLI:
304
312
 
305
313
  ```bash
306
314
  mdmp fingerprint-record data/my_cgm.csv --output-json results/fingerprint.json --expires-days 365
@@ -310,21 +318,17 @@ mdmp registry init --registry registry/mdmp_registry.json
310
318
  mdmp registry push --registry registry/mdmp_registry.json --report results/mdmp_report.json
311
319
  ```
312
320
 
313
- ## Dual Repo Workflow
314
- - SDK repo: `python35/IINTS-SDK`
315
- - MDMP repo: `python35/MDMP`
321
+ ## Bundled MDMP
316
322
 
317
- Local helper scripts:
318
- - `tools/dev/dual_repo_status.sh`
319
- - `tools/dev/dual_repo_commit_push.sh`
323
+ MDMP now ships inside the SDK, so the SDK no longer depends on a separate public MDMP repository checkout.
320
324
 
321
- Full process: `docs/DUAL_REPO_WORKFLOW.md`
325
+ That means:
326
+ - `iints mdmp ...` stays available
327
+ - the bundled `mdmp` CLI can still be used
328
+ - local AI signing and verification can still use `mdmp_core`
322
329
 
323
- MDMP sync CI gate:
324
- - `.github/workflows/mdmp-sync.yml`
325
- - Uses private-repo checkout when `MDMP_REPO_TOKEN` is configured.
326
- - Falls back to `mdmp-protocol` from PyPI when checkout is unavailable.
327
- - Auto dependency updates for MDMP are handled via Dependabot (`.github/dependabot.yml`).
330
+ Reference:
331
+ - `docs/DUAL_REPO_WORKFLOW.md`
328
332
 
329
333
  ## Tools Layout
330
334
 
@@ -1,15 +1,17 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61.0"]
2
+ requires = ["setuptools>=77.0.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "iints-sdk-python35"
7
- version = "1.3.2"
7
+ version = "1.4.0"
8
8
  authors = [
9
9
  { name="Rune Bobbaers", email="rune.bobbaers@gmail.com" },
10
10
  ]
11
11
  description = "A pre-clinical Edge-AI SDK for diabetes management validation."
12
12
  readme = "README.md"
13
+ license = "Apache-2.0"
14
+ license-files = ["LICENSE", "NOTICE", "LICENSE-MIT-IINTS-LEGACY"]
13
15
  requires-python = ">=3.10"
14
16
  classifiers = [
15
17
  "Programming Language :: Python :: 3",
@@ -17,7 +19,6 @@ classifiers = [
17
19
  "Programming Language :: Python :: 3.11",
18
20
  "Programming Language :: Python :: 3.12",
19
21
  "Programming Language :: Python :: 3.13",
20
- "License :: OSI Approved :: MIT License",
21
22
  "Operating System :: OS Independent",
22
23
  "Development Status :: 5 - Production/Stable",
23
24
  ]
@@ -60,12 +61,13 @@ research = [
60
61
  "onnxscript>=0.1.0",
61
62
  ]
62
63
  mdmp = [
63
- "mdmp-protocol>=0.3.0",
64
+ "cryptography>=42.0.0",
64
65
  ]
65
66
 
66
67
  [project.scripts]
67
68
  iints = "iints.cli.cli:app"
68
69
  iints-sdk-doctor = "iints_sdk_python35_doctor:main"
70
+ mdmp = "mdmp_core.cli:app"
69
71
 
70
72
  [project.entry-points."iints.algorithms"]
71
73
  "PID Controller" = "iints.core.algorithms.pid_controller:PIDController"
@@ -92,3 +94,7 @@ iints = [
92
94
  "presets/*.json",
93
95
  "presets/*.yaml",
94
96
  ]
97
+ mdmp_core = [
98
+ "keys/*.pem",
99
+ "data/conformance/vectors/*.json",
100
+ ]
@@ -11,7 +11,7 @@ except ImportError: # pragma: no cover - Python < 3.8 fallback
11
11
  try:
12
12
  __version__ = version("iints-sdk-python35")
13
13
  except PackageNotFoundError: # pragma: no cover - source tree fallback
14
- __version__ = "1.3.2"
14
+ __version__ = "1.4.0"
15
15
 
16
16
  # Note to developers: this SDK is currently maintained by a single author.
17
17
  # Please report bugs via GitHub issues and feel free to contribute fixes via PRs.
@@ -2,9 +2,11 @@ from __future__ import annotations
2
2
 
3
3
  import json
4
4
  import os
5
+ from ipaddress import ip_address
5
6
  from http.client import IncompleteRead, RemoteDisconnected
6
7
  from time import sleep
7
8
  from urllib import error, request
9
+ from urllib.parse import urlparse
8
10
 
9
11
 
10
12
  DEFAULT_OLLAMA_HOST = "http://127.0.0.1:11434"
@@ -35,10 +37,38 @@ class OllamaBackend:
35
37
  timeout_seconds: float = 120.0,
36
38
  ) -> None:
37
39
  self.model_name = model_name
38
- self.base_url = (base_url or os.getenv("OLLAMA_HOST") or DEFAULT_OLLAMA_HOST).rstrip("/")
40
+ raw_base_url = base_url or os.getenv("OLLAMA_HOST") or DEFAULT_OLLAMA_HOST
41
+ self.base_url = self._validate_base_url(raw_base_url)
39
42
  self.timeout_seconds = timeout_seconds
40
43
  self.resolved_model_name: str | None = None
41
44
 
45
+ @staticmethod
46
+ def _is_loopback_host(hostname: str) -> bool:
47
+ if hostname == "localhost":
48
+ return True
49
+ try:
50
+ return ip_address(hostname).is_loopback
51
+ except ValueError:
52
+ return False
53
+
54
+ @classmethod
55
+ def _validate_base_url(cls, raw_base_url: str) -> str:
56
+ parsed = urlparse(raw_base_url)
57
+ if parsed.scheme not in {"http", "https"}:
58
+ raise ValueError(
59
+ "OLLAMA_HOST/base_url must use http or https. Other URL schemes are blocked."
60
+ )
61
+ if not parsed.hostname:
62
+ raise ValueError("OLLAMA_HOST/base_url must include a hostname.")
63
+ if parsed.path not in {"", "/"}:
64
+ raise ValueError("OLLAMA_HOST/base_url must not include a path component.")
65
+ if not cls._is_loopback_host(parsed.hostname) and os.getenv("IINTS_ALLOW_REMOTE_OLLAMA") != "1":
66
+ raise ValueError(
67
+ "Remote Ollama endpoints are disabled by default. "
68
+ "Use localhost/127.0.0.1 or set IINTS_ALLOW_REMOTE_OLLAMA=1 explicitly."
69
+ )
70
+ return raw_base_url.rstrip("/")
71
+
42
72
  def _pull_hint(self) -> str:
43
73
  return f"ollama pull {self.model_name}"
44
74
 
@@ -102,7 +132,7 @@ class OllamaBackend:
102
132
  headers["Content-Type"] = "application/json"
103
133
  req = request.Request(url, data=body, headers=headers, method=method)
104
134
  try:
105
- with request.urlopen(req, timeout=self.timeout_seconds) as response:
135
+ with request.urlopen(req, timeout=self.timeout_seconds) as response: # nosec B310 - base_url is scheme/host validated
106
136
  text = response.read().decode("utf-8")
107
137
  except error.HTTPError as exc:
108
138
  detail = exc.read().decode("utf-8", errors="replace").strip()
@@ -14,9 +14,8 @@ def _load_mdmp_verifier() -> type[Any]:
14
14
  module = importlib.import_module("mdmp_core")
15
15
  except Exception as exc:
16
16
  raise ImportError(
17
- "MDMP verification requires the optional standalone package.\n"
18
- "Install with: pip install iints-sdk-python35[mdmp]\n"
19
- "or: pip install 'mdmp-protocol>=0.3.0'"
17
+ "MDMP verification requires the bundled MDMP crypto support.\n"
18
+ "Install with: pip install iints-sdk-python35[mdmp]"
20
19
  ) from exc
21
20
  verifier_cls = getattr(module, "MDMPVerifier", None)
22
21
  if verifier_cls is None:
@@ -245,7 +245,7 @@ def _load_mdmp_signer_tools() -> tuple[type[Any], Any]:
245
245
  module = importlib.import_module("mdmp_core")
246
246
  except Exception as exc:
247
247
  raise ImportError(
248
- "Local AI certification requires the optional standalone MDMP package.\n"
248
+ "Local AI certification requires the bundled MDMP crypto support.\n"
249
249
  "Install with: pip install 'iints-sdk-python35[mdmp]'"
250
250
  ) from exc
251
251
 
@@ -144,6 +144,12 @@ class ClinicalMetricsCalculator:
144
144
  """
145
145
  self.target_range = target_range
146
146
  self.tight_range = tight_range
147
+
148
+ @staticmethod
149
+ def _percentage(mask: pd.Series) -> float:
150
+ if len(mask) == 0:
151
+ return 0.0
152
+ return float(mask.sum()) / float(len(mask)) * 100.0
147
153
 
148
154
  def calculate_tir(self,
149
155
  glucose: pd.Series,
@@ -169,13 +175,13 @@ class ClinicalMetricsCalculator:
169
175
  def calculate_all_tir_metrics(self, glucose: pd.Series) -> Dict[str, float]:
170
176
  """Calculate all TIR-related metrics"""
171
177
  return {
172
- 'tir_70_180': self.calculate_tir(glucose, 70, 180),
173
- 'tir_70_140': self.calculate_tir(glucose, 70, 140),
174
- 'tir_70_110': self.calculate_tir(glucose, 70, 110),
175
- 'tir_below_70': self.calculate_tir(glucose, 0, 70),
176
- 'tir_below_54': self.calculate_tir(glucose, 0, 54),
177
- 'tir_above_180': self.calculate_tir(glucose, 180, 600),
178
- 'tir_above_250': self.calculate_tir(glucose, 250, 600)
178
+ 'tir_70_180': self._percentage((glucose >= 70) & (glucose <= 180)),
179
+ 'tir_70_140': self._percentage((glucose >= 70) & (glucose <= 140)),
180
+ 'tir_70_110': self._percentage((glucose >= 70) & (glucose <= 110)),
181
+ 'tir_below_70': self._percentage(glucose < 70),
182
+ 'tir_below_54': self._percentage(glucose < 54),
183
+ 'tir_above_180': self._percentage(glucose > 180),
184
+ 'tir_above_250': self._percentage(glucose > 250)
179
185
  }
180
186
 
181
187
  def calculate_gmi(self, glucose: pd.Series) -> float:
@@ -4,6 +4,12 @@ from typing import Dict, List, Tuple, Optional, Any
4
4
  from dataclasses import dataclass
5
5
  from enum import Enum
6
6
 
7
+ from iints.core.safety.config import (
8
+ SENSOR_GLUCOSE_MAX_MGDL,
9
+ SENSOR_GLUCOSE_MIN_MGDL,
10
+ SENSOR_MAX_GLUCOSE_RATE_PER_MIN_MGDL,
11
+ )
12
+
7
13
  class ReliabilityLevel(Enum):
8
14
  HIGH = "high"
9
15
  MEDIUM = "medium"
@@ -22,9 +28,9 @@ class DataIntegrityValidator:
22
28
  """Validates data integrity for reverse engineering analysis."""
23
29
 
24
30
  def __init__(self):
25
- # Physiological limits
26
- self.max_glucose_rate = 10 # mg/dL per minute
27
- self.glucose_range = (20, 600) # Physiologically possible range
31
+ # Broad CGM/sensor fail-soft limits
32
+ self.max_glucose_rate = SENSOR_MAX_GLUCOSE_RATE_PER_MIN_MGDL
33
+ self.glucose_range = (SENSOR_GLUCOSE_MIN_MGDL, SENSOR_GLUCOSE_MAX_MGDL)
28
34
  self.max_insulin_per_step = 5.0 # Units per 5-min step
29
35
 
30
36
  def validate_glucose_data(self, glucose_values: List[float], timestamps: List[float]) -> ValidationResult:
@@ -270,4 +276,4 @@ class ReverseEngineeringValidator:
270
276
  "issues": all_issues,
271
277
  "warnings": all_warnings,
272
278
  "category_scores": {category: result.reliability_score for category, result in validation_results.items()}
273
- }
279
+ }
@@ -46,7 +46,7 @@ class BergmanParameters:
46
46
  n: float = 0.23 # 1/min — fractional insulin degradation
47
47
  Ib: float = 7.0 # mU/L — basal plasma insulin
48
48
  Vi: float = 0.05 # L/kg — insulin distribution volume
49
- gamma: float = 0.004 # (mU/L)/(mg/dL)/min — endogenous secretion gain
49
+ gamma: float = 0.0 # (mU/L)/(mg/dL)/min — endogenous secretion gain (0 for T1D default)
50
50
  h: float = 80.0 # mg/dL — secretion glucose threshold
51
51
 
52
52
  # --- Gut absorption ---
@@ -330,7 +330,8 @@ class BergmanPatientModel:
330
330
  dXdt = -p.p2 * X + p.p3 * max(I - p.Ib, 0.0)
331
331
 
332
332
  # --- dI/dt ---
333
- # Endogenous pancreatic secretion (blunted in T1D, but kept for generality)
333
+ # T1D defaults keep endogenous secretion disabled (gamma=0). Override
334
+ # gamma explicitly if you intentionally want residual beta-cell function.
334
335
  secretion = p.gamma * max(G - p.h, 0.0)
335
336
  dIdt = -p.n * (I - p.Ib) + secretion + u_insulin_mu_per_min / Vi_abs
336
337
 
@@ -14,7 +14,7 @@ class CustomPatientModel:
14
14
  This model is intended for educational and stress-testing purposes, not for clinical accuracy.
15
15
  """
16
16
  def __init__(self, basal_insulin_rate: float = 0.8, insulin_sensitivity: float = 50.0,
17
- carb_factor: float = 10.0, glucose_decay_rate: float = 0.002,
17
+ carb_factor: float = 10.0, glucose_decay_rate: float = 0.05,
18
18
  initial_glucose: float = 120.0, glucose_absorption_rate: float = 0.03,
19
19
  basal_glucose_target: Optional[float] = None,
20
20
  insulin_action_duration: float = 300.0, # minutes, e.g., 5 hours
@@ -63,14 +63,14 @@ class PatientFactory:
63
63
  """Get a diverse set of patients for population studies."""
64
64
  if not SIMGLUCOSE_AVAILABLE:
65
65
  # Create diverse custom patients with different parameters
66
- return [
67
- CustomPatientModel(initial_glucose=120, insulin_sensitivity=40), # High sensitivity
68
- CustomPatientModel(initial_glucose=120, insulin_sensitivity=60), # Low sensitivity
69
- CustomPatientModel(initial_glucose=120, carb_factor=8), # Fast carb absorption
70
- CustomPatientModel(initial_glucose=120, carb_factor=12), # Slow carb absorption
71
- CustomPatientModel(initial_glucose=120, glucose_decay_rate=0.0015), # Slow metabolism
72
- CustomPatientModel(initial_glucose=120, glucose_decay_rate=0.0035), # Fast metabolism
73
- ]
66
+ return [
67
+ CustomPatientModel(initial_glucose=120, insulin_sensitivity=40), # High sensitivity
68
+ CustomPatientModel(initial_glucose=120, insulin_sensitivity=60), # Low sensitivity
69
+ CustomPatientModel(initial_glucose=120, carb_factor=8), # Fast carb absorption
70
+ CustomPatientModel(initial_glucose=120, carb_factor=12), # Slow carb absorption
71
+ CustomPatientModel(initial_glucose=120, glucose_decay_rate=0.03), # Slower homeostatic drift
72
+ CustomPatientModel(initial_glucose=120, glucose_decay_rate=0.07), # Faster homeostatic drift
73
+ ]
74
74
  else:
75
75
  # Use FDA-approved virtual patients
76
76
  selected_patients = [
@@ -18,7 +18,7 @@ class PatientProfile:
18
18
  dawn_end_hour: float = 8.0
19
19
 
20
20
  # Advanced knobs (optional)
21
- glucose_decay_rate: float = 0.002
21
+ glucose_decay_rate: float = 0.05
22
22
  glucose_absorption_rate: float = 0.03
23
23
  insulin_action_duration: float = 300.0
24
24
  insulin_peak_time: float = 75.0