matchbox-db 0.6.3.dev96__tar.gz → 0.7.1__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 (211) hide show
  1. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/.github/workflows/ci.yml +1 -1
  2. {matchbox_db-0.6.3.dev96/src/matchbox_db.egg-info → matchbox_db-0.7.1}/PKG-INFO +1 -1
  3. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docker-compose.yml +8 -14
  4. matchbox_db-0.7.1/docs/api/client/locations.md +17 -0
  5. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/client/evaluation.md +0 -3
  6. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/client/link-data.md +7 -6
  7. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/contributing.md +17 -5
  8. matchbox_db-0.7.1/environments/containers.env +5 -0
  9. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/environments/development.env +14 -7
  10. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/justfile +1 -1
  11. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/mkdocs.yml +1 -0
  12. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/__init__.py +1 -1
  13. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/_handler.py +7 -1
  14. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/dags.py +14 -12
  15. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/eval/utils.py +4 -3
  16. matchbox_db-0.7.1/src/matchbox/client/locations.py +325 -0
  17. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/sources.py +7 -279
  18. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/dtos.py +21 -1
  19. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/factories/scenarios.py +1 -1
  20. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/factories/sources.py +7 -6
  21. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/Dockerfile +5 -2
  22. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1/src/matchbox_db.egg-info}/PKG-INFO +1 -1
  23. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox_db.egg-info/SOURCES.txt +3 -0
  24. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/test_dags.py +26 -19
  25. matchbox_db-0.7.1/test/client/test_locations.py +226 -0
  26. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/test_sources.py +16 -220
  27. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/e2e/test_e2e_dag.py +4 -4
  28. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/e2e/test_e2e_evaluation.py +2 -2
  29. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/fixtures/db.py +1 -1
  30. matchbox_db-0.7.1/uv.lock +3292 -0
  31. matchbox_db-0.6.3.dev96/environments/containers.env +0 -23
  32. matchbox_db-0.6.3.dev96/uv.lock +0 -3252
  33. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/.github/pull_request_template.md +0 -0
  34. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/.github/workflows/prerelease.yml +0 -0
  35. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/.github/workflows/release.yml +0 -0
  36. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/.gitignore +0 -0
  37. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/.pre-commit-config.yaml +0 -0
  38. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/.vscode/launch.json +0 -0
  39. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/.vscode/settings.json +0 -0
  40. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/LICENSE +0 -0
  41. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/README.md +0 -0
  42. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/client/dags.md +0 -0
  43. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/client/eval.md +0 -0
  44. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/client/index.md +0 -0
  45. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/client/models.md +0 -0
  46. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/client/queries.md +0 -0
  47. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/client/results.md +0 -0
  48. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/client/sources.md +0 -0
  49. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/arrow.md +0 -0
  50. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/db.md +0 -0
  51. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/dtos.md +0 -0
  52. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/eval.md +0 -0
  53. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/exceptions.md +0 -0
  54. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/factories/entities.md +0 -0
  55. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/factories/index.md +0 -0
  56. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/factories/models.md +0 -0
  57. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/factories/scenarios.md +0 -0
  58. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/factories/sources.md +0 -0
  59. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/hash.md +0 -0
  60. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/index.md +0 -0
  61. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/logging.md +0 -0
  62. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/common/transform.md +0 -0
  63. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/server/api.md +0 -0
  64. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/server/backends/postgresql.md +0 -0
  65. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/server/index.md +0 -0
  66. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/api/server/uploads.md +0 -0
  67. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/assets/matchbox-icon-dark.png +0 -0
  68. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/assets/matchbox-icon.svg +0 -0
  69. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/assets/matchbox-logo-dark.svg +0 -0
  70. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/assets/matchbox-logo-light.svg +0 -0
  71. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/client/explore-dags.md +0 -0
  72. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/client/install.md +0 -0
  73. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/client/look-up.md +0 -0
  74. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/index.md +0 -0
  75. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/server/concepts.md +0 -0
  76. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/server/install.md +0 -0
  77. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/server/risks.md +0 -0
  78. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/stylesheets/extra.css +0 -0
  79. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/docs/use-cases.md +0 -0
  80. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/environments/sample_client.env +0 -0
  81. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/environments/sample_server.env +0 -0
  82. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/pyproject.toml +0 -0
  83. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/setup.cfg +0 -0
  84. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/__init__.py +0 -0
  85. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/_settings.py +0 -0
  86. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/authorisation.py +0 -0
  87. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/eval/__init__.py +0 -0
  88. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/eval/justfile +0 -0
  89. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/eval/mock_ui.py +0 -0
  90. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/eval/ui.py +0 -0
  91. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/__init__.py +0 -0
  92. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/comparison.py +0 -0
  93. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/dedupers/__init__.py +0 -0
  94. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/dedupers/base.py +0 -0
  95. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/dedupers/naive.py +0 -0
  96. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/linkers/__init__.py +0 -0
  97. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/linkers/base.py +0 -0
  98. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/linkers/deterministic.py +0 -0
  99. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/linkers/splinklinker.py +0 -0
  100. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/linkers/weighteddeterministic.py +0 -0
  101. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/models/models.py +0 -0
  102. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/queries.py +0 -0
  103. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/client/results.py +0 -0
  104. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/__init__.py +0 -0
  105. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/arrow.py +0 -0
  106. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/db.py +0 -0
  107. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/eval.py +0 -0
  108. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/exceptions.py +0 -0
  109. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/factories/__init__.py +0 -0
  110. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/factories/dags.py +0 -0
  111. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/factories/entities.py +0 -0
  112. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/factories/models.py +0 -0
  113. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/hash.py +0 -0
  114. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/logging.py +0 -0
  115. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/common/transform.py +0 -0
  116. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/__init__.py +0 -0
  117. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/__init__.py +0 -0
  118. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/dependencies.py +0 -0
  119. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/main.py +0 -0
  120. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/routers/__init__.py +0 -0
  121. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/routers/collection.py +0 -0
  122. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/routers/eval.py +0 -0
  123. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/static/favicon.png +0 -0
  124. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/static/swagger-ui-bundle.js +0 -0
  125. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/api/static/swagger-ui.css +0 -0
  126. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/base.py +0 -0
  127. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/.gitkeep +0 -0
  128. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/__init__.py +0 -0
  129. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/adapter.py +0 -0
  130. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/env.py +0 -0
  131. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/script.py.mako +0 -0
  132. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/05cc4181a0ad_removed_source_key_reference_and_added_.py +0 -0
  133. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/1907c34cfa1f_create_tables_given_schema.py +0 -0
  134. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/3754ae042254_move_orm_to_root_leaf_contains_structure.py +0 -0
  135. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/40a8e5ed48f2_create_schema_without_tables.py +0 -0
  136. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/4a7c35f86405_move_sourceconfigs_from_sourceaddress_.py +0 -0
  137. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/7a2d1b10ac0f_switch_from_location_uri_to_name.py +0 -0
  138. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/83b134a86713_simplify_resolution_naming_and_hashing.py +0 -0
  139. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/8c7f757b1046_remove_human_resolution_type.py +0 -0
  140. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/95c0b5c23446_renaming_sources_to_source_config.py +0 -0
  141. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/ae63f79f6b39_renamed_sourcecolumns_to_sourcefields.py +0 -0
  142. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/b38d61ab11cc_add_index_to_the_clustersourcekey_table.py +0 -0
  143. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/b694eb292dea_add_an_index_to_the_probabilities_.py +0 -0
  144. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/beba75a24962_add_pkspace_table.py +0 -0
  145. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/c4cb937d00f4_add_modelconfigs.py +0 -0
  146. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/dd0c3a9ecdf9_add_migrations_for_first_eval_tables.py +0 -0
  147. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/e4122bdf9b0d_renamed_primary_keys_to_just_keys.py +0 -0
  148. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/f3c9279437f4_add_content_hash_to_resolutions.py +0 -0
  149. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic/versions/f500f7d832fe_adds_collections_and_versions_to_scope_.py +0 -0
  150. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/alembic.ini +0 -0
  151. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/db.py +0 -0
  152. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/justfile +0 -0
  153. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/mixin.py +0 -0
  154. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/orm.py +0 -0
  155. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/utils/__init__.py +0 -0
  156. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/utils/db.py +0 -0
  157. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/utils/evaluation.py +0 -0
  158. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/utils/insert.py +0 -0
  159. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/utils/query.py +0 -0
  160. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/postgresql/utils/results.py +0 -0
  161. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox/server/uploads.py +0 -0
  162. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox_db.egg-info/dependency_links.txt +0 -0
  163. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox_db.egg-info/requires.txt +0 -0
  164. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/src/matchbox_db.egg-info/top_level.txt +0 -0
  165. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/__init__.py +0 -0
  166. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/__init__.py +0 -0
  167. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/models/__init__.py +0 -0
  168. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/models/methodologies/__init__.py +0 -0
  169. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/models/methodologies/test_dedupers_deterministic.py +0 -0
  170. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/models/methodologies/test_linkers_deterministic.py +0 -0
  171. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/models/methodologies/test_linkers_probabilistic.py +0 -0
  172. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/models/test_comparison.py +0 -0
  173. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/test_eval.py +0 -0
  174. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/test_handler.py +0 -0
  175. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/test_models.py +0 -0
  176. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/test_queries.py +0 -0
  177. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/client/test_results.py +0 -0
  178. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/__init__.py +0 -0
  179. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/factories/__init__.py +0 -0
  180. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/factories/test_entity_factory.py +0 -0
  181. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/factories/test_linked_factory.py +0 -0
  182. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/factories/test_model_factory.py +0 -0
  183. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/factories/test_probability_generation.py +0 -0
  184. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/factories/test_scenarios.py +0 -0
  185. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/factories/test_source_factory.py +0 -0
  186. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/factories/test_testkit_dag.py +0 -0
  187. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/test_dto.py +0 -0
  188. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/test_eval.py +0 -0
  189. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/test_hash.py +0 -0
  190. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/test_results.py +0 -0
  191. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/common/test_transform.py +0 -0
  192. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/conftest.py +0 -0
  193. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/data/all_companies.csv +0 -0
  194. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/fixtures/__init__.py +0 -0
  195. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/fixtures/client.py +0 -0
  196. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/justfile +0 -0
  197. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/__init__.py +0 -0
  198. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/api/__init__.py +0 -0
  199. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/api/routes/__init__.py +0 -0
  200. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/api/routes/test_routes_collection.py +0 -0
  201. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/api/routes/test_routes_eval.py +0 -0
  202. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/api/routes/test_routes_main.py +0 -0
  203. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/api/routes/test_routes_resolution.py +0 -0
  204. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/postgresql/__init__.py +0 -0
  205. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/postgresql/test_pg_core.py +0 -0
  206. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/postgresql/test_pg_migrations.py +0 -0
  207. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/postgresql/test_pg_sql.py +0 -0
  208. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/test_adapter.py +0 -0
  209. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/server/test_uploads.py +0 -0
  210. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/test/utils.py +0 -0
  211. {matchbox_db-0.6.3.dev96 → matchbox_db-0.7.1}/trufflehog-exclude.txt +0 -0
@@ -53,7 +53,7 @@ jobs:
53
53
  run: cp environments/development.env .env
54
54
 
55
55
  - name: Run databases and API
56
- run: docker compose up -d --wait
56
+ run: docker compose --env-file .env --env-file environments/containers.env up -d --wait
57
57
 
58
58
  - name: Run Python tests
59
59
  run: uv run pytest
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matchbox-db
3
- Version: 0.6.3.dev96
3
+ Version: 0.7.1
4
4
  Summary: A framework for orchestrating and comparing data linking and deduplication methodologies.
5
5
  Author: Department for Business and Trade
6
6
  Project-URL: Documentation, https://uktrade.github.io/matchbox/
@@ -3,7 +3,7 @@ services:
3
3
  image: postgres:17
4
4
  restart: always
5
5
  ports:
6
- - "${MB__DEV__WAREHOUSE_PORT:-7654}:5432"
6
+ - "${MB__DEV__WAREHOUSE_PORT}:5432"
7
7
  volumes:
8
8
  - warehouse_data:/var/lib/postgresql/data
9
9
  environment:
@@ -17,8 +17,8 @@ services:
17
17
  - matchbox_store:/data
18
18
  command: server --console-address ":9001" /data
19
19
  ports:
20
- - "${MB__DEV__DATASTORE_PORT:-9000}:9000"
21
- - "${MB__DEV__DATASTORE_CONSOLE_PORT-9001}:9001"
20
+ - "${MB__DEV__DATASTORE_PORT}:9000"
21
+ - "${MB__DEV__DATASTORE_CONSOLE_PORT}:9001"
22
22
  healthcheck:
23
23
  test: ["CMD", "mc", "ready", "local"]
24
24
  interval: 5s
@@ -31,12 +31,11 @@ services:
31
31
  build:
32
32
  context: .
33
33
  args:
34
- ENV_FILE: containers.env
35
34
  MB_VERSION: ${MB_VERSION-0.0.0dev0}
36
35
  dockerfile: src/matchbox/server/Dockerfile
37
36
  target: dev
38
37
  ports:
39
- - "${MB__DEV__API_PORT-8000}:8000"
38
+ - "${MB__DEV__API_PORT}:8000"
40
39
  command: fastapi dev --host 0.0.0.0 src/matchbox/server/api
41
40
  depends_on:
42
41
  - postgres
@@ -59,7 +58,7 @@ services:
59
58
  image: postgres:17
60
59
  restart: always
61
60
  ports:
62
- - "${MB__DEV__POSTGRES_BACKEND_PORT:-5432}:5432"
61
+ - "${MB__DEV__POSTGRES_BACKEND_PORT}:5432"
63
62
  volumes:
64
63
  - matchbox_data:/var/lib/postgresql/data
65
64
  environment:
@@ -70,30 +69,25 @@ services:
70
69
  image: redis:8
71
70
  restart: always
72
71
  ports:
73
- - "${MB__DEV__REDIS_PORT:-6379}:6379"
72
+ - "${MB__DEV__REDIS_PORT}:6379"
74
73
  worker:
75
74
  build:
76
75
  context: .
77
76
  dockerfile: src/matchbox/server/Dockerfile
78
77
  target: dev
79
78
  args:
80
- ENV_FILE: containers.env
81
79
  MB_VERSION: ${MB_VERSION-0.0.0dev0}
82
80
  command: celery -A matchbox.server.uploads.celery worker --loglevel=info
83
81
  depends_on:
84
82
  - postgres
85
83
  - filestorage
86
84
  - redis
87
- environment:
88
- - CELERY_BROKER_URL=redis://redis:6379/0
89
85
  flower:
90
86
  image: mher/flower
91
87
  container_name: flower
92
88
  ports:
93
- - "${MB__DEV__FLOWER_PORT:-5555}:5555"
94
- environment:
95
- - CELERY_BROKER_URL=redis://redis:6379/0
96
- command: celery flower --broker=${CELERY_BROKER_URL}
89
+ - "${MB__DEV__FLOWER_PORT}:5555"
90
+ command: celery --broker=${MB__SERVER__REDIS_URI} flower
97
91
  depends_on:
98
92
  - redis
99
93
 
@@ -0,0 +1,17 @@
1
+ ::: matchbox.client.locations
2
+ options:
3
+ show_root_heading: true
4
+ show_root_full_path: true
5
+ members_order: source
6
+ show_if_no_docstring: true
7
+ docstring_style: google
8
+ show_signature_annotations: true
9
+ separate_signature: true
10
+ extra:
11
+ show_root_docstring: true
12
+ filters:
13
+ - "!^[A-Z]$" # Excludes single-letter uppercase variables (like T, P, R)
14
+ - "!^_" # Excludes private attributes
15
+ - "!_logger$" # Excludes logger variables
16
+ - "!_path$" # Excludes path variables
17
+ - "!model_config" # Excludes Pydantic configuration
@@ -55,9 +55,6 @@ Choosing the right threshold for your model involves balancing precision and rec
55
55
  To evaluate this in code, first you need to build and run a model outside of a DAG:
56
56
 
57
57
  ```python
58
- from matchbox.client.models import Model
59
- from matchbox.client.queries import Query
60
- from matchbox.client.sources import Source
61
58
  from matchbox.client.models.dedupers import NaiveDeduper
62
59
  from sqlalchemy import create_engine
63
60
 
@@ -97,10 +97,12 @@ The `key_field` is the field in your source that contains some unique code that
97
97
  ```python
98
98
  from matchbox.client import RelationalDBLocation
99
99
 
100
+ warehouse = RelationalDBLocation(name="dbname").set_client(engine)
101
+
100
102
  # Companies House data
101
103
  companies_house = dag.source(
102
104
  name="companies_house",
103
- location=RelationalDBLocation(name="dbname", client=engine),
105
+ location=warehouse,
104
106
  extract_transform="""
105
107
  select
106
108
  number::str as company_number,
@@ -117,7 +119,7 @@ The `key_field` is the field in your source that contains some unique code that
117
119
  # Exporters data
118
120
  exporters = dag.source(
119
121
  name="hmrc_exporters",
120
- location=RelationalDBLocation(name="dbname", client=engine),
122
+ location=warehouse,
121
123
  extract_transform="""
122
124
  select
123
125
  id,
@@ -134,7 +136,7 @@ The `key_field` is the field in your source that contains some unique code that
134
136
 
135
137
  Each [`Source`][matchbox.client.sources.Source] object requires:
136
138
 
137
- - A `location`, such as [`RelationalDBLocation`][matchbox.client.sources.RelationalDBLocation]. This will need a `name`, and `client`
139
+ - A `location`, such as [`RelationalDBLocation`][matchbox.client.locations.RelationalDBLocation]. This will need a `name`, and `client`
138
140
  - The name of a location is a way of tagging it, such that later on you can filter sources you want to retrieve from the server
139
141
  - For a relational database, a SQLAlchemy engine is your client
140
142
  - An `extract_transform` string, which will take data from the location and transform it into your key and index fields. Its syntax will depend on the type of location
@@ -165,6 +167,7 @@ Dedupe steps identify and resolve duplicates within a single source.
165
167
  },
166
168
  truth=1.0,
167
169
  )
170
+ ```
168
171
 
169
172
  A query can optionally take instructions on how to clean the data. These are defined using a dictionary where:
170
173
 
@@ -532,9 +535,7 @@ You might want to publish a new run of your DAG based on newer data. You can ret
532
535
  === "Example"
533
536
  ```python
534
537
  # Create a new DAG identical to the previous default
535
- dag = DAG(name="companies").load_default(
536
- location=RelationalDBLocation(name="dbname", client=engine)
537
- ).new_run()
538
+ dag = DAG(name="companies").load_default().set_client(engine).new_run()
538
539
  # Run new DAG
539
540
  dag.run_and_sync()
540
541
  # Make the DAG the new default
@@ -9,7 +9,7 @@ This document describes how you can get started with developing Matchbox.
9
9
 
10
10
  ## Setup
11
11
 
12
- Set up environment variables by creating a `.env` file under project directory. See [`/environments/development.env`](https://github.com/uktrade/matchbox/blob/main/environments/development.env) for sensible defaults.
12
+ Set up environment variables by creating a `.env` file under project directory. See [`/environments/development.env`](https://github.com/uktrade/matchbox/blob/main/environments/development.env) for sensible defaults, which should work as is with the Docker Compose set-up and the tests.
13
13
 
14
14
  This project is managed by [uv](https://docs.astral.sh/uv/), linted and formated with [ruff](https://docs.astral.sh/ruff/), and tested with [pytest](https://docs.pytest.org/en/stable/). [Docker](https://www.docker.com) is used for local development. Documentation is build using [mkdocs](https://www.mkdocs.org).
15
15
 
@@ -33,24 +33,36 @@ Task running is done with [just](https://just.systems/man/en/). To see all avail
33
33
  just -l
34
34
  ```
35
35
 
36
+ ## Starting containers
37
+
38
+ All containers required to run a development version of Matchbox can be built and launched as follows:
39
+
40
+ ```shell
41
+ just build -d --wait
42
+ ```
43
+
44
+ !!! tip "Docker configuration"
45
+ If you want to change the ports on which the various Docker containers listen (typically to avoid clashes with other projects) you need to change the variables starting with `MB__DEV_` in `.env`.
46
+
36
47
  ## Run tests
37
48
 
38
49
  !!! note
39
50
 
40
51
  Your `.env` file needs to be correctly configured for tests to be loaded.
41
52
 
42
- A just task is provided to run all tests.
53
+ If the Docker containers are already up, you can run all tests:
43
54
 
44
55
  ```shell
45
- just test
56
+ pytest
46
57
  ```
47
58
 
48
- If you're running tests with some other method, such as your IDE or pytest directly, you'll need to start the local backends and mock warehouse in Docker.
59
+ Otherwise, you can build and launch the containers, as well as run the tests with a single command:
49
60
 
50
61
  ```shell
51
- just build -d --wait
62
+ just test
52
63
  ```
53
64
 
65
+
54
66
  ## Database Migrations for PostgreSQL backend
55
67
 
56
68
  Migrations for the PostgreSQL backend are managed by [Alembic](https://alembic.sqlalchemy.org/en/latest/).
@@ -0,0 +1,5 @@
1
+ # .env overrides for Docker containers
2
+
3
+ MB__SERVER__REDIS_URI=redis://redis:6379/0
4
+ MB__SERVER__DATASTORE__HOST=filestorage
5
+ MB__SERVER__POSTGRES__HOST=postgres
@@ -1,4 +1,10 @@
1
- # Set Docker Compose ports
1
+ ## COPY THIS FILE to .env in the project root ##
2
+
3
+ # Port configuration for Docker Compose
4
+ # If you change these values, you might have to update a corresponding
5
+ # variable in the server section. For example, if you change the Postgres
6
+ # port, you won't be able to run local migrations without also changing
7
+ # MB__SERVER__POSTGRES__PORT in this file
2
8
  MB__DEV__API_PORT=8000
3
9
  MB__DEV__DATASTORE_CONSOLE_PORT=9003
4
10
  MB__DEV__DATASTORE_PORT=9002
@@ -7,25 +13,26 @@ MB__DEV__POSTGRES_BACKEND_PORT=5432
7
13
  MB__DEV__REDIS_PORT=6379
8
14
  MB__DEV__FLOWER_PORT=5555
9
15
 
10
- # Configure client
16
+ # Client configuration
11
17
  MB__CLIENT__API_ROOT=http://localhost:8000
12
18
  MB__CLIENT__TIMEOUT=10
13
19
  MB__CLIENT__RETRY_DELAY=2
14
20
  MB__CLIENT__USER=scott.mcgregor
15
21
  MB__CLIENT__BATCH_SIZE=250_000
16
22
 
17
- # Configure server (when run outside of Docker)
18
- MB__SERVER__BACKEND_TYPE=postgres
19
- MB__SERVER__BATCH_SIZE=250_000
23
+ # Server configuration for when the API is run outside of Docker
24
+ # e.g. when running in a debugger, or when checking local DB migrations
20
25
  MB__SERVER__LOG_LEVEL=INFO
26
+ MB__SERVER__BATCH_SIZE=250_000
27
+ MB__SERVER__BACKEND_TYPE=postgres
21
28
  MB__SERVER__AUTHORISATION=False
22
- MB__SERVER__PUBLIC_KEY=
29
+
23
30
  MB__SERVER__TASK_RUNNER=celery
24
31
  MB__SERVER__REDIS_URI=redis://localhost:6379/0
25
32
  MB__SERVER__UPLOADS_EXPIRY_MINUTES=10_080
26
33
 
27
34
  MB__SERVER__DATASTORE__HOST=localhost
28
- MB__SERVER__DATASTORE__PORT=9002
35
+ MB__SERVER__DATASTORE__PORT=9000
29
36
  MB__SERVER__DATASTORE__ACCESS_KEY_ID=access_key_id
30
37
  MB__SERVER__DATASTORE__SECRET_ACCESS_KEY=secret_access_key
31
38
  MB__SERVER__DATASTORE__DEFAULT_REGION=eu-west-2
@@ -9,7 +9,7 @@ mod eval 'src/matchbox/client/eval/justfile'
9
9
  build *DOCKER_ARGS:
10
10
  uv sync --extra server
11
11
  MB_VERSION=$(uv run --frozen python -m setuptools_scm) \
12
- docker compose --env-file=environments/containers.env up --build {{DOCKER_ARGS}}
12
+ docker compose --env-file .env --env-file environments/containers.env up --build {{DOCKER_ARGS}}
13
13
 
14
14
  # Delete all compiled Python files
15
15
  clean:
@@ -25,6 +25,7 @@ nav:
25
25
  - Client:
26
26
  - Overview: api/client/index.md
27
27
  - DAGs: api/client/dags.md
28
+ - Locations: api/client/locations.md
28
29
  - Sources: api/client/sources.md
29
30
  - Queries: api/client/queries.md
30
31
  - Models: api/client/models.md
@@ -1,7 +1,7 @@
1
1
  """All client-side functionalities of Matchbox."""
2
2
 
3
3
  from matchbox.client.dags import DAG
4
- from matchbox.client.sources import RelationalDBLocation
4
+ from matchbox.client.locations import RelationalDBLocation
5
5
 
6
6
  __all__ = (
7
7
  "DAG",
@@ -11,6 +11,7 @@ import httpx
11
11
  import polars as pl
12
12
  from pyarrow import Table
13
13
  from pyarrow.parquet import read_table
14
+ from pydantic import ValidationError
14
15
  from tenacity import (
15
16
  retry,
16
17
  retry_if_exception_type,
@@ -120,7 +121,12 @@ def handle_http_code(res: httpx.Response) -> httpx.Response:
120
121
  raise RuntimeError(f"Unexpected 400 error: {res.content}")
121
122
 
122
123
  if res.status_code == 404:
123
- error = NotFoundError.model_validate(res.json())
124
+ try:
125
+ error = NotFoundError.model_validate(res.json())
126
+ # Validation will fail if endpoint does not exist
127
+ except ValidationError as e:
128
+ raise RuntimeError(f"Error with request {res._request}: {res}") from e
129
+
124
130
  match error.entity:
125
131
  case BackendResourceType.COLLECTION:
126
132
  raise MatchboxCollectionNotFoundError(error.details)
@@ -3,14 +3,15 @@
3
3
  import datetime
4
4
  import json
5
5
  from collections import defaultdict
6
- from typing import Self
6
+ from typing import Any, Self
7
7
 
8
8
  from pyarrow import Table as ArrowTable
9
9
 
10
10
  from matchbox.client import _handler
11
+ from matchbox.client.locations import Location
11
12
  from matchbox.client.models import Model
12
13
  from matchbox.client.queries import Query
13
- from matchbox.client.sources import Location, Source
14
+ from matchbox.client.sources import Source
14
15
  from matchbox.common.dtos import (
15
16
  CollectionName,
16
17
  ModelResolutionName,
@@ -123,12 +124,11 @@ class DAG:
123
124
  self,
124
125
  name: ResolutionName,
125
126
  resolution: Resolution,
126
- location: Location,
127
127
  ) -> None:
128
128
  """Convert a resolution to a Source or Model and add to DAG."""
129
129
  if resolution.resolution_type == ResolutionType.SOURCE:
130
130
  self.source(
131
- location=location,
131
+ location=Location.from_config(resolution.config.location_config),
132
132
  name=SourceResolutionName(name),
133
133
  extract_transform=resolution.config.extract_transform,
134
134
  key_field=resolution.config.key_field,
@@ -301,14 +301,16 @@ class DAG:
301
301
 
302
302
  return self
303
303
 
304
- def load_default(self, location: Location) -> Self:
305
- """Attach to default run in this collection, loading all DAG nodes.
304
+ def set_client(self, client: Any) -> Self:
305
+ """Assign a client to all sources at once."""
306
+ for node in self.nodes.values():
307
+ if isinstance(node, Source):
308
+ node.location.set_client(client)
306
309
 
307
- Args:
308
- location: The Location object that will be attached to nodes coming
309
- from default Run. Can be updated per-source after instantiation if
310
- necessary.
311
- """
310
+ return self
311
+
312
+ def load_default(self) -> Self:
313
+ """Attach to default run in this collection, loading all DAG nodes."""
312
314
  collection = _handler.get_collection(self.name)
313
315
 
314
316
  run = _handler.get_run(collection=self.name, run_id=collection.default_run)
@@ -322,7 +324,7 @@ class DAG:
322
324
  )
323
325
 
324
326
  for name, resolution in sorted_resolutions:
325
- self.add_resolution(name=name, resolution=resolution, location=location)
327
+ self.add_resolution(name=name, resolution=resolution)
326
328
 
327
329
  return self
328
330
 
@@ -8,8 +8,9 @@ from sqlalchemy.exc import OperationalError
8
8
 
9
9
  from matchbox.client import _handler
10
10
  from matchbox.client.dags import DAG
11
+ from matchbox.client.locations import Location
11
12
  from matchbox.client.results import Results
12
- from matchbox.client.sources import Location, Source
13
+ from matchbox.client.sources import Source
13
14
  from matchbox.common.dtos import ModelResolutionPath, ResolutionPath, ResolutionType
14
15
  from matchbox.common.eval import (
15
16
  ModelComparison,
@@ -78,8 +79,8 @@ def get_samples(
78
79
  )
79
80
  continue
80
81
 
81
- location = Location.from_config(
82
- resolution.config.location_config, client=client
82
+ location = Location.from_config(resolution.config.location_config).set_client(
83
+ client
83
84
  )
84
85
  source = Source.from_resolution(
85
86
  resolution=resolution,