mint-sdk 1.0.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 (272) hide show
  1. mint_sdk-1.0.0/.gitignore +104 -0
  2. mint_sdk-1.0.0/PKG-INFO +197 -0
  3. mint_sdk-1.0.0/README.md +166 -0
  4. mint_sdk-1.0.0/pyproject.toml +50 -0
  5. mint_sdk-1.0.0/src/mint_sdk/__init__.py +354 -0
  6. mint_sdk-1.0.0/src/mint_sdk/_discover.py +313 -0
  7. mint_sdk-1.0.0/src/mint_sdk/_prompt.py +228 -0
  8. mint_sdk-1.0.0/src/mint_sdk/_version.py +24 -0
  9. mint_sdk-1.0.0/src/mint_sdk/add_backend_artifact.py +52 -0
  10. mint_sdk-1.0.0/src/mint_sdk/add_backend_commands.py +356 -0
  11. mint_sdk-1.0.0/src/mint_sdk/add_backend_endpoint.py +38 -0
  12. mint_sdk-1.0.0/src/mint_sdk/add_backend_hook.py +56 -0
  13. mint_sdk-1.0.0/src/mint_sdk/add_backend_job.py +145 -0
  14. mint_sdk-1.0.0/src/mint_sdk/add_backend_migration.py +47 -0
  15. mint_sdk-1.0.0/src/mint_sdk/add_backend_router.py +36 -0
  16. mint_sdk-1.0.0/src/mint_sdk/add_backend_schema.py +42 -0
  17. mint_sdk-1.0.0/src/mint_sdk/add_backend_service.py +56 -0
  18. mint_sdk-1.0.0/src/mint_sdk/add_backend_setting.py +34 -0
  19. mint_sdk-1.0.0/src/mint_sdk/add_backend_wiring.py +97 -0
  20. mint_sdk-1.0.0/src/mint_sdk/add_command.py +67 -0
  21. mint_sdk-1.0.0/src/mint_sdk/add_data_template_backend_templates.py +379 -0
  22. mint_sdk-1.0.0/src/mint_sdk/add_data_template_commands.py +260 -0
  23. mint_sdk-1.0.0/src/mint_sdk/add_data_template_frontend_assay_templates.py +364 -0
  24. mint_sdk-1.0.0/src/mint_sdk/add_data_template_frontend_core_templates.py +194 -0
  25. mint_sdk-1.0.0/src/mint_sdk/add_data_template_frontend_helpers.py +107 -0
  26. mint_sdk-1.0.0/src/mint_sdk/add_data_template_frontend_lab_templates.py +201 -0
  27. mint_sdk-1.0.0/src/mint_sdk/add_data_template_frontend_pack_templates.py +249 -0
  28. mint_sdk-1.0.0/src/mint_sdk/add_data_template_frontend_panel_templates.py +199 -0
  29. mint_sdk-1.0.0/src/mint_sdk/add_data_template_frontend_templates.py +145 -0
  30. mint_sdk-1.0.0/src/mint_sdk/add_data_template_frontend_workflow_templates.py +206 -0
  31. mint_sdk-1.0.0/src/mint_sdk/add_data_template_router_templates.py +295 -0
  32. mint_sdk-1.0.0/src/mint_sdk/add_field_specs.py +112 -0
  33. mint_sdk-1.0.0/src/mint_sdk/add_frontend_commands.py +106 -0
  34. mint_sdk-1.0.0/src/mint_sdk/add_frontend_routes.py +228 -0
  35. mint_sdk-1.0.0/src/mint_sdk/add_naming.py +20 -0
  36. mint_sdk-1.0.0/src/mint_sdk/add_project.py +61 -0
  37. mint_sdk-1.0.0/src/mint_sdk/add_r_analysis_command.py +119 -0
  38. mint_sdk-1.0.0/src/mint_sdk/add_r_templates.py +410 -0
  39. mint_sdk-1.0.0/src/mint_sdk/add_source_edits.py +240 -0
  40. mint_sdk-1.0.0/src/mint_sdk/add_template_catalog.py +88 -0
  41. mint_sdk-1.0.0/src/mint_sdk/ai_instructions.md.template +310 -0
  42. mint_sdk-1.0.0/src/mint_sdk/app.py +264 -0
  43. mint_sdk-1.0.0/src/mint_sdk/cli.py +385 -0
  44. mint_sdk-1.0.0/src/mint_sdk/cli_build.py +226 -0
  45. mint_sdk-1.0.0/src/mint_sdk/cli_build_cmd.py +67 -0
  46. mint_sdk-1.0.0/src/mint_sdk/cli_commands/__init__.py +0 -0
  47. mint_sdk-1.0.0/src/mint_sdk/cli_commands/_utils.py +40 -0
  48. mint_sdk-1.0.0/src/mint_sdk/cli_commands/add_scaffold_cmd.py +203 -0
  49. mint_sdk-1.0.0/src/mint_sdk/cli_commands/add_templates_cmd.py +138 -0
  50. mint_sdk-1.0.0/src/mint_sdk/cli_commands/admin_cmd.py +459 -0
  51. mint_sdk-1.0.0/src/mint_sdk/cli_commands/auth_cmd.py +116 -0
  52. mint_sdk-1.0.0/src/mint_sdk/cli_commands/debug_cmd.py +263 -0
  53. mint_sdk-1.0.0/src/mint_sdk/cli_commands/experiment_cmd.py +288 -0
  54. mint_sdk-1.0.0/src/mint_sdk/cli_commands/init_cmd.py +77 -0
  55. mint_sdk-1.0.0/src/mint_sdk/cli_commands/plugin_cmd.py +320 -0
  56. mint_sdk-1.0.0/src/mint_sdk/cli_commands/project_cmd.py +211 -0
  57. mint_sdk-1.0.0/src/mint_sdk/cli_commands/status_cmd.py +68 -0
  58. mint_sdk-1.0.0/src/mint_sdk/cli_commands/status_formatting.py +21 -0
  59. mint_sdk-1.0.0/src/mint_sdk/cli_data_templates.py +166 -0
  60. mint_sdk-1.0.0/src/mint_sdk/cli_init_catalog.py +47 -0
  61. mint_sdk-1.0.0/src/mint_sdk/client/__init__.py +55 -0
  62. mint_sdk-1.0.0/src/mint_sdk/client/_config.py +159 -0
  63. mint_sdk-1.0.0/src/mint_sdk/client/_exceptions.py +130 -0
  64. mint_sdk-1.0.0/src/mint_sdk/client/_http.py +147 -0
  65. mint_sdk-1.0.0/src/mint_sdk/client/_types.py +90 -0
  66. mint_sdk-1.0.0/src/mint_sdk/client/client.py +140 -0
  67. mint_sdk-1.0.0/src/mint_sdk/client/resources/__init__.py +0 -0
  68. mint_sdk-1.0.0/src/mint_sdk/client/resources/admin.py +166 -0
  69. mint_sdk-1.0.0/src/mint_sdk/client/resources/auth.py +75 -0
  70. mint_sdk-1.0.0/src/mint_sdk/client/resources/experiments.py +277 -0
  71. mint_sdk-1.0.0/src/mint_sdk/client/resources/plugins.py +79 -0
  72. mint_sdk-1.0.0/src/mint_sdk/client/resources/projects.py +82 -0
  73. mint_sdk-1.0.0/src/mint_sdk/client/resources/updates.py +60 -0
  74. mint_sdk-1.0.0/src/mint_sdk/context.py +103 -0
  75. mint_sdk-1.0.0/src/mint_sdk/contract.py +388 -0
  76. mint_sdk-1.0.0/src/mint_sdk/contract_ts_types.py +182 -0
  77. mint_sdk-1.0.0/src/mint_sdk/contract_typescript.py +361 -0
  78. mint_sdk-1.0.0/src/mint_sdk/deprecated_api_catalog.py +437 -0
  79. mint_sdk-1.0.0/src/mint_sdk/deprecated_apis.py +77 -0
  80. mint_sdk-1.0.0/src/mint_sdk/deprecated_frontend_destructure_patterns.py +103 -0
  81. mint_sdk-1.0.0/src/mint_sdk/deprecated_frontend_doc_text_patterns.py +78 -0
  82. mint_sdk-1.0.0/src/mint_sdk/deprecated_frontend_expression_patterns.py +126 -0
  83. mint_sdk-1.0.0/src/mint_sdk/deprecated_frontend_import_patterns.py +157 -0
  84. mint_sdk-1.0.0/src/mint_sdk/deprecated_frontend_tag_patterns.py +191 -0
  85. mint_sdk-1.0.0/src/mint_sdk/deps_command.py +271 -0
  86. mint_sdk-1.0.0/src/mint_sdk/dev_command.py +334 -0
  87. mint_sdk-1.0.0/src/mint_sdk/dev_proxy_config.py +178 -0
  88. mint_sdk-1.0.0/src/mint_sdk/docs/__init__.py +1 -0
  89. mint_sdk-1.0.0/src/mint_sdk/docs/bundled/frontend.json +16845 -0
  90. mint_sdk-1.0.0/src/mint_sdk/docs/cache.py +135 -0
  91. mint_sdk-1.0.0/src/mint_sdk/docs/contract_docs.py +298 -0
  92. mint_sdk-1.0.0/src/mint_sdk/docs/formatter.py +356 -0
  93. mint_sdk-1.0.0/src/mint_sdk/docs/frontend_component_catalog.py +160 -0
  94. mint_sdk-1.0.0/src/mint_sdk/docs/frontend_component_chooser.py +290 -0
  95. mint_sdk-1.0.0/src/mint_sdk/docs/frontend_css_formatters.py +88 -0
  96. mint_sdk-1.0.0/src/mint_sdk/docs/frontend_detail_formatters.py +237 -0
  97. mint_sdk-1.0.0/src/mint_sdk/docs/frontend_extractor.py +79 -0
  98. mint_sdk-1.0.0/src/mint_sdk/docs/frontend_usage_snippets.py +331 -0
  99. mint_sdk-1.0.0/src/mint_sdk/docs/manifest_lookup.py +87 -0
  100. mint_sdk-1.0.0/src/mint_sdk/docs/python_detail_formatters.py +197 -0
  101. mint_sdk-1.0.0/src/mint_sdk/docs/python_extractor.py +324 -0
  102. mint_sdk-1.0.0/src/mint_sdk/docs/python_introspection.py +121 -0
  103. mint_sdk-1.0.0/src/mint_sdk/docs/reference_docs.py +453 -0
  104. mint_sdk-1.0.0/src/mint_sdk/docs/reference_guides.py +306 -0
  105. mint_sdk-1.0.0/src/mint_sdk/docs/reference_search.py +291 -0
  106. mint_sdk-1.0.0/src/mint_sdk/docs/search.py +235 -0
  107. mint_sdk-1.0.0/src/mint_sdk/docs/suggestions.py +23 -0
  108. mint_sdk-1.0.0/src/mint_sdk/docs/template_data.py +24 -0
  109. mint_sdk-1.0.0/src/mint_sdk/docs/template_docs.py +316 -0
  110. mint_sdk-1.0.0/src/mint_sdk/docs/template_search.py +218 -0
  111. mint_sdk-1.0.0/src/mint_sdk/docs/template_usage.py +126 -0
  112. mint_sdk-1.0.0/src/mint_sdk/docs/terminal_style.py +44 -0
  113. mint_sdk-1.0.0/src/mint_sdk/docs/topic_routes.py +135 -0
  114. mint_sdk-1.0.0/src/mint_sdk/docs_command.py +303 -0
  115. mint_sdk-1.0.0/src/mint_sdk/doctor_command.py +374 -0
  116. mint_sdk-1.0.0/src/mint_sdk/doctor_deprecated_api_usage.py +184 -0
  117. mint_sdk-1.0.0/src/mint_sdk/doctor_deprecated_frontend.py +210 -0
  118. mint_sdk-1.0.0/src/mint_sdk/doctor_deprecated_python.py +23 -0
  119. mint_sdk-1.0.0/src/mint_sdk/doctor_fixes.py +115 -0
  120. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_checks.py +261 -0
  121. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_component_guidance.py +230 -0
  122. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_component_patterns.py +79 -0
  123. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_guidance.py +188 -0
  124. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_import_guidance.py +102 -0
  125. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_sdk_catalog.py +364 -0
  126. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_sdk_patterns.py +95 -0
  127. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_sidebar_guidance.py +199 -0
  128. mint_sdk-1.0.0/src/mint_sdk/doctor_frontend_source_utils.py +31 -0
  129. mint_sdk-1.0.0/src/mint_sdk/doctor_guidance.py +77 -0
  130. mint_sdk-1.0.0/src/mint_sdk/doctor_models.py +85 -0
  131. mint_sdk-1.0.0/src/mint_sdk/doctor_output.py +110 -0
  132. mint_sdk-1.0.0/src/mint_sdk/doctor_plugin_metadata.py +346 -0
  133. mint_sdk-1.0.0/src/mint_sdk/doctor_r_command.py +47 -0
  134. mint_sdk-1.0.0/src/mint_sdk/doctor_scan_config.py +63 -0
  135. mint_sdk-1.0.0/src/mint_sdk/doctor_sdk_checks.py +90 -0
  136. mint_sdk-1.0.0/src/mint_sdk/doctor_source_files.py +81 -0
  137. mint_sdk-1.0.0/src/mint_sdk/exceptions.py +311 -0
  138. mint_sdk-1.0.0/src/mint_sdk/export.py +177 -0
  139. mint_sdk-1.0.0/src/mint_sdk/export_common.py +69 -0
  140. mint_sdk-1.0.0/src/mint_sdk/export_tree.py +180 -0
  141. mint_sdk-1.0.0/src/mint_sdk/info_command.py +74 -0
  142. mint_sdk-1.0.0/src/mint_sdk/init_ai.py +67 -0
  143. mint_sdk-1.0.0/src/mint_sdk/init_backend_templates.py +480 -0
  144. mint_sdk-1.0.0/src/mint_sdk/init_command.py +369 -0
  145. mint_sdk-1.0.0/src/mint_sdk/init_files.py +182 -0
  146. mint_sdk-1.0.0/src/mint_sdk/init_frontend_templates.py +346 -0
  147. mint_sdk-1.0.0/src/mint_sdk/init_naming.py +49 -0
  148. mint_sdk-1.0.0/src/mint_sdk/init_post_scaffold.py +102 -0
  149. mint_sdk-1.0.0/src/mint_sdk/init_script_templates.py +73 -0
  150. mint_sdk-1.0.0/src/mint_sdk/init_template_catalog.py +230 -0
  151. mint_sdk-1.0.0/src/mint_sdk/init_templates.py +74 -0
  152. mint_sdk-1.0.0/src/mint_sdk/init_versions.py +77 -0
  153. mint_sdk-1.0.0/src/mint_sdk/init_workflow_templates.py +131 -0
  154. mint_sdk-1.0.0/src/mint_sdk/instrument.py +235 -0
  155. mint_sdk-1.0.0/src/mint_sdk/jobs.py +398 -0
  156. mint_sdk-1.0.0/src/mint_sdk/lcms.py +408 -0
  157. mint_sdk-1.0.0/src/mint_sdk/link_command.py +218 -0
  158. mint_sdk-1.0.0/src/mint_sdk/local_database.py +158 -0
  159. mint_sdk-1.0.0/src/mint_sdk/logging.py +49 -0
  160. mint_sdk-1.0.0/src/mint_sdk/logs_command.py +137 -0
  161. mint_sdk-1.0.0/src/mint_sdk/migrations/__init__.py +22 -0
  162. mint_sdk-1.0.0/src/mint_sdk/migrations/base.py +54 -0
  163. mint_sdk-1.0.0/src/mint_sdk/migrations/errors.py +54 -0
  164. mint_sdk-1.0.0/src/mint_sdk/migrations/locking.py +66 -0
  165. mint_sdk-1.0.0/src/mint_sdk/migrations/ops.py +328 -0
  166. mint_sdk-1.0.0/src/mint_sdk/migrations/runner.py +321 -0
  167. mint_sdk-1.0.0/src/mint_sdk/models.py +73 -0
  168. mint_sdk-1.0.0/src/mint_sdk/permissions.py +160 -0
  169. mint_sdk-1.0.0/src/mint_sdk/plugin.py +210 -0
  170. mint_sdk-1.0.0/src/mint_sdk/plugin_exports.py +27 -0
  171. mint_sdk-1.0.0/src/mint_sdk/plugin_frontend.py +65 -0
  172. mint_sdk-1.0.0/src/mint_sdk/plugin_lifecycle.py +48 -0
  173. mint_sdk-1.0.0/src/mint_sdk/plugin_persistence.py +252 -0
  174. mint_sdk-1.0.0/src/mint_sdk/plugin_settings.py +99 -0
  175. mint_sdk-1.0.0/src/mint_sdk/py.typed +0 -0
  176. mint_sdk-1.0.0/src/mint_sdk/r.py +374 -0
  177. mint_sdk-1.0.0/src/mint_sdk/remote_context.py +391 -0
  178. mint_sdk-1.0.0/src/mint_sdk/repositories.py +273 -0
  179. mint_sdk-1.0.0/src/mint_sdk/schema.py +176 -0
  180. mint_sdk-1.0.0/src/mint_sdk/sdk_generate_command.py +71 -0
  181. mint_sdk-1.0.0/src/mint_sdk/templates/__init__.py +221 -0
  182. mint_sdk-1.0.0/src/mint_sdk/templates/assay_matrix.py +214 -0
  183. mint_sdk-1.0.0/src/mint_sdk/templates/base.py +358 -0
  184. mint_sdk-1.0.0/src/mint_sdk/templates/calibration_curve.py +248 -0
  185. mint_sdk-1.0.0/src/mint_sdk/templates/catalog.py +326 -0
  186. mint_sdk-1.0.0/src/mint_sdk/templates/dose_response.py +125 -0
  187. mint_sdk-1.0.0/src/mint_sdk/templates/flow_cytometry_panel.py +174 -0
  188. mint_sdk-1.0.0/src/mint_sdk/templates/instrument_run.py +252 -0
  189. mint_sdk-1.0.0/src/mint_sdk/templates/packs.py +164 -0
  190. mint_sdk-1.0.0/src/mint_sdk/templates/plate_map.py +212 -0
  191. mint_sdk-1.0.0/src/mint_sdk/templates/preset_catalog.py +266 -0
  192. mint_sdk-1.0.0/src/mint_sdk/templates/preset_helpers.py +167 -0
  193. mint_sdk-1.0.0/src/mint_sdk/templates/presets.py +408 -0
  194. mint_sdk-1.0.0/src/mint_sdk/templates/protocol_steps.py +107 -0
  195. mint_sdk-1.0.0/src/mint_sdk/templates/qpcr_plate.py +254 -0
  196. mint_sdk-1.0.0/src/mint_sdk/templates/reagent_list.py +101 -0
  197. mint_sdk-1.0.0/src/mint_sdk/templates/sample_prep.py +180 -0
  198. mint_sdk-1.0.0/src/mint_sdk/templates/sample_sheet.py +158 -0
  199. mint_sdk-1.0.0/src/mint_sdk/templates/time_course.py +189 -0
  200. mint_sdk-1.0.0/src/mint_sdk/testing/__init__.py +36 -0
  201. mint_sdk-1.0.0/src/mint_sdk/testing/plugins.py +135 -0
  202. mint_sdk-1.0.0/src/mint_sdk/testing/recording_context.py +185 -0
  203. mint_sdk-1.0.0/src/mint_sdk/testing/subprocess.py +88 -0
  204. mint_sdk-1.0.0/src/mint_sdk/update_command.py +255 -0
  205. mint_sdk-1.0.0/tests/__init__.py +0 -0
  206. mint_sdk-1.0.0/tests/conftest.py +22 -0
  207. mint_sdk-1.0.0/tests/test_add_backend_artifact.py +22 -0
  208. mint_sdk-1.0.0/tests/test_add_backend_endpoint.py +41 -0
  209. mint_sdk-1.0.0/tests/test_add_backend_hook.py +39 -0
  210. mint_sdk-1.0.0/tests/test_add_backend_job.py +64 -0
  211. mint_sdk-1.0.0/tests/test_add_backend_migration.py +42 -0
  212. mint_sdk-1.0.0/tests/test_add_backend_router.py +38 -0
  213. mint_sdk-1.0.0/tests/test_add_backend_schema.py +48 -0
  214. mint_sdk-1.0.0/tests/test_add_backend_service.py +47 -0
  215. mint_sdk-1.0.0/tests/test_add_backend_setting.py +42 -0
  216. mint_sdk-1.0.0/tests/test_add_command.py +1199 -0
  217. mint_sdk-1.0.0/tests/test_add_r_templates.py +42 -0
  218. mint_sdk-1.0.0/tests/test_app.py +154 -0
  219. mint_sdk-1.0.0/tests/test_cli.py +463 -0
  220. mint_sdk-1.0.0/tests/test_cli_command_utils.py +35 -0
  221. mint_sdk-1.0.0/tests/test_cli_status_formatting.py +17 -0
  222. mint_sdk-1.0.0/tests/test_cli_typer.py +630 -0
  223. mint_sdk-1.0.0/tests/test_client/__init__.py +0 -0
  224. mint_sdk-1.0.0/tests/test_client/test_admin_plugin_update_api.py +235 -0
  225. mint_sdk-1.0.0/tests/test_client/test_auth_api.py +151 -0
  226. mint_sdk-1.0.0/tests/test_client/test_client.py +192 -0
  227. mint_sdk-1.0.0/tests/test_client/test_config.py +154 -0
  228. mint_sdk-1.0.0/tests/test_client/test_exceptions.py +96 -0
  229. mint_sdk-1.0.0/tests/test_client/test_experiments_api.py +308 -0
  230. mint_sdk-1.0.0/tests/test_client/test_http.py +284 -0
  231. mint_sdk-1.0.0/tests/test_contract.py +774 -0
  232. mint_sdk-1.0.0/tests/test_dev_command.py +705 -0
  233. mint_sdk-1.0.0/tests/test_discover.py +370 -0
  234. mint_sdk-1.0.0/tests/test_docs_command.py +2508 -0
  235. mint_sdk-1.0.0/tests/test_docs_manifest_lookup.py +53 -0
  236. mint_sdk-1.0.0/tests/test_docs_python_detail_formatters.py +93 -0
  237. mint_sdk-1.0.0/tests/test_docs_python_introspection.py +63 -0
  238. mint_sdk-1.0.0/tests/test_docs_template_search.py +29 -0
  239. mint_sdk-1.0.0/tests/test_doctor_command.py +3601 -0
  240. mint_sdk-1.0.0/tests/test_doctor_output.py +80 -0
  241. mint_sdk-1.0.0/tests/test_doctor_r_command.py +51 -0
  242. mint_sdk-1.0.0/tests/test_doctor_sdk_checks.py +46 -0
  243. mint_sdk-1.0.0/tests/test_exceptions.py +169 -0
  244. mint_sdk-1.0.0/tests/test_export.py +301 -0
  245. mint_sdk-1.0.0/tests/test_info_command.py +168 -0
  246. mint_sdk-1.0.0/tests/test_init_command.py +986 -0
  247. mint_sdk-1.0.0/tests/test_instrument.py +84 -0
  248. mint_sdk-1.0.0/tests/test_jobs.py +119 -0
  249. mint_sdk-1.0.0/tests/test_lcms.py +140 -0
  250. mint_sdk-1.0.0/tests/test_link_command.py +311 -0
  251. mint_sdk-1.0.0/tests/test_local_database.py +329 -0
  252. mint_sdk-1.0.0/tests/test_logs_command.py +127 -0
  253. mint_sdk-1.0.0/tests/test_migration_base.py +81 -0
  254. mint_sdk-1.0.0/tests/test_migration_errors.py +40 -0
  255. mint_sdk-1.0.0/tests/test_migration_locking.py +30 -0
  256. mint_sdk-1.0.0/tests/test_migration_ops.py +240 -0
  257. mint_sdk-1.0.0/tests/test_migration_runner.py +196 -0
  258. mint_sdk-1.0.0/tests/test_migrations_lazy_import.py +130 -0
  259. mint_sdk-1.0.0/tests/test_models.py +91 -0
  260. mint_sdk-1.0.0/tests/test_models_color.py +25 -0
  261. mint_sdk-1.0.0/tests/test_permissions.py +57 -0
  262. mint_sdk-1.0.0/tests/test_platform_cli_commands.py +524 -0
  263. mint_sdk-1.0.0/tests/test_plugin.py +283 -0
  264. mint_sdk-1.0.0/tests/test_plugin_save_load.py +544 -0
  265. mint_sdk-1.0.0/tests/test_plugin_settings_model.py +315 -0
  266. mint_sdk-1.0.0/tests/test_prompt.py +206 -0
  267. mint_sdk-1.0.0/tests/test_r_bridge.py +238 -0
  268. mint_sdk-1.0.0/tests/test_schema.py +99 -0
  269. mint_sdk-1.0.0/tests/test_sdk_generate_command.py +74 -0
  270. mint_sdk-1.0.0/tests/test_templates.py +1065 -0
  271. mint_sdk-1.0.0/tests/test_testing.py +285 -0
  272. mint_sdk-1.0.0/uv.lock +514 -0
@@ -0,0 +1,104 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ .venv/
8
+ env/
9
+ venv/
10
+ build/
11
+ dist/
12
+ *.egg-info/
13
+ *.egg
14
+
15
+ # Code Quality Tools
16
+ .ruff_cache/
17
+ .mypy_cache/
18
+ .pytest_cache/
19
+ .coverage
20
+ htmlcov/
21
+
22
+ # Node/Frontend
23
+ node_modules/
24
+ /frontend/dist/
25
+ packages/sdk-frontend/dist/
26
+ npm-debug.log*
27
+ bun-debug.log*
28
+ yarn-debug.log*
29
+
30
+ # TypeScript
31
+ *.tsbuildinfo
32
+ frontend/vite.config.d.ts
33
+ frontend/vite.config.js
34
+
35
+ # IDE/Editor
36
+ .vscode/
37
+ .idea/
38
+ *.swp
39
+ *.swo
40
+ *~
41
+
42
+ # OS
43
+ .DS_Store
44
+ .AppleDouble
45
+ Thumbs.db
46
+
47
+ # Environment
48
+ .env
49
+ .env.local
50
+ .env.*.local
51
+ config.json
52
+ config.dev.toml
53
+
54
+ # SDK Python build
55
+ packages/sdk-python/dist/
56
+
57
+ # hatch-vcs generated version files
58
+ api/_version.py
59
+ packages/sdk-python/src/mld_sdk/_version.py
60
+
61
+ # Histoire
62
+ .histoire/
63
+
64
+ # VitePress cache + synced content
65
+ site/.vitepress/cache/
66
+ site/changelog.md
67
+
68
+ # Database
69
+ data/*.db
70
+
71
+ # MLD CLI runtime data
72
+ .mld/
73
+
74
+ # Claude Code
75
+ .claude/
76
+
77
+ # Playwright E2E
78
+ e2e/playwright-report/
79
+ e2e/test-results/
80
+ e2e/blob-report/
81
+
82
+ # Git Worktrees
83
+ .worktrees/
84
+
85
+ # SDK test/eval artifacts
86
+ packages/sdk-python/mld-init-test/
87
+ skills/mint-sdk-plugin/evals/
88
+ skills/mint-sdk-plugin/mint-sdk-plugin-workspace/
89
+
90
+ # Local plugin development
91
+ mld-ms-planner/
92
+
93
+ # Local data
94
+ data/
95
+ frontend/data/
96
+ .superpowers/
97
+ .omx/
98
+ docs/superpowers/
99
+
100
+ # Skill eval/workspace artifacts (post-R-3 paths; old sdk/skill/* patterns
101
+ # above remain until R-3 merges and the rename consolidates)
102
+ skills/mint-sdk-plugin/evals/
103
+ skills/mint-sdk-plugin/mint-sdk-plugin-workspace/
104
+ /AGENTS.md
@@ -0,0 +1,197 @@
1
+ Metadata-Version: 2.4
2
+ Name: mint-sdk
3
+ Version: 1.0.0
4
+ Summary: MINT Plugin SDK - Build analysis plugins for the MINT (Mass-spec INtegrated Toolkit) platform
5
+ Project-URL: Homepage, https://github.com/MorscherLab/MINT
6
+ Project-URL: Documentation, https://github.com/MorscherLab/MINT/tree/main/packages/sdk-python#readme
7
+ Project-URL: Repository, https://github.com/MorscherLab/MINT
8
+ Author-email: MorscherLab <morscher@chem.ethz.ch>
9
+ License-Expression: MIT
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Framework :: FastAPI
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Python: >=3.12
17
+ Requires-Dist: fastapi>=0.109.0
18
+ Requires-Dist: httpx>=0.28.0
19
+ Requires-Dist: pydantic>=2.0.0
20
+ Requires-Dist: typer>=0.15.0
21
+ Provides-Extra: dev
22
+ Requires-Dist: aiosqlite>=0.19.0; extra == 'dev'
23
+ Requires-Dist: greenlet>=3.0.0; extra == 'dev'
24
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
25
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
26
+ Requires-Dist: sqlmodel>=0.0.16; extra == 'dev'
27
+ Provides-Extra: local-db
28
+ Requires-Dist: aiosqlite>=0.19.0; extra == 'local-db'
29
+ Requires-Dist: sqlmodel>=0.0.16; extra == 'local-db'
30
+ Description-Content-Type: text/markdown
31
+
32
+ # MINT SDK (Python)
33
+
34
+ SDK for building analysis plugins that integrate with the MINT platform.
35
+
36
+ > **Full Documentation:** See the [comprehensive docs](../../docs/index.md) for detailed API reference and guides.
37
+ > - [API Reference](../../docs/python/api-reference.md)
38
+ > - [Plugin Development Guide](../../docs/python/plugin-guide.md)
39
+ > - [Exception Handling](../../docs/python/exceptions.md)
40
+
41
+ ## Installation
42
+
43
+ ```bash
44
+ # From PyPI (when published)
45
+ uv add mint-sdk
46
+
47
+ # From git
48
+ uv add git+https://github.com/MorscherLab/MINT#subdirectory=packages/sdk-python
49
+ ```
50
+
51
+ ## Quick Start
52
+
53
+ Create a plugin with the CLI:
54
+
55
+ ```bash
56
+ mint init my-plugin --template analysis-basic
57
+ cd my-plugin
58
+ mint sdk generate
59
+ mint doctor --explain
60
+ mint dev
61
+ ```
62
+
63
+ `mint sdk generate` writes the frontend contract and typed client from backend routes and Pydantic schemas, so Vue code can call plugin endpoints without hand-writing route prefixes or request/response types.
64
+ Use `mint docs contract` inside a plugin to inspect the generated endpoint and client-call contract without writing files.
65
+ Use `mint sdk generate --check --json` in CI or editor tasks when you need machine-readable drift status.
66
+ Use `mint doctor --json` for machine-readable project health checks and safe-fix status.
67
+ When adding backend pieces, pass `--generate` to supported `mint add` commands to refresh the generated client in the same step.
68
+
69
+ For R-backed analyses:
70
+
71
+ ```bash
72
+ mint init drp-r --template r-analysis
73
+ # or add R support to an existing plugin:
74
+ mint add r-analysis drp-fit --page
75
+ mint doctor --r --explain
76
+ mint sdk generate
77
+ ```
78
+
79
+ This creates an `RAnalysisBridge` service, FastAPI route, typed frontend composable, optional starter page, and a small `mint_bridge.R` helper for reading inputs, writing outputs, accessing the current experiment id, and writing analysis artifacts while keeping Python/Pydantic as the frontend contract source of truth.
80
+
81
+ For standard biology design data:
82
+
83
+ ```bash
84
+ mint add data-template --list --json
85
+ mint docs template plate-map
86
+ mint add data-template plate-map --page
87
+ ```
88
+
89
+ Built-in templates include `plate-map`, `sample-sheet`, `sample-prep`, `dose-response`, `calibration-curve`, `time-course`, `protocol-steps`, `assay-matrix`, `reagent-list`, `flow-cytometry-panel`, `instrument-run`, and `qpcr-plate`. Generated template routes expose schema/default endpoints and merge multiple templates under `design_data.templates`, so a plugin can combine plate layouts, sample metadata, sample prep, reagents, protocols, calibration curves, time courses, readout matrices, cytometry panels, instrument run queues, and qPCR plates without clobbering prior template data.
90
+
91
+ Use `create_template_collection()` / `save_template_collection()` when a backend route needs to persist a coordinated set of templates, and `load_template_collection()` when a route needs all envelopes stored for an experiment. Single-template `save_template()` / `load_template()` remains available for narrow routes.
92
+
93
+ `mint add data-template-pack <name> --page` generates those collection routes and the matching frontend composable for curated packs, so plugin authors can save a whole experiment design scaffold with one API call.
94
+
95
+ At the Python layer, plugins implement the `AnalysisPlugin` interface:
96
+
97
+ ```python
98
+ from mint_sdk import AnalysisPlugin, PluginMetadata, PluginCapabilities
99
+ from fastapi import APIRouter
100
+
101
+ router = APIRouter()
102
+
103
+ @router.get("/hello")
104
+ async def hello():
105
+ return {"message": "Hello from my plugin!"}
106
+
107
+ class MyPlugin(AnalysisPlugin):
108
+ @property
109
+ def metadata(self) -> PluginMetadata:
110
+ return PluginMetadata(
111
+ name="My Plugin",
112
+ version="1.0.0",
113
+ description="My analysis plugin",
114
+ analysis_type="metabolomics",
115
+ routes_prefix="/my-plugin",
116
+ capabilities=PluginCapabilities(
117
+ requires_auth=True,
118
+ requires_experiments=True,
119
+ ),
120
+ )
121
+
122
+ def get_routers(self):
123
+ return [(router, "")]
124
+
125
+ async def initialize(self, context=None):
126
+ self._context = context
127
+
128
+ async def shutdown(self):
129
+ pass
130
+ ```
131
+
132
+ ## Plugin Package Structure
133
+
134
+ ```
135
+ mint-plugin-example/
136
+ ├── pyproject.toml
137
+ ├── README.md
138
+ └── src/mint_plugin_example/
139
+ ├── __init__.py
140
+ └── plugin.py
141
+ ```
142
+
143
+ ### pyproject.toml
144
+
145
+ ```toml
146
+ [project]
147
+ name = "mint-plugin-example"
148
+ version = "1.0.0"
149
+ dependencies = ["mint-sdk>=1.0.0"]
150
+
151
+ [project.entry-points."mint.plugins"]
152
+ example = "mint_plugin_example.plugin:MyPlugin"
153
+
154
+ [build-system]
155
+ requires = ["hatchling"]
156
+ build-backend = "hatchling.build"
157
+
158
+ [tool.hatch.build.targets.wheel]
159
+ packages = ["src/mint_plugin_example"]
160
+ ```
161
+
162
+ The entry point `mint.plugins` is how the platform discovers your plugin.
163
+
164
+ ## Platform Context
165
+
166
+ When running integrated with the platform, your plugin receives a `PlatformContext` that provides access to:
167
+
168
+ - Authentication dependencies (`get_current_user_dependency()`)
169
+ - Repositories for experiments, samples, users, etc.
170
+ - Platform configuration
171
+
172
+ ```python
173
+ async def initialize(self, context=None):
174
+ self._context = context
175
+ if context:
176
+ # Running integrated - use platform services
177
+ self.experiment_repo = context.get_experiment_repository()
178
+ else:
179
+ # Running standalone
180
+ pass
181
+ ```
182
+
183
+ ## Installation Commands
184
+
185
+ ```bash
186
+ # Install from GitHub
187
+ uv add git+https://github.com/org/mint-plugin-example
188
+
189
+ # Install specific version
190
+ uv add git+https://github.com/org/mint-plugin-example@v1.0.0
191
+
192
+ # Install from PyPI
193
+ uv add mint-plugin-example
194
+
195
+ # Install local plugin for development
196
+ uv add --editable ./my-plugin
197
+ ```
@@ -0,0 +1,166 @@
1
+ # MINT SDK (Python)
2
+
3
+ SDK for building analysis plugins that integrate with the MINT platform.
4
+
5
+ > **Full Documentation:** See the [comprehensive docs](../../docs/index.md) for detailed API reference and guides.
6
+ > - [API Reference](../../docs/python/api-reference.md)
7
+ > - [Plugin Development Guide](../../docs/python/plugin-guide.md)
8
+ > - [Exception Handling](../../docs/python/exceptions.md)
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ # From PyPI (when published)
14
+ uv add mint-sdk
15
+
16
+ # From git
17
+ uv add git+https://github.com/MorscherLab/MINT#subdirectory=packages/sdk-python
18
+ ```
19
+
20
+ ## Quick Start
21
+
22
+ Create a plugin with the CLI:
23
+
24
+ ```bash
25
+ mint init my-plugin --template analysis-basic
26
+ cd my-plugin
27
+ mint sdk generate
28
+ mint doctor --explain
29
+ mint dev
30
+ ```
31
+
32
+ `mint sdk generate` writes the frontend contract and typed client from backend routes and Pydantic schemas, so Vue code can call plugin endpoints without hand-writing route prefixes or request/response types.
33
+ Use `mint docs contract` inside a plugin to inspect the generated endpoint and client-call contract without writing files.
34
+ Use `mint sdk generate --check --json` in CI or editor tasks when you need machine-readable drift status.
35
+ Use `mint doctor --json` for machine-readable project health checks and safe-fix status.
36
+ When adding backend pieces, pass `--generate` to supported `mint add` commands to refresh the generated client in the same step.
37
+
38
+ For R-backed analyses:
39
+
40
+ ```bash
41
+ mint init drp-r --template r-analysis
42
+ # or add R support to an existing plugin:
43
+ mint add r-analysis drp-fit --page
44
+ mint doctor --r --explain
45
+ mint sdk generate
46
+ ```
47
+
48
+ This creates an `RAnalysisBridge` service, FastAPI route, typed frontend composable, optional starter page, and a small `mint_bridge.R` helper for reading inputs, writing outputs, accessing the current experiment id, and writing analysis artifacts while keeping Python/Pydantic as the frontend contract source of truth.
49
+
50
+ For standard biology design data:
51
+
52
+ ```bash
53
+ mint add data-template --list --json
54
+ mint docs template plate-map
55
+ mint add data-template plate-map --page
56
+ ```
57
+
58
+ Built-in templates include `plate-map`, `sample-sheet`, `sample-prep`, `dose-response`, `calibration-curve`, `time-course`, `protocol-steps`, `assay-matrix`, `reagent-list`, `flow-cytometry-panel`, `instrument-run`, and `qpcr-plate`. Generated template routes expose schema/default endpoints and merge multiple templates under `design_data.templates`, so a plugin can combine plate layouts, sample metadata, sample prep, reagents, protocols, calibration curves, time courses, readout matrices, cytometry panels, instrument run queues, and qPCR plates without clobbering prior template data.
59
+
60
+ Use `create_template_collection()` / `save_template_collection()` when a backend route needs to persist a coordinated set of templates, and `load_template_collection()` when a route needs all envelopes stored for an experiment. Single-template `save_template()` / `load_template()` remains available for narrow routes.
61
+
62
+ `mint add data-template-pack <name> --page` generates those collection routes and the matching frontend composable for curated packs, so plugin authors can save a whole experiment design scaffold with one API call.
63
+
64
+ At the Python layer, plugins implement the `AnalysisPlugin` interface:
65
+
66
+ ```python
67
+ from mint_sdk import AnalysisPlugin, PluginMetadata, PluginCapabilities
68
+ from fastapi import APIRouter
69
+
70
+ router = APIRouter()
71
+
72
+ @router.get("/hello")
73
+ async def hello():
74
+ return {"message": "Hello from my plugin!"}
75
+
76
+ class MyPlugin(AnalysisPlugin):
77
+ @property
78
+ def metadata(self) -> PluginMetadata:
79
+ return PluginMetadata(
80
+ name="My Plugin",
81
+ version="1.0.0",
82
+ description="My analysis plugin",
83
+ analysis_type="metabolomics",
84
+ routes_prefix="/my-plugin",
85
+ capabilities=PluginCapabilities(
86
+ requires_auth=True,
87
+ requires_experiments=True,
88
+ ),
89
+ )
90
+
91
+ def get_routers(self):
92
+ return [(router, "")]
93
+
94
+ async def initialize(self, context=None):
95
+ self._context = context
96
+
97
+ async def shutdown(self):
98
+ pass
99
+ ```
100
+
101
+ ## Plugin Package Structure
102
+
103
+ ```
104
+ mint-plugin-example/
105
+ ├── pyproject.toml
106
+ ├── README.md
107
+ └── src/mint_plugin_example/
108
+ ├── __init__.py
109
+ └── plugin.py
110
+ ```
111
+
112
+ ### pyproject.toml
113
+
114
+ ```toml
115
+ [project]
116
+ name = "mint-plugin-example"
117
+ version = "1.0.0"
118
+ dependencies = ["mint-sdk>=1.0.0"]
119
+
120
+ [project.entry-points."mint.plugins"]
121
+ example = "mint_plugin_example.plugin:MyPlugin"
122
+
123
+ [build-system]
124
+ requires = ["hatchling"]
125
+ build-backend = "hatchling.build"
126
+
127
+ [tool.hatch.build.targets.wheel]
128
+ packages = ["src/mint_plugin_example"]
129
+ ```
130
+
131
+ The entry point `mint.plugins` is how the platform discovers your plugin.
132
+
133
+ ## Platform Context
134
+
135
+ When running integrated with the platform, your plugin receives a `PlatformContext` that provides access to:
136
+
137
+ - Authentication dependencies (`get_current_user_dependency()`)
138
+ - Repositories for experiments, samples, users, etc.
139
+ - Platform configuration
140
+
141
+ ```python
142
+ async def initialize(self, context=None):
143
+ self._context = context
144
+ if context:
145
+ # Running integrated - use platform services
146
+ self.experiment_repo = context.get_experiment_repository()
147
+ else:
148
+ # Running standalone
149
+ pass
150
+ ```
151
+
152
+ ## Installation Commands
153
+
154
+ ```bash
155
+ # Install from GitHub
156
+ uv add git+https://github.com/org/mint-plugin-example
157
+
158
+ # Install specific version
159
+ uv add git+https://github.com/org/mint-plugin-example@v1.0.0
160
+
161
+ # Install from PyPI
162
+ uv add mint-plugin-example
163
+
164
+ # Install local plugin for development
165
+ uv add --editable ./my-plugin
166
+ ```
@@ -0,0 +1,50 @@
1
+ [project]
2
+ name = "mint-sdk"
3
+ dynamic = ["version"]
4
+ description = "MINT Plugin SDK - Build analysis plugins for the MINT (Mass-spec INtegrated Toolkit) platform"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ license = "MIT"
8
+ authors = [{ name = "MorscherLab", email = "morscher@chem.ethz.ch" }]
9
+ classifiers = [
10
+ "Development Status :: 4 - Beta",
11
+ "Intended Audience :: Developers",
12
+ "License :: OSI Approved :: MIT License",
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Framework :: FastAPI",
16
+ ]
17
+
18
+ dependencies = ["fastapi>=0.109.0", "pydantic>=2.0.0", "typer>=0.15.0", "httpx>=0.28.0"]
19
+
20
+ [project.optional-dependencies]
21
+ dev = ["pytest>=7.0.0", "pytest-asyncio>=0.21.0", "sqlmodel>=0.0.16", "aiosqlite>=0.19.0", "greenlet>=3.0.0"]
22
+ local-db = ["sqlmodel>=0.0.16", "aiosqlite>=0.19.0"]
23
+
24
+ [project.urls]
25
+ Homepage = "https://github.com/MorscherLab/MINT"
26
+ Documentation = "https://github.com/MorscherLab/MINT/tree/main/packages/sdk-python#readme"
27
+ Repository = "https://github.com/MorscherLab/MINT"
28
+
29
+ [project.scripts]
30
+ mint = "mint_sdk.cli:main"
31
+
32
+ [build-system]
33
+ requires = ["hatchling", "hatch-vcs"]
34
+ build-backend = "hatchling.build"
35
+
36
+ [tool.hatch.version]
37
+ source = "vcs"
38
+ tag-pattern = "^v(?P<version>\\d+\\.\\d+\\.\\d+.*)$"
39
+ raw-options.root = "../.."
40
+ raw-options.git_describe_command = "git describe --dirty --tags --long --abbrev=40 --match v[0-9]*"
41
+
42
+ [tool.hatch.build.hooks.vcs]
43
+ version-file = "src/mint_sdk/_version.py"
44
+
45
+ [tool.pytest.ini_options]
46
+ testpaths = ["tests"]
47
+ asyncio_mode = "auto"
48
+
49
+ [tool.hatch.build.targets.wheel]
50
+ packages = ["src/mint_sdk"]