mfcli 0.2.8__tar.gz → 0.2.10__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 (158) hide show
  1. {mfcli-0.2.8 → mfcli-0.2.10}/MCP_SETUP.md +32 -2
  2. {mfcli-0.2.8 → mfcli-0.2.10}/PKG-INFO +1 -1
  3. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/cli/main.py +13 -0
  4. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/constants/file_types.py +43 -2
  5. mfcli-0.2.10/mfcli/crud/pipeline_run.py +39 -0
  6. mfcli-0.2.10/mfcli/models/project_metadata.py +32 -0
  7. mfcli-0.2.10/mfcli/pipeline/analysis/mcu_identifier.py +565 -0
  8. mfcli-0.2.10/mfcli/pipeline/extractor.py +85 -0
  9. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/pipeline.py +60 -0
  10. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/sub_classifier.py +10 -1
  11. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/data_cleaner.py +6 -3
  12. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/mcp_configurator.py +4 -2
  13. mfcli-0.2.10/mfcli/utils/mcu_configurator.py +349 -0
  14. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli.egg-info/SOURCES.txt +2 -0
  15. {mfcli-0.2.8 → mfcli-0.2.10}/pyproject.toml +1 -1
  16. mfcli-0.2.8/mfcli/crud/pipeline_run.py +0 -17
  17. mfcli-0.2.8/mfcli/models/project_metadata.py +0 -15
  18. mfcli-0.2.8/mfcli/pipeline/extractor.py +0 -37
  19. {mfcli-0.2.8 → mfcli-0.2.10}/BUILD.md +0 -0
  20. {mfcli-0.2.8 → mfcli-0.2.10}/CONFIGURATION.md +0 -0
  21. {mfcli-0.2.8 → mfcli-0.2.10}/INSTALL.md +0 -0
  22. {mfcli-0.2.8 → mfcli-0.2.10}/LICENSE +0 -0
  23. {mfcli-0.2.8 → mfcli-0.2.10}/MANIFEST.in +0 -0
  24. {mfcli-0.2.8 → mfcli-0.2.10}/README.md +0 -0
  25. {mfcli-0.2.8 → mfcli-0.2.10}/install.ps1 +0 -0
  26. {mfcli-0.2.8 → mfcli-0.2.10}/install.sh +0 -0
  27. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/.env.example +0 -0
  28. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/__init__.py +0 -0
  29. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/agents/__init__.py +0 -0
  30. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/agents/controller/__init__.py +0 -0
  31. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/agents/controller/agent.py +0 -0
  32. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/agents/controller/config.yaml +0 -0
  33. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/agents/controller/tools.py +0 -0
  34. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/agents/tools/general.py +0 -0
  35. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/env.py +0 -0
  36. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/script.py.mako +0 -0
  37. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/versions/6ccc0c7c397c_added_fields_to_pdf_parts_model.py +0 -0
  38. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/versions/769019ef4870_added_gemini_file_path_to_pdf_part_model.py +0 -0
  39. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/versions/7a2e3a779fdc_added_functional_block_and_component_.py +0 -0
  40. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/versions/7d5adb2a47a7_added_pdf_parts_model.py +0 -0
  41. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/versions/7fcb7d6a5836_init.py +0 -0
  42. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/versions/e0f2b5765c72_added_cascade_delete_for_models_that_.py +0 -0
  43. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic/versions/f1234567890a_make_bom_description_nullable.py +0 -0
  44. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/alembic.ini +0 -0
  45. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/cli/__init__.py +0 -0
  46. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/cli/dependencies.py +0 -0
  47. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/client/__init__.py +0 -0
  48. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/client/chroma_db.py +0 -0
  49. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/client/docling.py +0 -0
  50. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/client/gemini.py +0 -0
  51. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/client/vector_db.py +0 -0
  52. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/constants/__init__.py +0 -0
  53. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/constants/base_enum.py +0 -0
  54. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/constants/directory_names.py +0 -0
  55. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/constants/gemini.py +0 -0
  56. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/constants/openai.py +0 -0
  57. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/constants/pipeline_run_status.py +0 -0
  58. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/crud/__init__.py +0 -0
  59. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/crud/file.py +0 -0
  60. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/crud/functional_blocks.py +0 -0
  61. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/crud/netlist.py +0 -0
  62. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/crud/project.py +0 -0
  63. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/digikey/__init__.py +0 -0
  64. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/digikey/digikey.py +0 -0
  65. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/main.py +0 -0
  66. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/mcp/__init__.py +0 -0
  67. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/mcp/configs/cline_mcp_settings.json +0 -0
  68. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/mcp/configs/mfcli.mcp.json +0 -0
  69. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/mcp/mcp_instance.py +0 -0
  70. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/mcp/server.py +0 -0
  71. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/mcp/state_manager.py +0 -0
  72. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/mcp/tools/__init__.py +0 -0
  73. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/mcp/tools/query_knowledgebase.py +0 -0
  74. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/__init__.py +0 -0
  75. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/base.py +0 -0
  76. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/bom.py +0 -0
  77. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/datasheet.py +0 -0
  78. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/debug_setup.py +0 -0
  79. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/file.py +0 -0
  80. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/file_docket.py +0 -0
  81. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/file_metadata.py +0 -0
  82. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/functional_blocks.py +0 -0
  83. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/llm_response.py +0 -0
  84. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/mcu.py +0 -0
  85. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/mcu_errata.py +0 -0
  86. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/netlist.py +0 -0
  87. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/pdf_parts.py +0 -0
  88. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/pipeline_run.py +0 -0
  89. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/project.py +0 -0
  90. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/models/schematic_cheatsheet.py +0 -0
  91. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/__init__.py +0 -0
  92. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/__init__.py +0 -0
  93. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/bom_netlist_mapper.py +0 -0
  94. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/__init__.py +0 -0
  95. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/bom/__init__.py +0 -0
  96. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/bom/bom.py +0 -0
  97. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/debug_setup/__init__.py +0 -0
  98. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/debug_setup/debug_setup.py +0 -0
  99. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/debug_setup/instructions.py +0 -0
  100. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/functional_blocks/__init__.py +0 -0
  101. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/functional_blocks/functional_blocks.py +0 -0
  102. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/functional_blocks/instructions.py +0 -0
  103. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/functional_blocks/validator.py +0 -0
  104. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/generator.py +0 -0
  105. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/generator_base.py +0 -0
  106. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/mcu/__init__.py +0 -0
  107. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/mcu/instructions.py +0 -0
  108. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/mcu/mcu.py +0 -0
  109. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/mcu_errata/__init__.py +0 -0
  110. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/mcu_errata/instructions.py +0 -0
  111. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/mcu_errata/mcu_errata.py +0 -0
  112. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/schematic/__init__.py +0 -0
  113. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/schematic/instructions.py +0 -0
  114. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/schematic/schematic.py +0 -0
  115. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/summary/__init__.py +0 -0
  116. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/analysis/generators/summary/summary.py +0 -0
  117. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/classifier.py +0 -0
  118. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/data_enricher.py +0 -0
  119. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/extractors/__init__.py +0 -0
  120. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/extractors/pdf.py +0 -0
  121. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parser.py +0 -0
  122. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/__init__.py +0 -0
  123. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/netlist/__init__.py +0 -0
  124. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/netlist/edif.py +0 -0
  125. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/netlist/kicad_legacy_net.py +0 -0
  126. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/netlist/kicad_spice.py +0 -0
  127. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/netlist/pads.py +0 -0
  128. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/netlist/protel.py +0 -0
  129. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/netlist/protel_detector.py +0 -0
  130. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/schematic/__init__.py +0 -0
  131. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/parsers/schematic/kicad_sch_detector.py +0 -0
  132. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/preprocessors/__init__.py +0 -0
  133. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/preprocessors/user_guide.py +0 -0
  134. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/run_context.py +0 -0
  135. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/pipeline/schema_mapper.py +0 -0
  136. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/__init__.py +0 -0
  137. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/cheatsheet_regenerator.py +0 -0
  138. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/cline_rules.py +0 -0
  139. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/config.py +0 -0
  140. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/configurator.py +0 -0
  141. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/datasheet_vectorizer.py +0 -0
  142. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/directory_manager.py +0 -0
  143. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/file_upload.py +0 -0
  144. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/files.py +0 -0
  145. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/http_requests.py +0 -0
  146. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/kb_lister.py +0 -0
  147. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/kb_remover.py +0 -0
  148. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/logger.py +0 -0
  149. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/migrations.py +0 -0
  150. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/orm.py +0 -0
  151. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/pdf_splitter.py +0 -0
  152. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/pre_uninstall.py +0 -0
  153. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/query_service.py +0 -0
  154. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/ssl_installer.py +0 -0
  155. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/system_check.py +0 -0
  156. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/tools.py +0 -0
  157. {mfcli-0.2.8 → mfcli-0.2.10}/mfcli/utils/vectorizer.py +0 -0
  158. {mfcli-0.2.8 → mfcli-0.2.10}/setup.cfg +0 -0
@@ -115,7 +115,8 @@ If the file doesn't exist, create it with this content:
115
115
  "disabled": false,
116
116
  "timeout": 60,
117
117
  "type": "stdio",
118
- "command": "mfcli-mcp"
118
+ "command": "mfcli-mcp",
119
+ "autoApprove": ["query_local_rag"]
119
120
  }
120
121
  }
121
122
  }
@@ -133,12 +134,15 @@ If the file exists, add the `mfcli-mcp` entry to the existing `mcpServers` objec
133
134
  "disabled": false,
134
135
  "timeout": 60,
135
136
  "type": "stdio",
136
- "command": "mfcli-mcp"
137
+ "command": "mfcli-mcp",
138
+ "autoApprove": ["query_local_rag"]
137
139
  }
138
140
  }
139
141
  }
140
142
  ```
141
143
 
144
+ **Note about `autoApprove`:** The `autoApprove` option allows the `query_local_rag` tool to run automatically without requiring explicit user approval each time. This streamlines the workflow when working with hardware documentation, as the tool is read-only and simply queries your local knowledge base.
145
+
142
146
  ### Step 3: Restart Your Editor
143
147
 
144
148
  Close and reopen your AI coding assistant for the changes to take effect.
@@ -382,6 +386,32 @@ Enable verbose logging for troubleshooting:
382
386
  }
383
387
  ```
384
388
 
389
+ ### Auto-Approval for Tools
390
+
391
+ The `autoApprove` option allows specific tools to run automatically without requiring user approval each time:
392
+
393
+ ```json
394
+ {
395
+ "mfcli-mcp": {
396
+ "autoApprove": ["query_local_rag"]
397
+ }
398
+ }
399
+ ```
400
+
401
+ **Benefits:**
402
+ - ✅ Streamlined workflow - No manual approval needed for each query
403
+ - ✅ Faster responses - AI assistant can query documentation immediately
404
+ - ✅ Better UX - More natural conversation flow
405
+ - ✅ Safe for read-only tools - `query_local_rag` only reads local data
406
+
407
+ **Security Note:** The `query_local_rag` tool is safe to auto-approve because:
408
+ - It only performs read operations on your local knowledge base
409
+ - No data is modified or transmitted externally
410
+ - It operates within your local filesystem permissions
411
+ - All data stays on your machine
412
+
413
+ If you prefer to manually approve each tool use, simply omit the `autoApprove` field from the configuration.
414
+
385
415
  ## Best Practices
386
416
 
387
417
  ### Document Organization
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mfcli
3
- Version: 0.2.8
3
+ Version: 0.2.10
4
4
  Summary: AI-powered CLI for analyzing hardware engineering documents
5
5
  Author: Multifactor AI
6
6
  License: MIT
@@ -237,8 +237,18 @@ def run_cli():
237
237
  help="Specific file to generate cheat sheet from (bypasses database lookup)"
238
238
  )
239
239
 
240
+ sub.add_parser(
241
+ "configure-mcu",
242
+ help="Configure microcontroller settings",
243
+ description="Interactively configure which microcontrollers are in your design. "
244
+ "Identifies MCUs from BOM and datasheets, then prompts you to select a primary MCU "
245
+ "and any additional MCUs. This configuration is saved to config.json and helps the "
246
+ "system understand your hardware architecture."
247
+ )
248
+
240
249
  # Parse early to catch --version and --help before initialization
241
250
  args = parser.parse_args()
251
+
242
252
 
243
253
  # Only initialize if we're running a real command (not --version or --help which exit early)
244
254
  # Import logger here to avoid loading logging infrastructure for --version
@@ -348,3 +358,6 @@ def run_cli():
348
358
  elif args.command == "rm":
349
359
  from mfcli.utils.kb_remover import remove_files_from_kb
350
360
  remove_files_from_kb(project_config.name, args.filename, confirm=not args.yes)
361
+ elif args.command == "configure-mcu":
362
+ from mfcli.utils.mcu_configurator import reconfigure_mcus_cli
363
+ reconfigure_mcus_cli()
@@ -13,6 +13,10 @@ class FileTypes(BaseEnum):
13
13
  PDF = 5
14
14
  SCH = 6
15
15
  KICAD_SCH = 7
16
+ TXT = 8
17
+ RTF = 9
18
+ DOCX = 10
19
+ JPG = 11
16
20
 
17
21
 
18
22
  class FileSubtypes(BaseEnum):
@@ -47,7 +51,9 @@ SchemalessFileSubtypes: set[FileSubtypes] = {
47
51
  FileSubtypes.ERRATA,
48
52
  FileSubtypes.MCU_DATASHEET,
49
53
  FileSubtypes.USER_GUIDE,
50
- FileSubtypes.REFERENCE_MANUAL
54
+ FileSubtypes.REFERENCE_MANUAL,
55
+ FileSubtypes.GENERAL_DATASHEET,
56
+ FileSubtypes.UNKNOWN
51
57
  }
52
58
 
53
59
  # File subtype names are for use with LLM, validating subtype response
@@ -67,7 +73,8 @@ OtherFileSubtypeNames = Literal[
67
73
  'PADS_PCB_ASCII',
68
74
  'KICAD_LEGACY_NET',
69
75
  'KICAD_SPICE',
70
- 'PROTEL_ALTIUM'
76
+ 'PROTEL_ALTIUM',
77
+ 'UNKNOWN'
71
78
  ]
72
79
 
73
80
  PDFMimeTypes = {
@@ -138,6 +145,40 @@ SupportedFileTypes = {
138
145
  "subtypes": {
139
146
  "SCHEMATIC"
140
147
  }
148
+ },
149
+ "TXT": {
150
+ "mime_types": {
151
+ "text/plain"
152
+ },
153
+ "subtypes": {
154
+ "UNKNOWN"
155
+ }
156
+ },
157
+ "RTF": {
158
+ "mime_types": {
159
+ "application/rtf",
160
+ "text/rtf"
161
+ },
162
+ "subtypes": {
163
+ "UNKNOWN"
164
+ }
165
+ },
166
+ "DOCX": {
167
+ "mime_types": {
168
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
169
+ },
170
+ "subtypes": {
171
+ "UNKNOWN"
172
+ }
173
+ },
174
+ "JPG": {
175
+ "mime_types": {
176
+ "image/jpeg",
177
+ "image/jpg"
178
+ },
179
+ "subtypes": {
180
+ "UNKNOWN"
181
+ }
141
182
  }
142
183
  }
143
184
 
@@ -0,0 +1,39 @@
1
+ from typing import Optional
2
+ from mfcli.models.pipeline_run import PipelineRun
3
+ from mfcli.models.project import Project
4
+ from mfcli.utils.logger import get_logger
5
+ from mfcli.utils.orm import Session
6
+
7
+ logger = get_logger(__name__)
8
+
9
+
10
+ def create_pipeline_run(db: Session, project: Project) -> PipelineRun:
11
+ logger.debug("Creating pipeline run")
12
+ run = PipelineRun()
13
+ run.project = project
14
+ db.add(run)
15
+ db.flush()
16
+ logger.debug(f"Pipeline run created: {run.id}")
17
+ db.commit()
18
+ return run
19
+
20
+
21
+ def get_latest_pipeline_run(db: Session, project_id: int) -> Optional[PipelineRun]:
22
+ """
23
+ Get the most recent pipeline run for a project.
24
+
25
+ Args:
26
+ db: Database session
27
+ project_id: Project ID
28
+
29
+ Returns:
30
+ Latest PipelineRun or None if no runs exist
31
+ """
32
+ logger.debug(f"Getting latest pipeline run for project: {project_id}")
33
+ run = (
34
+ db.query(PipelineRun)
35
+ .filter(PipelineRun.project_id == project_id)
36
+ .order_by(PipelineRun.created_at.desc())
37
+ .first()
38
+ )
39
+ return run
@@ -0,0 +1,32 @@
1
+ from pydantic import BaseModel, Field
2
+ from typing import Optional, List
3
+
4
+
5
+ class VectorizeCheatSheetsConfig(BaseModel):
6
+ vectorize_errata: bool = Field(default=False)
7
+ vectorize_mcu: bool = Field(default=False)
8
+ vectorize_debug_setup: bool = Field(default=False)
9
+ vectorize_functional_blocks: bool = Field(default=False)
10
+
11
+
12
+ class MCUConfiguration(BaseModel):
13
+ """Configuration for microcontrollers in the project"""
14
+ primary_mcu: Optional[str] = Field(
15
+ default=None,
16
+ description="Primary microcontroller part number (e.g., MSPM0L1306, STM32F407)"
17
+ )
18
+ additional_mcus: List[str] = Field(
19
+ default_factory=list,
20
+ description="Additional microcontrollers in the design"
21
+ )
22
+
23
+
24
+ class ProjectConfig(BaseModel):
25
+ name: str
26
+ mcu_config: Optional[MCUConfiguration] = Field(
27
+ default=None,
28
+ description="Microcontroller configuration for the project"
29
+ )
30
+ vectorize_hw_files: bool = Field(default=True)
31
+ vectorize_datasheets: bool = Field(default=True)
32
+ vectorize_cheat_sheets_config: VectorizeCheatSheetsConfig = Field(default_factory=VectorizeCheatSheetsConfig)