cocoindex 0.2.23__tar.gz → 0.3.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 (476) hide show
  1. {cocoindex-0.2.23 → cocoindex-0.3.0}/Cargo.lock +3 -1
  2. {cocoindex-0.2.23 → cocoindex-0.3.0}/Cargo.toml +2 -1
  3. {cocoindex-0.2.23 → cocoindex-0.3.0}/PKG-INFO +1 -1
  4. {cocoindex-0.2.23 → cocoindex-0.3.0}/THIRD_PARTY_NOTICES.html +1 -1
  5. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/functions/sbert.py +6 -3
  6. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/op.py +52 -17
  7. cocoindex-0.3.0/python/cocoindex/runtime.py +74 -0
  8. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/subprocess_exec.py +1 -27
  9. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/live_updater.rs +34 -22
  10. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/source_indexer.rs +55 -51
  11. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/lib_context.rs +2 -2
  12. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/factory_bases.rs +80 -2
  13. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/py_factory.rs +92 -28
  14. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/prelude.rs +1 -1
  15. cocoindex-0.3.0/src/py/future.rs +85 -0
  16. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/py/mod.rs +9 -2
  17. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/service/error.rs +10 -4
  18. cocoindex-0.3.0/src/utils/batching.rs +322 -0
  19. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/mod.rs +1 -0
  20. cocoindex-0.2.23/python/cocoindex/runtime.py +0 -44
  21. {cocoindex-0.2.23 → cocoindex-0.3.0}/.cargo/config.toml +0 -0
  22. {cocoindex-0.2.23 → cocoindex-0.3.0}/.env.lib_debug +0 -0
  23. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md" +0 -0
  24. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md" +0 -0
  25. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/SECURITY.md +0 -0
  26. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/scripts/update_version.sh +0 -0
  27. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/CI.yml +0 -0
  28. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/_docs_release.yml +0 -0
  29. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/_test.yml +0 -0
  30. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/docs_release.yml +0 -0
  31. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/docs_test.yml +0 -0
  32. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/format.yml +0 -0
  33. {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/release.yml +0 -0
  34. {cocoindex-0.2.23 → cocoindex-0.3.0}/.gitignore +0 -0
  35. {cocoindex-0.2.23 → cocoindex-0.3.0}/.pre-commit-config.yaml +0 -0
  36. {cocoindex-0.2.23 → cocoindex-0.3.0}/CODE_OF_CONDUCT.md +0 -0
  37. {cocoindex-0.2.23 → cocoindex-0.3.0}/CONTRIBUTING.md +0 -0
  38. {cocoindex-0.2.23 → cocoindex-0.3.0}/LICENSE +0 -0
  39. {cocoindex-0.2.23 → cocoindex-0.3.0}/README.md +0 -0
  40. {cocoindex-0.2.23 → cocoindex-0.3.0}/about.hbs +0 -0
  41. {cocoindex-0.2.23 → cocoindex-0.3.0}/about.toml +0 -0
  42. {cocoindex-0.2.23 → cocoindex-0.3.0}/dev/README.md +0 -0
  43. {cocoindex-0.2.23 → cocoindex-0.3.0}/dev/generate_cli_docs.py +0 -0
  44. {cocoindex-0.2.23 → cocoindex-0.3.0}/dev/neo4j.yaml +0 -0
  45. {cocoindex-0.2.23 → cocoindex-0.3.0}/dev/postgres.yaml +0 -0
  46. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/.gitignore +0 -0
  47. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/README.md +0 -0
  48. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/about/community.md +0 -0
  49. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/ai/llm.mdx +0 -0
  50. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/contributing/guide.md +0 -0
  51. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/contributing/new_built_in_target.mdx +0 -0
  52. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/contributing/setup_dev_environment.md +0 -0
  53. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/basics.md +0 -0
  54. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/cli-commands.md +0 -0
  55. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/cli.mdx +0 -0
  56. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/data_example.svg +0 -0
  57. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/data_types.mdx +0 -0
  58. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/flow_def.mdx +0 -0
  59. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/flow_example.svg +0 -0
  60. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/flow_methods.mdx +0 -0
  61. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/settings.mdx +0 -0
  62. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/custom_ops/custom_functions.mdx +0 -0
  63. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/custom_ops/custom_sources.mdx +0 -0
  64. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/custom_ops/custom_targets.mdx +0 -0
  65. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/00_codebase_index.md +0 -0
  66. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/01_docs_to_knowledge_graph.md +0 -0
  67. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/02_academic_papers_index.md +0 -0
  68. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/03_postgres_source.md +0 -0
  69. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/custom_targets.md +0 -0
  70. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/document_ai.md +0 -0
  71. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/image_search.md +0 -0
  72. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/manual_extraction.md +0 -0
  73. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/multi_format_index.md +0 -0
  74. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/patient_form_extraction.md +0 -0
  75. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/photo_search.md +0 -0
  76. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/product_recommendation.md +0 -0
  77. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/simple_vector_index.md +0 -0
  78. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/index.md +0 -0
  79. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/getting_started/installation.md +0 -0
  80. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/getting_started/markdown_files.zip +0 -0
  81. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/getting_started/overview.md +0 -0
  82. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/getting_started/quickstart.md +0 -0
  83. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/ops/functions.md +0 -0
  84. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/query.mdx +0 -0
  85. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/amazons3.md +0 -0
  86. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/azureblob.md +0 -0
  87. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/googledrive.md +0 -0
  88. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/index.md +0 -0
  89. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/localfile.md +0 -0
  90. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/postgres.md +0 -0
  91. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/index.md +0 -0
  92. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/kuzu.md +0 -0
  93. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/lancedb.md +0 -0
  94. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/neo4j.md +0 -0
  95. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/postgres.md +0 -0
  96. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/qdrant.md +0 -0
  97. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/tutorials/live_updates.md +0 -0
  98. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/tutorials/manage_flow_dynamically.mdx +0 -0
  99. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docusaurus.config.ts +0 -0
  100. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/package.json +0 -0
  101. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/sidebars.ts +0 -0
  102. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/components/GitHubButton/index.tsx +0 -0
  103. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/css/custom.css +0 -0
  104. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/DocCard/index.tsx +0 -0
  105. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/DocCard/styles.module.css +0 -0
  106. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/DocCardList/index.tsx +0 -0
  107. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/DocCardList/styles.module.css +0 -0
  108. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/Root.js +0 -0
  109. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/.nojekyll +0 -0
  110. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/docusaurus.png +0 -0
  111. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/abstract_chunks.png +0 -0
  112. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/basic_info.png +0 -0
  113. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/chunk_embedding.png +0 -0
  114. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/cover.png +0 -0
  115. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/first_page.png +0 -0
  116. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/flow.png +0 -0
  117. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/metadata.png +0 -0
  118. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/codebase_index/chunk.png +0 -0
  119. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/codebase_index/cover.png +0 -0
  120. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/codebase_index/flow.png +0 -0
  121. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/custom_targets/convert.png +0 -0
  122. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/custom_targets/cover.png +0 -0
  123. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/cover.png +0 -0
  124. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/dedupe.png +0 -0
  125. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/export_document.png +0 -0
  126. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/export_relationship.png +0 -0
  127. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/extract_relationship.png +0 -0
  128. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/flow.png +0 -0
  129. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/neo4j_browser.png +0 -0
  130. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/relationship.png +0 -0
  131. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/summary.png +0 -0
  132. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/document_ai/cover.png +0 -0
  133. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/document_ai/document_ai.png +0 -0
  134. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/document_ai/processor.png +0 -0
  135. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/cover.png +0 -0
  136. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/embedding.png +0 -0
  137. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/flow.png +0 -0
  138. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/multi_modal_architecture.png +0 -0
  139. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/result.png +0 -0
  140. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/manual_extraction/cover.png +0 -0
  141. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/manual_extraction/extraction.png +0 -0
  142. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/manual_extraction/flow.png +0 -0
  143. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/manual_extraction/summary.png +0 -0
  144. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/colpali_architecture.png +0 -0
  145. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/cover.png +0 -0
  146. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/embed.png +0 -0
  147. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/flow.png +0 -0
  148. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/pages.png +0 -0
  149. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/cover.png +0 -0
  150. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/extraction.png +0 -0
  151. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/fields.png +0 -0
  152. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/flow.png +0 -0
  153. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/tomarkdown.png +0 -0
  154. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/photo_search/cover.png +0 -0
  155. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/photo_search/extraction.png +0 -0
  156. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/photo_search/flow.png +0 -0
  157. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/collector.png +0 -0
  158. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/cover.png +0 -0
  159. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/description.png +0 -0
  160. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/embed.png +0 -0
  161. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/flow.png +0 -0
  162. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/lineage.png +0 -0
  163. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/price.png +0 -0
  164. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/source.png +0 -0
  165. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/cover.png +0 -0
  166. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/dedupe.png +0 -0
  167. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/export_all.png +0 -0
  168. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/export_product.png +0 -0
  169. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/export_taxonomy.png +0 -0
  170. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/extract_product.png +0 -0
  171. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/extract_taxonomy.png +0 -0
  172. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/neo4j.png +0 -0
  173. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/parse_json.png +0 -0
  174. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/taxonomy.png +0 -0
  175. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/simple_vector_index/chunk.png +0 -0
  176. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/simple_vector_index/cover.png +0 -0
  177. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/simple_vector_index/embed.png +0 -0
  178. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/simple_vector_index/flow.png +0 -0
  179. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/favicon.ico +0 -0
  180. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/icon.svg +0 -0
  181. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/incremental-etl.gif +0 -0
  182. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/robots.txt +0 -0
  183. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/tsconfig.json +0 -0
  184. {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/yarn.lock +0 -0
  185. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/.env.example +0 -0
  186. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/.gitignore +0 -0
  187. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/README.md +0 -0
  188. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/main.py +0 -0
  189. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/pyproject.toml +0 -0
  190. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/.env.example +0 -0
  191. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/.gitignore +0 -0
  192. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/README.md +0 -0
  193. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/main.py +0 -0
  194. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/pyproject.toml +0 -0
  195. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/code_embedding/.env +0 -0
  196. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/code_embedding/README.md +0 -0
  197. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/code_embedding/main.py +0 -0
  198. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/code_embedding/pyproject.toml +0 -0
  199. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/.env +0 -0
  200. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/.gitignore +0 -0
  201. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/README.md +0 -0
  202. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/data/bizarre_animals.md +0 -0
  203. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/data/chunk_norris.md +0 -0
  204. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/main.py +0 -0
  205. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/pyproject.toml +0 -0
  206. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/.env +0 -0
  207. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/.env.example +0 -0
  208. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/README.md +0 -0
  209. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/main.py +0 -0
  210. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/pyproject.toml +0 -0
  211. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/docs_to_knowledge_graph/.env +0 -0
  212. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/docs_to_knowledge_graph/README.md +0 -0
  213. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/docs_to_knowledge_graph/main.py +0 -0
  214. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/docs_to_knowledge_graph/pyproject.toml +0 -0
  215. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/.env +0 -0
  216. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/README.md +0 -0
  217. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/images/Carter_welcomes_Reagan.jpg +0 -0
  218. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/images/Solvay_conference_1927.jpg +0 -0
  219. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/images/Steve_Jobs_and_Bill_Gates_(522695099).jpg +0 -0
  220. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/images/einplanck3.jpg +0 -0
  221. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/main.py +0 -0
  222. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/pyproject.toml +0 -0
  223. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/.dockerignore +0 -0
  224. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/.env +0 -0
  225. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/README.md +0 -0
  226. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/compose.yaml +0 -0
  227. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/dockerfile +0 -0
  228. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/files/1810.04805v2.md +0 -0
  229. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/main.py +0 -0
  230. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/requirements.txt +0 -0
  231. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/.env.example +0 -0
  232. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/.gitignore +0 -0
  233. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/README.md +0 -0
  234. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/main.py +0 -0
  235. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/pyproject.toml +0 -0
  236. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/.env.example +0 -0
  237. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/.gitignore +0 -0
  238. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/README.md +0 -0
  239. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/main.py +0 -0
  240. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/pyproject.toml +0 -0
  241. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/.env +0 -0
  242. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/README.md +0 -0
  243. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/colpali_main.py +0 -0
  244. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/.gitignore +0 -0
  245. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/index.html +0 -0
  246. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/package-lock.json +0 -0
  247. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/package.json +0 -0
  248. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/src/App.jsx +0 -0
  249. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/src/main.jsx +0 -0
  250. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/src/style.css +0 -0
  251. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/vite.config.js +0 -0
  252. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/img/cat1.jpeg +0 -0
  253. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/img/dog1.jpeg +0 -0
  254. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/img/elephant1.jpg +0 -0
  255. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/img/giraffe.jpg +0 -0
  256. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/main.py +0 -0
  257. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/pyproject.toml +0 -0
  258. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/.env +0 -0
  259. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/README.md +0 -0
  260. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/data/bizarre_animals.md +0 -0
  261. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/data/chunk_norris.md +0 -0
  262. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/main.py +0 -0
  263. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/pyproject.toml +0 -0
  264. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/.env +0 -0
  265. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/README.md +0 -0
  266. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/main.py +0 -0
  267. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
  268. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
  269. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
  270. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
  271. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/pyproject.toml +0 -0
  272. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/.env +0 -0
  273. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/README.md +0 -0
  274. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/main.py +0 -0
  275. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/pyproject.toml +0 -0
  276. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/1706.03762v7.pdf +0 -0
  277. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/1810.04805v2.pdf +0 -0
  278. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/2502.06786v3.pdf +0 -0
  279. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/healthcare_industry_test_p101.jpg +0 -0
  280. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/healthcare_industry_test_p86.jpg +0 -0
  281. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/healthcare_industry_test_p9.jpg +0 -0
  282. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/restaurant_brands_international_2023.jpg +0 -0
  283. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/sweetgreen_2023.jpg +0 -0
  284. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/.env.example +0 -0
  285. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/.gitignore +0 -0
  286. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/README.md +0 -0
  287. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/main.py +0 -0
  288. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/papers/1706.03762v7.pdf +0 -0
  289. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/papers/1810.04805v2.pdf +0 -0
  290. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/papers/2502.06786v3.pdf +0 -0
  291. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/papers/2502.20346v1.pdf +0 -0
  292. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/pyproject.toml +0 -0
  293. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/.env.example +0 -0
  294. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/README.md +0 -0
  295. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/README.md +0 -0
  296. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_David_Artificial.docx +0 -0
  297. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Emily_Artificial.pdf +0 -0
  298. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Joe_Artificial.pdf +0 -0
  299. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_From_Jane_Artificial.docx +0 -0
  300. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/main.py +0 -0
  301. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/pyproject.toml +0 -0
  302. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/.env +0 -0
  303. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/.gitignore +0 -0
  304. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/README.md +0 -0
  305. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/fetch_manual_urls.sh +0 -0
  306. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/main.py +0 -0
  307. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/pyproject.toml +0 -0
  308. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/.env +0 -0
  309. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/README.md +0 -0
  310. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/main.py +0 -0
  311. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
  312. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
  313. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
  314. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/pyproject.toml +0 -0
  315. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/.env +0 -0
  316. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/README.md +0 -0
  317. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/main.py +0 -0
  318. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/prepare_source_data.sql +0 -0
  319. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/pyproject.toml +0 -0
  320. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/.env.example +0 -0
  321. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/.gitignore +0 -0
  322. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/README.md +0 -0
  323. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/img/cocoinsight.png +0 -0
  324. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/img/neo4j.png +0 -0
  325. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/main.py +0 -0
  326. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p1.json +0 -0
  327. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p2.json +0 -0
  328. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p3.json +0 -0
  329. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p4.json +0 -0
  330. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p5.json +0 -0
  331. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p6.json +0 -0
  332. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p7.json +0 -0
  333. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p8.json +0 -0
  334. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p9.json +0 -0
  335. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/pyproject.toml +0 -0
  336. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/.env +0 -0
  337. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/README.md +0 -0
  338. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/Text_Embedding.ipynb +0 -0
  339. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/main.py +0 -0
  340. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
  341. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
  342. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
  343. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/pyproject.toml +0 -0
  344. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/.env +0 -0
  345. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/.gitignore +0 -0
  346. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/README.md +0 -0
  347. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/main.py +0 -0
  348. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/markdown_files/rfc8259.md +0 -0
  349. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/pyproject.toml +0 -0
  350. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/.env +0 -0
  351. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/README.md +0 -0
  352. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/main.py +0 -0
  353. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
  354. {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/pyproject.toml +0 -0
  355. {cocoindex-0.2.23 → cocoindex-0.3.0}/pyproject.toml +0 -0
  356. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/__init__.py +0 -0
  357. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/auth_registry.py +0 -0
  358. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/cli.py +0 -0
  359. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/engine_object.py +0 -0
  360. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/engine_value.py +0 -0
  361. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/flow.py +0 -0
  362. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/functions/__init__.py +0 -0
  363. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/functions/_engine_builtin_specs.py +0 -0
  364. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/functions/colpali.py +0 -0
  365. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/index.py +0 -0
  366. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/lib.py +0 -0
  367. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/llm.py +0 -0
  368. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/py.typed +0 -0
  369. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/query_handler.py +0 -0
  370. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/setting.py +0 -0
  371. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/setup.py +0 -0
  372. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/sources/__init__.py +0 -0
  373. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/sources/_engine_builtin_specs.py +0 -0
  374. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/targets/__init__.py +0 -0
  375. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/targets/_engine_builtin_specs.py +0 -0
  376. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/targets/lancedb.py +0 -0
  377. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/__init__.py +0 -0
  378. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_engine_object.py +0 -0
  379. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_engine_value.py +0 -0
  380. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_optional_database.py +0 -0
  381. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_transform_flow.py +0 -0
  382. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_typing.py +0 -0
  383. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_validation.py +0 -0
  384. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/typing.py +0 -0
  385. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/user_app_loader.py +0 -0
  386. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/utils.py +0 -0
  387. {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/validation.py +0 -0
  388. {cocoindex-0.2.23 → cocoindex-0.3.0}/ruff.toml +0 -0
  389. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/duration.rs +0 -0
  390. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/field_attrs.rs +0 -0
  391. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/json_schema.rs +0 -0
  392. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/mod.rs +0 -0
  393. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/schema.rs +0 -0
  394. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/spec.rs +0 -0
  395. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/value.rs +0 -0
  396. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/analyzed_flow.rs +0 -0
  397. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/analyzer.rs +0 -0
  398. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/exec_ctx.rs +0 -0
  399. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/flow_builder.rs +0 -0
  400. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/mod.rs +0 -0
  401. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/plan.rs +0 -0
  402. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/db_tracking.rs +0 -0
  403. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/db_tracking_setup.rs +0 -0
  404. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/dumper.rs +0 -0
  405. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/evaluator.rs +0 -0
  406. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/indexing_status.rs +0 -0
  407. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/memoization.rs +0 -0
  408. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/mod.rs +0 -0
  409. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/row_indexer.rs +0 -0
  410. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/stats.rs +0 -0
  411. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/lib.rs +0 -0
  412. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/anthropic.rs +0 -0
  413. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/bedrock.rs +0 -0
  414. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/gemini.rs +0 -0
  415. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/litellm.rs +0 -0
  416. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/mod.rs +0 -0
  417. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/ollama.rs +0 -0
  418. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/openai.rs +0 -0
  419. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/openrouter.rs +0 -0
  420. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/vllm.rs +0 -0
  421. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/voyage.rs +0 -0
  422. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/detect_program_lang.rs +0 -0
  423. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/embed_text.rs +0 -0
  424. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/extract_by_llm.rs +0 -0
  425. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/mod.rs +0 -0
  426. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/parse_json.rs +0 -0
  427. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/split_by_separators.rs +0 -0
  428. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/split_recursively.rs +0 -0
  429. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/test_utils.rs +0 -0
  430. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/interface.rs +0 -0
  431. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/mod.rs +0 -0
  432. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/registration.rs +0 -0
  433. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/registry.rs +0 -0
  434. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sdk.rs +0 -0
  435. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/shared/mod.rs +0 -0
  436. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/shared/postgres.rs +0 -0
  437. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/shared/program_langs.rs +0 -0
  438. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/shared/split.rs +0 -0
  439. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/amazon_s3.rs +0 -0
  440. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/azure_blob.rs +0 -0
  441. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/google_drive.rs +0 -0
  442. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/local_file.rs +0 -0
  443. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/mod.rs +0 -0
  444. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/postgres.rs +0 -0
  445. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/shared/mod.rs +0 -0
  446. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/shared/pattern_matcher.rs +0 -0
  447. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/kuzu.rs +0 -0
  448. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/mod.rs +0 -0
  449. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/neo4j.rs +0 -0
  450. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/postgres.rs +0 -0
  451. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/qdrant.rs +0 -0
  452. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/shared/mod.rs +0 -0
  453. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/shared/property_graph.rs +0 -0
  454. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/shared/table_columns.rs +0 -0
  455. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/py/convert.rs +0 -0
  456. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/server.rs +0 -0
  457. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/service/flows.rs +0 -0
  458. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/service/mod.rs +0 -0
  459. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/service/query_handler.rs +0 -0
  460. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/settings.rs +0 -0
  461. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/auth_registry.rs +0 -0
  462. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/components.rs +0 -0
  463. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/db_metadata.rs +0 -0
  464. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/driver.rs +0 -0
  465. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/flow_features.rs +0 -0
  466. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/mod.rs +0 -0
  467. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/states.rs +0 -0
  468. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/bytes_decode.rs +0 -0
  469. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/concur_control.rs +0 -0
  470. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/db.rs +0 -0
  471. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/deser.rs +0 -0
  472. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/fingerprint.rs +0 -0
  473. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/immutable.rs +0 -0
  474. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/retryable.rs +0 -0
  475. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/str_sanitize.rs +0 -0
  476. {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/yaml_ser.rs +0 -0
@@ -1298,7 +1298,7 @@ dependencies = [
1298
1298
 
1299
1299
  [[package]]
1300
1300
  name = "cocoindex"
1301
- version = "0.2.23"
1301
+ version = "0.3.0"
1302
1302
  dependencies = [
1303
1303
  "anyhow",
1304
1304
  "async-openai",
@@ -1363,6 +1363,7 @@ dependencies = [
1363
1363
  "time",
1364
1364
  "tokio",
1365
1365
  "tokio-stream",
1366
+ "tokio-util",
1366
1367
  "tower 0.5.2",
1367
1368
  "tower-http",
1368
1369
  "tree-sitter",
@@ -5667,6 +5668,7 @@ dependencies = [
5667
5668
  "bytes",
5668
5669
  "futures-core",
5669
5670
  "futures-sink",
5671
+ "futures-util",
5670
5672
  "pin-project-lite",
5671
5673
  "tokio",
5672
5674
  ]
@@ -2,7 +2,7 @@
2
2
  name = "cocoindex"
3
3
  # Version used for local development is always higher than others to take precedence.
4
4
  # Will be overridden for specific release versions.
5
- version = "0.2.23"
5
+ version = "0.3.0"
6
6
  edition = "2024"
7
7
  rust-version = "1.89"
8
8
  license = "Apache-2.0"
@@ -157,3 +157,4 @@ serde_path_to_error = "0.1.17"
157
157
  redis = { version = "0.31.0", features = ["tokio-comp", "connection-manager"] }
158
158
  expect-test = "1.5.0"
159
159
  encoding_rs = "0.8.35"
160
+ tokio-util = { version = "0.7.16", features = ["rt"] }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex
3
- Version: 0.2.23
3
+ Version: 0.3.0
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: License :: OSI Approved :: Apache Software License
6
6
  Classifier: Operating System :: OS Independent
@@ -2846,7 +2846,7 @@ Software.
2846
2846
  <h3 id="Apache-2.0">Apache License 2.0</h3>
2847
2847
  <h4>Used by:</h4>
2848
2848
  <ul class="license-used-by">
2849
- <li><a href=" https://crates.io/crates/cocoindex ">cocoindex 0.2.23</a></li>
2849
+ <li><a href=" https://crates.io/crates/cocoindex ">cocoindex 0.3.0</a></li>
2850
2850
  <li><a href=" https://github.com/awesomized/crc-fast-rust ">crc-fast 1.3.0</a></li>
2851
2851
  <li><a href=" https://github.com/qdrant/rust-client ">qdrant-client 1.15.0</a></li>
2852
2852
  </ul>
@@ -31,6 +31,7 @@ class SentenceTransformerEmbed(op.FunctionSpec):
31
31
  @op.executor_class(
32
32
  gpu=True,
33
33
  cache=True,
34
+ batching=True,
34
35
  behavior_version=1,
35
36
  arg_relationship=(op.ArgRelationship.EMBEDDING_ORIGIN_TEXT, "text"),
36
37
  )
@@ -57,7 +58,9 @@ class SentenceTransformerEmbedExecutor:
57
58
  dim = self._model.get_sentence_embedding_dimension()
58
59
  return Vector[np.float32, Literal[dim]] # type: ignore
59
60
 
60
- def __call__(self, text: str) -> NDArray[np.float32]:
61
+ def __call__(self, text: list[str]) -> list[NDArray[np.float32]]:
61
62
  assert self._model is not None
62
- result: NDArray[np.float32] = self._model.encode(text, convert_to_numpy=True)
63
- return result
63
+ results: list[NDArray[np.float32]] = self._model.encode(
64
+ text, convert_to_numpy=True
65
+ )
66
+ return results
@@ -32,6 +32,7 @@ from .engine_value import (
32
32
  )
33
33
  from .typing import (
34
34
  KEY_FIELD_NAME,
35
+ AnalyzedListType,
35
36
  AnalyzedTypeInfo,
36
37
  StructSchema,
37
38
  StructType,
@@ -45,6 +46,7 @@ from .typing import (
45
46
  EnrichedValueType,
46
47
  decode_engine_field_schemas,
47
48
  FieldSchema,
49
+ ValueType,
48
50
  )
49
51
  from .runtime import to_async_call
50
52
  from .index import IndexOptions
@@ -149,6 +151,7 @@ class OpArgs:
149
151
  """
150
152
  - gpu: Whether the executor will be executed on GPU.
151
153
  - cache: Whether the executor will be cached.
154
+ - batching: Whether the executor will be batched.
152
155
  - behavior_version: The behavior version of the executor. Cache will be invalidated if it
153
156
  changes. Must be provided if `cache` is True.
154
157
  - arg_relationship: It specifies the relationship between an input argument and the output,
@@ -158,6 +161,7 @@ class OpArgs:
158
161
 
159
162
  gpu: bool = False
160
163
  cache: bool = False
164
+ batching: bool = False
161
165
  behavior_version: int | None = None
162
166
  arg_relationship: tuple[ArgRelationship, str] | None = None
163
167
 
@@ -168,6 +172,16 @@ class _ArgInfo:
168
172
  is_required: bool
169
173
 
170
174
 
175
+ def _make_batched_engine_value_decoder(
176
+ field_path: list[str], src_type: ValueType, dst_type_info: AnalyzedTypeInfo
177
+ ) -> Callable[[Any], Any]:
178
+ if not isinstance(dst_type_info.variant, AnalyzedListType):
179
+ raise ValueError("Expected arguments for batching function to be a list type")
180
+ elem_type_info = analyze_type_info(dst_type_info.variant.elem_type)
181
+ base_decoder = make_engine_value_decoder(field_path, src_type, elem_type_info)
182
+ return lambda value: [base_decoder(v) for v in value]
183
+
184
+
171
185
  def _register_op_factory(
172
186
  category: OpCategory,
173
187
  expected_args: list[tuple[str, inspect.Parameter]],
@@ -181,6 +195,10 @@ def _register_op_factory(
181
195
  Register an op factory.
182
196
  """
183
197
 
198
+ if op_args.batching:
199
+ if len(expected_args) != 1:
200
+ raise ValueError("Batching is only supported for single argument functions")
201
+
184
202
  class _WrappedExecutor:
185
203
  _executor: Any
186
204
  _args_info: list[_ArgInfo]
@@ -208,7 +226,7 @@ def _register_op_factory(
208
226
  """
209
227
  self._args_info = []
210
228
  self._kwargs_info = {}
211
- attributes = []
229
+ attributes = {}
212
230
  potentially_missing_required_arg = False
213
231
 
214
232
  def process_arg(
@@ -220,14 +238,17 @@ def _register_op_factory(
220
238
  if op_args.arg_relationship is not None:
221
239
  related_attr, related_arg_name = op_args.arg_relationship
222
240
  if related_arg_name == arg_name:
223
- attributes.append(
224
- TypeAttr(related_attr.value, actual_arg.analyzed_value)
225
- )
241
+ attributes[related_attr.value] = actual_arg.analyzed_value
226
242
  type_info = analyze_type_info(arg_param.annotation)
227
243
  enriched = EnrichedValueType.decode(actual_arg.value_type)
228
- decoder = make_engine_value_decoder(
229
- [arg_name], enriched.type, type_info
230
- )
244
+ if op_args.batching:
245
+ decoder = _make_batched_engine_value_decoder(
246
+ [arg_name], enriched.type, type_info
247
+ )
248
+ else:
249
+ decoder = make_engine_value_decoder(
250
+ [arg_name], enriched.type, type_info
251
+ )
231
252
  is_required = not type_info.nullable
232
253
  if is_required and actual_arg.value_type.get("nullable", False):
233
254
  potentially_missing_required_arg = True
@@ -302,20 +323,32 @@ def _register_op_factory(
302
323
  if len(missing_args) > 0:
303
324
  raise ValueError(f"Missing arguments: {', '.join(missing_args)}")
304
325
 
326
+ analyzed_expected_return_type = analyze_type_info(expected_return)
327
+ self._result_encoder = make_engine_value_encoder(
328
+ analyzed_expected_return_type
329
+ )
330
+
305
331
  base_analyze_method = getattr(self._executor, "analyze", None)
306
332
  if base_analyze_method is not None:
307
- result_type = base_analyze_method()
333
+ analyzed_result_type = analyze_type_info(base_analyze_method())
308
334
  else:
309
- result_type = expected_return
335
+ if op_args.batching:
336
+ if not isinstance(
337
+ analyzed_expected_return_type.variant, AnalyzedListType
338
+ ):
339
+ raise ValueError(
340
+ "Expected return type for batching function to be a list type"
341
+ )
342
+ analyzed_result_type = analyze_type_info(
343
+ analyzed_expected_return_type.variant.elem_type
344
+ )
345
+ else:
346
+ analyzed_result_type = analyzed_expected_return_type
310
347
  if len(attributes) > 0:
311
- result_type = Annotated[result_type, *attributes]
312
-
313
- analyzed_result_type_info = analyze_type_info(result_type)
314
- encoded_type = encode_enriched_type_info(analyzed_result_type_info)
348
+ analyzed_result_type.attrs = attributes
315
349
  if potentially_missing_required_arg:
316
- encoded_type["nullable"] = True
317
-
318
- self._result_encoder = make_engine_value_encoder(analyzed_result_type_info)
350
+ analyzed_result_type.nullable = True
351
+ encoded_type = encode_enriched_type_info(analyzed_result_type)
319
352
 
320
353
  return encoded_type
321
354
 
@@ -359,7 +392,9 @@ def _register_op_factory(
359
392
 
360
393
  if category == OpCategory.FUNCTION:
361
394
  _engine.register_function_factory(
362
- op_kind, _EngineFunctionExecutorFactory(spec_loader, _WrappedExecutor)
395
+ op_kind,
396
+ _EngineFunctionExecutorFactory(spec_loader, _WrappedExecutor),
397
+ op_args.batching,
363
398
  )
364
399
  else:
365
400
  raise ValueError(f"Unsupported executor type {category}")
@@ -0,0 +1,74 @@
1
+ """
2
+ This module provides a standalone execution runtime for executing coroutines in a thread-safe
3
+ manner.
4
+ """
5
+
6
+ import threading
7
+ import asyncio
8
+ import inspect
9
+ import warnings
10
+
11
+ from typing import Any, Callable, Awaitable, TypeVar, Coroutine
12
+
13
+ T = TypeVar("T")
14
+
15
+
16
+ class _ExecutionContext:
17
+ _lock: threading.Lock
18
+ _event_loop: asyncio.AbstractEventLoop | None = None
19
+
20
+ def __init__(self) -> None:
21
+ self._lock = threading.Lock()
22
+
23
+ @property
24
+ def event_loop(self) -> asyncio.AbstractEventLoop:
25
+ """Get the event loop for the cocoindex library."""
26
+ with self._lock:
27
+ if self._event_loop is None:
28
+ loop = asyncio.new_event_loop()
29
+ self._event_loop = loop
30
+
31
+ def _runner(l: asyncio.AbstractEventLoop) -> None:
32
+ asyncio.set_event_loop(l)
33
+ l.run_forever()
34
+
35
+ threading.Thread(target=_runner, args=(loop,), daemon=True).start()
36
+ return self._event_loop
37
+
38
+ def run(self, coro: Coroutine[Any, Any, T]) -> T:
39
+ """Run a coroutine in the event loop, blocking until it finishes. Return its result."""
40
+ try:
41
+ running_loop = asyncio.get_running_loop()
42
+ except RuntimeError:
43
+ running_loop = None
44
+
45
+ loop = self.event_loop
46
+
47
+ if running_loop is not None:
48
+ if running_loop is loop:
49
+ raise RuntimeError(
50
+ "CocoIndex sync API was called from inside CocoIndex's async context. "
51
+ "Use the async variant of this method instead."
52
+ )
53
+ warnings.warn(
54
+ "CocoIndex sync API was called inside an existing event loop. "
55
+ "This may block other tasks. Prefer the async method.",
56
+ RuntimeWarning,
57
+ stacklevel=2,
58
+ )
59
+
60
+ fut = asyncio.run_coroutine_threadsafe(coro, loop)
61
+ try:
62
+ return fut.result()
63
+ except KeyboardInterrupt:
64
+ fut.cancel()
65
+ raise
66
+
67
+
68
+ execution_context = _ExecutionContext()
69
+
70
+
71
+ def to_async_call(call: Callable[..., Any]) -> Callable[..., Awaitable[Any]]:
72
+ if inspect.iscoroutinefunction(call):
73
+ return call
74
+ return lambda *args, **kwargs: asyncio.to_thread(lambda: call(*args, **kwargs))
@@ -19,7 +19,6 @@ import threading
19
19
  import asyncio
20
20
  import os
21
21
  import time
22
- import atexit
23
22
  from .user_app_loader import load_user_app
24
23
  from .runtime import execution_context
25
24
  import logging
@@ -32,39 +31,14 @@ WATCHDOG_INTERVAL_SECONDS = 10.0
32
31
  # ---------------------------------------------
33
32
  _pool_lock = threading.Lock()
34
33
  _pool: ProcessPoolExecutor | None = None
35
- _pool_cleanup_registered = False
36
34
  _user_apps: list[str] = []
37
35
  _logger = logging.getLogger(__name__)
38
36
 
39
37
 
40
- def shutdown_pool_at_exit() -> None:
41
- """Best-effort shutdown of the global ProcessPoolExecutor on interpreter exit."""
42
- global _pool, _pool_cleanup_registered # pylint: disable=global-statement
43
- with _pool_lock:
44
- if _pool is not None:
45
- try:
46
- _pool.shutdown(wait=True, cancel_futures=True)
47
- except Exception as e:
48
- _logger.error(
49
- "Error during ProcessPoolExecutor shutdown at exit: %s",
50
- e,
51
- exc_info=True,
52
- )
53
- finally:
54
- _pool = None
55
- _pool_cleanup_registered = False
56
-
57
-
58
38
  def _get_pool() -> ProcessPoolExecutor:
59
- global _pool, _pool_cleanup_registered # pylint: disable=global-statement
39
+ global _pool # pylint: disable=global-statement
60
40
  with _pool_lock:
61
41
  if _pool is None:
62
- if not _pool_cleanup_registered:
63
- # Register the shutdown at exit at creation time (rather than at import time)
64
- # to make sure it's executed earlier in the shutdown sequence.
65
- atexit.register(shutdown_pool_at_exit)
66
- _pool_cleanup_registered = True
67
-
68
42
  # Single worker process as requested
69
43
  _pool = ProcessPoolExecutor(
70
44
  max_workers=1,
@@ -10,7 +10,9 @@ use super::stats;
10
10
  use futures::future::try_join_all;
11
11
  use indicatif::ProgressBar;
12
12
  use sqlx::PgPool;
13
+ use std::fmt::Write;
13
14
  use tokio::{sync::watch, task::JoinSet, time::MissedTickBehavior};
15
+ use tokio_util::task::AbortOnDropHandle;
14
16
 
15
17
  pub struct FlowLiveUpdaterUpdates {
16
18
  pub active_sources: Vec<String>,
@@ -144,7 +146,6 @@ impl SourceUpdateTask {
144
146
  futs.push(
145
147
  {
146
148
  let change_stream_stats = change_stream_stats.clone();
147
- let pool = self.pool.clone();
148
149
  let status_tx = self.status_tx.clone();
149
150
  let operation_in_process_stats = self.operation_in_process_stats.clone();
150
151
  async move {
@@ -229,7 +230,6 @@ impl SourceUpdateTask {
229
230
  Some(move || async move {
230
231
  SharedAckFn::ack(&shared_ack_fn).await
231
232
  }),
232
- pool.clone(),
233
233
  ),
234
234
  );
235
235
  }
@@ -252,7 +252,7 @@ impl SourceUpdateTask {
252
252
  let curr_change_stream_stats = change_stream_stats.as_ref().clone();
253
253
  let delta = curr_change_stream_stats.delta(&last_change_stream_stats);
254
254
  if delta.has_any_change() {
255
- task.report_stats(&delta, "change stream");
255
+ task.report_stats(&delta, "change stream", None);
256
256
  last_change_stream_stats = curr_change_stream_stats;
257
257
  }
258
258
  }
@@ -266,7 +266,7 @@ impl SourceUpdateTask {
266
266
  async move {
267
267
  let refresh_interval = import_op.refresh_options.refresh_interval;
268
268
 
269
- task.update_with_pass_with_error_logging(
269
+ task.update_one_pass_with_error_logging(
270
270
  source_indexing_context,
271
271
  if refresh_interval.is_some() {
272
272
  "initial interval update"
@@ -284,7 +284,7 @@ impl SourceUpdateTask {
284
284
  loop {
285
285
  interval.tick().await;
286
286
 
287
- task.update_with_pass_with_error_logging(
287
+ task.update_one_pass_with_error_logging(
288
288
  source_indexing_context,
289
289
  "interval update",
290
290
  super::source_indexer::UpdateOptions {
@@ -304,22 +304,30 @@ impl SourceUpdateTask {
304
304
  Ok(())
305
305
  }
306
306
 
307
- fn report_stats(&self, stats: &stats::UpdateStats, update_title: &str) {
307
+ fn report_stats(
308
+ &self,
309
+ stats: &stats::UpdateStats,
310
+ update_title: &str,
311
+ start_time: Option<std::time::Instant>,
312
+ ) {
308
313
  self.source_update_stats.merge(stats);
314
+ let mut message = format!(
315
+ "{}.{} ({update_title}): {stats}",
316
+ self.flow.flow_instance.name,
317
+ self.import_op().name
318
+ );
319
+ if let Some(start_time) = start_time {
320
+ write!(
321
+ &mut message,
322
+ " [processing time: {:.3}s]",
323
+ start_time.elapsed().as_secs_f64()
324
+ )
325
+ .expect("Failed to write to message");
326
+ }
309
327
  if self.options.print_stats {
310
- println!(
311
- "{}.{} ({update_title}): {}",
312
- self.flow.flow_instance.name,
313
- self.import_op().name,
314
- stats
315
- );
328
+ println!("{message}");
316
329
  } else {
317
- trace!(
318
- "{}.{} ({update_title}): {}",
319
- self.flow.flow_instance.name,
320
- self.import_op().name,
321
- stats
322
- );
330
+ trace!("{message}");
323
331
  }
324
332
  }
325
333
 
@@ -329,6 +337,7 @@ impl SourceUpdateTask {
329
337
  update_title: &str,
330
338
  update_options: super::source_indexer::UpdateOptions,
331
339
  ) -> Result<()> {
340
+ let now = std::time::Instant::now();
332
341
  let update_stats = Arc::new(stats::UpdateStats::default());
333
342
 
334
343
  // Spawn periodic stats reporting task if print_stats is enabled
@@ -364,14 +373,17 @@ impl SourceUpdateTask {
364
373
  }
365
374
  }
366
375
  };
367
- (Some(tokio::spawn(report_task)), Some(pb))
376
+ (
377
+ Some(AbortOnDropHandle::new(tokio::spawn(report_task))),
378
+ Some(pb),
379
+ )
368
380
  } else {
369
381
  (None, None)
370
382
  };
371
383
 
372
384
  // Run the actual update
373
385
  let update_result = source_indexing_context
374
- .update(&self.pool, &update_stats, update_options)
386
+ .update(&update_stats, update_options)
375
387
  .await
376
388
  .with_context(|| {
377
389
  format!(
@@ -401,11 +413,11 @@ impl SourceUpdateTask {
401
413
  }
402
414
 
403
415
  // Report final stats
404
- self.report_stats(&update_stats, update_title);
416
+ self.report_stats(&update_stats, update_title, Some(now));
405
417
  Ok(())
406
418
  }
407
419
 
408
- async fn update_with_pass_with_error_logging(
420
+ async fn update_one_pass_with_error_logging(
409
421
  &self,
410
422
  source_indexing_context: &Arc<SourceIndexingContext>,
411
423
  update_title: &str,