horde-model-reference 3.0.0__tar.gz → 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.env.example +4 -4
  2. horde_model_reference-4.0.0/.git-blame-ignore-revs +1 -0
  3. horde_model_reference-4.0.0/.github/workflows/codeql.yml +88 -0
  4. horde_model_reference-4.0.0/.github/workflows/docker-publish.yml +261 -0
  5. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.github/workflows/docker-validation.yml +14 -14
  6. horde_model_reference-4.0.0/.github/workflows/docs.yml +66 -0
  7. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.github/workflows/lint.yml +9 -9
  8. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.github/workflows/maintests.yml +8 -10
  9. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.github/workflows/prtests.yml +8 -8
  10. horde_model_reference-4.0.0/.github/workflows/release.yml +82 -0
  11. horde_model_reference-4.0.0/.pre-commit-config.yaml +58 -0
  12. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.readthedocs.yaml +0 -1
  13. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/CONTRIBUTING.md +3 -3
  14. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/DEPLOYMENT.md +71 -12
  15. {horde_model_reference-3.0.0/src/horde_model_reference.egg-info → horde_model_reference-4.0.0}/PKG-INFO +31 -363
  16. horde_model_reference-4.0.0/README.md +72 -0
  17. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docker-compose.redis.yml +20 -2
  18. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docker-compose.sync.example.yml +7 -1
  19. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docker-compose.yml +7 -1
  20. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/.pages +1 -0
  21. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/concepts/.pages +1 -0
  22. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/concepts/analytics_pipeline.md +26 -26
  23. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/concepts/architecture_overview.md +22 -22
  24. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/concepts/canonical_format.md +37 -28
  25. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/concepts/design_decisions.md +7 -7
  26. horde_model_reference-4.0.0/docs/concepts/http_service.md +114 -0
  27. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/concepts/integrations.md +18 -16
  28. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/concepts/request_lifecycle.md +18 -17
  29. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/concepts/sync_system.md +21 -20
  30. horde_model_reference-4.0.0/docs/guides/.pages +7 -0
  31. horde_model_reference-4.0.0/docs/guides/consume_the_http_api.md +115 -0
  32. horde_model_reference-4.0.0/docs/guides/filter_models_for_a_worker.md +92 -0
  33. horde_model_reference-4.0.0/docs/guides/installation.md +54 -0
  34. horde_model_reference-4.0.0/docs/guides/offline_and_resilient_reads.md +76 -0
  35. horde_model_reference-4.0.0/docs/guides/submit_models_via_the_api.md +160 -0
  36. horde_model_reference-4.0.0/docs/guides/write_a_live_provider.md +102 -0
  37. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/base_cache.md +1 -0
  38. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/cache_hydrator.md +1 -0
  39. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/constants.md +1 -0
  40. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/deletion_risk_analysis.md +1 -0
  41. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/deletion_risk_cache.md +1 -0
  42. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/filter_presets.md +1 -0
  43. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/statistics.md +1 -0
  44. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/statistics_cache.md +1 -0
  45. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/text_model_grouping.md +1 -0
  46. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/text_model_parser.md +1 -0
  47. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/audit/events.md +1 -0
  48. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/audit/reader.md +1 -0
  49. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/audit/replay.md +1 -0
  50. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/audit/writer.md +1 -0
  51. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/backends/base.md +1 -0
  52. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/backends/filesystem_backend.md +1 -0
  53. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/backends/github_backend.md +1 -0
  54. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/backends/http_backend.md +1 -0
  55. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/backends/redis_backend.md +1 -0
  56. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/backends/replica_backend_base.md +1 -0
  57. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/diff_service.md +1 -0
  58. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/http_retry.md +1 -0
  59. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/integrations/data_merger.md +1 -0
  60. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/integrations/horde_api_integration.md +1 -0
  61. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/integrations/horde_api_models.md +1 -0
  62. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/legacy/classes/legacy_converters.md +1 -0
  63. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/legacy/classes/legacy_models.md +1 -0
  64. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/legacy/convert_all_legacy_dbs.md +1 -0
  65. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/legacy/text_csv_utils.md +1 -0
  66. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/legacy/validate_sd.md +1 -0
  67. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/meta_consts.md +1 -0
  68. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/model_consts/image.md +1 -0
  69. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/model_consts/shared.md +1 -0
  70. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/model_consts/text.md +1 -0
  71. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/model_kind_validation.md +1 -0
  72. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/model_reference_manager.md +1 -0
  73. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/model_reference_metadata.md +1 -0
  74. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/model_reference_records.md +1 -0
  75. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/path_consts.md +1 -0
  76. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/pending_queue/apply.md +1 -0
  77. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/pending_queue/audit_events.md +1 -0
  78. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/pending_queue/audit_view.md +1 -0
  79. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/pending_queue/diff_utils.md +1 -0
  80. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/pending_queue/models.md +1 -0
  81. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/pending_queue/service.md +1 -0
  82. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/pending_queue/store.md +1 -0
  83. horde_model_reference-4.0.0/docs/horde_model_reference/providers/.pages +1 -0
  84. horde_model_reference-4.0.0/docs/horde_model_reference/providers/base.md +3 -0
  85. horde_model_reference-4.0.0/docs/horde_model_reference/providers/registry.md +3 -0
  86. horde_model_reference-4.0.0/docs/horde_model_reference/providers/static_provider.md +3 -0
  87. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/query.md +1 -0
  88. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/query_fields.md +1 -0
  89. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/registries.md +1 -0
  90. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/app.md +1 -0
  91. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/pending_queue/audit_router.md +1 -0
  92. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/pending_queue/dependencies.md +1 -0
  93. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/pending_queue/router.md +1 -0
  94. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/shared.md +1 -0
  95. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/statistics/routers/deletion_risk.md +1 -0
  96. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/statistics/routers/statistics.md +1 -0
  97. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/routers/create_update.md +1 -0
  98. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/routers/metadata.md +1 -0
  99. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/routers/pending_queue.md +1 -0
  100. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/routers/pending_queue_audit.md +1 -0
  101. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/routers/references.md +1 -0
  102. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/routers/shared.md +1 -0
  103. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/routers/write_validations.md +1 -0
  104. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/models.md +1 -0
  105. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/metadata.md +1 -0
  106. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/pending_queue.md +1 -0
  107. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/pending_queue_audit.md +1 -0
  108. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/references.md +1 -0
  109. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/search.md +1 -0
  110. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/text_utils.md +1 -0
  111. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/user.md +1 -0
  112. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/write_validations.md +1 -0
  113. horde_model_reference-4.0.0/docs/horde_model_reference/source_consts.md +3 -0
  114. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/sync/comparator.md +1 -0
  115. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/sync/config.md +1 -0
  116. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/sync/github_client.md +1 -0
  117. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/sync/legacy_text_validator.md +1 -0
  118. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/sync/text_generation_serializer.md +1 -0
  119. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/sync/watch_mode.md +1 -0
  120. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/text_backend_names.md +1 -0
  121. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/text_model_duplicates.md +1 -0
  122. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/text_model_write_processor.md +1 -0
  123. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/util.md +1 -0
  124. horde_model_reference-4.0.0/docs/index.md +80 -0
  125. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/reference/.pages +4 -1
  126. horde_model_reference-3.0.0/docs/reference/primary_deployments.md → horde_model_reference-4.0.0/docs/reference/api_deployments.md +15 -15
  127. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/reference/audit_trail.md +18 -18
  128. horde_model_reference-4.0.0/docs/reference/glossary.md +117 -0
  129. horde_model_reference-4.0.0/docs/reference/http_api/.pages +7 -0
  130. horde_model_reference-4.0.0/docs/reference/http_api/conventions.md +159 -0
  131. horde_model_reference-4.0.0/docs/reference/http_api/pending_queue_endpoints.md +81 -0
  132. horde_model_reference-4.0.0/docs/reference/http_api/v1_endpoints.md +80 -0
  133. horde_model_reference-4.0.0/docs/reference/http_api/v2_endpoints.md +174 -0
  134. horde_model_reference-4.0.0/docs/reference/http_api/v2_text_utils.md +79 -0
  135. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/reference/legacy_csv_conversion.md +23 -23
  136. horde_model_reference-4.0.0/docs/reference/model_providers.md +98 -0
  137. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/reference/model_reference_backend.md +44 -45
  138. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/reference/model_reference_records.md +7 -7
  139. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/reference/pending_queue.md +52 -49
  140. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/reference/replica_backend_base.md +28 -28
  141. horde_model_reference-4.0.0/docs/stylesheets/extra.css +303 -0
  142. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/tutorials/.pages +2 -0
  143. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/tutorials/configuration_and_troubleshooting.md +18 -19
  144. horde_model_reference-4.0.0/docs/tutorials/getting_started.md +126 -0
  145. horde_model_reference-4.0.0/docs/tutorials/querying_models.md +316 -0
  146. horde_model_reference-4.0.0/docs/tutorials/registering_providers.md +190 -0
  147. horde_model_reference-4.0.0/docs/tutorials/using_the_http_api.md +129 -0
  148. horde_model_reference-4.0.0/docs/tutorials/working_with_records.md +188 -0
  149. horde_model_reference-4.0.0/examples/01_quickstart.py +40 -0
  150. horde_model_reference-4.0.0/examples/02_query_recipes.py +48 -0
  151. horde_model_reference-4.0.0/examples/03_working_with_records.py +44 -0
  152. horde_model_reference-4.0.0/examples/04_register_provider.py +51 -0
  153. horde_model_reference-4.0.0/examples/README.md +28 -0
  154. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/mkdocs.yml +27 -26
  155. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/pyproject.toml +7 -4
  156. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/schemas/stable_diffusion.schema.json +10 -2
  157. horde_model_reference-4.0.0/scripts/__init__.py +1 -0
  158. horde_model_reference-4.0.0/scripts/legacy_text/__init__.py +1 -0
  159. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/legacy_text/generation_params.json +2 -6
  160. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/legacy_text/reverse_convert.py +3 -2
  161. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/sync/README.md +126 -119
  162. horde_model_reference-4.0.0/scripts/sync/__init__.py +1 -0
  163. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/sync/github_app_auth_example.md +87 -86
  164. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/sync/sync_github_references.py +1 -1
  165. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/__init__.py +76 -13
  166. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/_version.py +2 -2
  167. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/base_cache.py +4 -4
  168. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/cache_hydrator.py +8 -4
  169. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/deletion_risk_analysis.py +2 -2
  170. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/deletion_risk_cache.py +3 -1
  171. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/statistics_cache.py +3 -1
  172. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/text_model_grouping.py +20 -2
  173. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/text_model_parser.py +151 -16
  174. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/backends/filesystem_backend.py +2 -2
  175. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/backends/github_backend.py +13 -1
  176. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/backends/http_backend.py +2 -1
  177. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/backends/redis_backend.py +14 -9
  178. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/data/generation_params.json +2 -6
  179. horde_model_reference-4.0.0/src/horde_model_reference/group_aliases.py +207 -0
  180. horde_model_reference-4.0.0/src/horde_model_reference/group_families.py +312 -0
  181. horde_model_reference-4.0.0/src/horde_model_reference/group_schema_store.py +94 -0
  182. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/integrations/horde_api_integration.py +9 -0
  183. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/integrations/horde_api_models.py +2 -2
  184. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/legacy/README.md +2 -0
  185. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/legacy/classes/legacy_converters.py +5 -5
  186. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/legacy/classes/legacy_models.py +44 -29
  187. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/legacy/text_csv_utils.py +4 -4
  188. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/model_reference_manager.py +612 -255
  189. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/model_reference_records.py +93 -12
  190. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/path_consts.py +28 -3
  191. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/pending_queue/models.py +2 -2
  192. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/pending_queue/service.py +1 -1
  193. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/pending_queue/store.py +1 -1
  194. horde_model_reference-4.0.0/src/horde_model_reference/providers/__init__.py +33 -0
  195. horde_model_reference-4.0.0/src/horde_model_reference/providers/base.py +134 -0
  196. horde_model_reference-4.0.0/src/horde_model_reference/providers/registry.py +104 -0
  197. horde_model_reference-4.0.0/src/horde_model_reference/providers/static_provider.py +155 -0
  198. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/query.py +253 -40
  199. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/query_fields.py +21 -4
  200. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/registries.py +17 -0
  201. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/app.py +114 -6
  202. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/pending_queue/audit_router.py +3 -2
  203. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/pending_queue/router.py +60 -7
  204. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/shared.py +88 -16
  205. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/statistics/routers/deletion_risk.py +1 -1
  206. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/statistics/routers/statistics.py +1 -1
  207. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/routers/create_update.py +2 -2
  208. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/routers/shared.py +2 -2
  209. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/models.py +6 -0
  210. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/routers/references.py +180 -419
  211. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/routers/search.py +31 -23
  212. horde_model_reference-4.0.0/src/horde_model_reference/service/v2/routers/text_utils.py +1573 -0
  213. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/routers/write_validations.py +10 -1
  214. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/showcase/README.md +19 -12
  215. horde_model_reference-4.0.0/src/horde_model_reference/source_consts.py +89 -0
  216. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/sync/legacy_text_validator.py +3 -3
  217. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/sync/text_generation_serializer.py +5 -5
  218. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/sync/watch_mode.py +1 -0
  219. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/text_model_duplicates.py +1 -1
  220. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/text_model_write_processor.py +14 -10
  221. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0/src/horde_model_reference.egg-info}/PKG-INFO +31 -363
  222. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference.egg-info/SOURCES.txt +45 -3
  223. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/README.md +1 -2
  224. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/conftest.py +2 -2
  225. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/pending_queue/test_service.py +1 -1
  226. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/pending_queue/test_store.py +4 -3
  227. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_api_design_phase4.py +8 -8
  228. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_pending_queue_audit_endpoints.py +35 -0
  229. horde_model_reference-4.0.0/tests/service/test_text_utils.py +788 -0
  230. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_v1_api.py +58 -3
  231. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_v2_api.py +128 -10
  232. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_v2_search.py +2 -2
  233. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/statistics_and_audit/test_cache_hydrator.py +22 -18
  234. horde_model_reference-4.0.0/tests/statistics_and_audit/test_extras_and_aliases.py +838 -0
  235. horde_model_reference-4.0.0/tests/statistics_and_audit/test_group_families.py +363 -0
  236. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/statistics_and_audit/test_statistics.py +3 -3
  237. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/statistics_and_audit/test_text_model_parser.py +7 -3
  238. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/sync/test_github_client.py +17 -8
  239. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/sync/test_text_generation_serializer.py +10 -10
  240. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_broken_tutu_grouping.py +1 -1
  241. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_canonical_format.py +2 -2
  242. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_csv_rows_to_legacy_dict.py +10 -10
  243. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_examples.py +3 -3
  244. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_metadata.py +86 -1
  245. horde_model_reference-4.0.0/tests/test_model_providers.py +561 -0
  246. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_model_reference_manager.py +53 -19
  247. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_query.py +25 -0
  248. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_records.py +2 -0
  249. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_registries.py +19 -0
  250. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_text_model_duplicates.py +6 -4
  251. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_text_model_write_processor.py +2 -2
  252. horde_model_reference-4.0.0/uv.lock +2741 -0
  253. horde_model_reference-3.0.0/.github/workflows/codeql.yml +0 -89
  254. horde_model_reference-3.0.0/.github/workflows/release.yml +0 -83
  255. horde_model_reference-3.0.0/.pre-commit-config.yaml +0 -62
  256. horde_model_reference-3.0.0/README.md +0 -404
  257. horde_model_reference-3.0.0/docs/guides/.pages +0 -1
  258. horde_model_reference-3.0.0/docs/horde_model_reference/_version.md +0 -2
  259. horde_model_reference-3.0.0/docs/index.md +0 -40
  260. horde_model_reference-3.0.0/docs/stylesheets/extra.css +0 -309
  261. horde_model_reference-3.0.0/docs/tutorials/getting_started.md +0 -118
  262. horde_model_reference-3.0.0/docs/tutorials/querying_models.md +0 -298
  263. horde_model_reference-3.0.0/docs/tutorials/working_with_records.md +0 -186
  264. horde_model_reference-3.0.0/src/horde_model_reference/service/v2/routers/text_utils.py +0 -540
  265. horde_model_reference-3.0.0/test_endpoint.py +0 -54
  266. horde_model_reference-3.0.0/tests/service/test_text_utils.py +0 -259
  267. horde_model_reference-3.0.0/uv.lock +0 -2797
  268. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.dockerignore +0 -0
  269. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.env.primary.example +0 -0
  270. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.env.sync.example +0 -0
  271. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.gitignore +0 -0
  272. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.gitmodules +0 -0
  273. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/.hadolint.yaml +0 -0
  274. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/Dockerfile +0 -0
  275. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/LICENSE +0 -0
  276. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/MANIFEST.in +0 -0
  277. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/build_docs.py +0 -0
  278. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/.pages +0 -0
  279. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/analytics/.pages +0 -0
  280. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/audit/.pages +0 -0
  281. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/backends/.pages +0 -0
  282. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/cli/.pages +0 -0
  283. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/data/.pages +0 -0
  284. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/integrations/.pages +0 -0
  285. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/legacy/.pages +0 -0
  286. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/legacy/classes/.pages +0 -0
  287. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/legacy/validation/.pages +0 -0
  288. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/model_consts/.pages +0 -0
  289. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/pending_queue/.pages +0 -0
  290. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/.pages +0 -0
  291. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/pending_queue/.pages +0 -0
  292. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/statistics/.pages +0 -0
  293. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/statistics/routers/.pages +0 -0
  294. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/.pages +0 -0
  295. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v1/routers/.pages +0 -0
  296. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/.pages +0 -0
  297. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/service/v2/routers/.pages +0 -0
  298. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/showcase/.pages +0 -0
  299. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/docs/horde_model_reference/sync/.pages +0 -0
  300. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/schemas/stable_diffusion.example.json +0 -0
  301. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/README.md +0 -0
  302. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/get_all_names.py +0 -0
  303. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/legacy_text/convert.py +0 -0
  304. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/legacy_text/defaults.json +0 -0
  305. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/scripts/verify_query_fields.py +0 -0
  306. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/setup.cfg +0 -0
  307. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/__init__.py +0 -0
  308. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/constants.py +0 -0
  309. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/filter_presets.py +0 -0
  310. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/analytics/statistics.py +0 -0
  311. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/audit/__init__.py +0 -0
  312. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/audit/events.py +0 -0
  313. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/audit/reader.py +0 -0
  314. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/audit/replay.py +0 -0
  315. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/audit/writer.py +0 -0
  316. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/backends/__init__.py +0 -0
  317. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/backends/base.py +0 -0
  318. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/backends/replica_backend_base.py +0 -0
  319. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/data/defaults.json +0 -0
  320. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/diff_service.py +0 -0
  321. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/http_retry.py +0 -0
  322. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/integrations/__init__.py +0 -0
  323. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/integrations/data_merger.py +0 -0
  324. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/legacy/__init__.py +0 -0
  325. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/legacy/classes/__init__.py +0 -0
  326. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/legacy/convert_all_legacy_dbs.py +0 -0
  327. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/legacy/validate_sd.py +0 -0
  328. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/meta_consts.py +0 -0
  329. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/model_consts/__init__.py +0 -0
  330. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/model_consts/image.py +0 -0
  331. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/model_consts/shared.py +0 -0
  332. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/model_consts/text.py +0 -0
  333. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/model_kind_validation.py +0 -0
  334. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/model_reference_metadata.py +0 -0
  335. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/pending_queue/__init__.py +0 -0
  336. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/pending_queue/apply.py +0 -0
  337. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/pending_queue/audit_events.py +0 -0
  338. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/pending_queue/audit_view.py +0 -0
  339. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/pending_queue/diff_utils.py +0 -0
  340. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/py.typed +0 -0
  341. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/__init__.py +0 -0
  342. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/pending_queue/__init__.py +0 -0
  343. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/pending_queue/dependencies.py +0 -0
  344. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/statistics/__init__.py +0 -0
  345. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/statistics/routers/__init__.py +0 -0
  346. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/__init__.py +0 -0
  347. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/routers/__init__.py +0 -0
  348. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/routers/metadata.py +0 -0
  349. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/routers/pending_queue.py +0 -0
  350. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/routers/pending_queue_audit.py +0 -0
  351. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/routers/references.py +0 -0
  352. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v1/routers/write_validations.py +0 -0
  353. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/__init__.py +0 -0
  354. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/routers/__init__.py +0 -0
  355. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/routers/metadata.py +0 -0
  356. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/routers/pending_queue.py +0 -0
  357. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/routers/pending_queue_audit.py +0 -0
  358. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/service/v2/routers/user.py +0 -0
  359. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/sync/__init__.py +0 -0
  360. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/sync/comparator.py +0 -0
  361. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/sync/config.py +0 -0
  362. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/sync/github_client.py +0 -0
  363. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/text_backend_names.py +0 -0
  364. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference/util.py +0 -0
  365. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference.egg-info/dependency_links.txt +0 -0
  366. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference.egg-info/entry_points.txt +0 -0
  367. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference.egg-info/requires.txt +0 -0
  368. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/src/horde_model_reference.egg-info/top_level.txt +0 -0
  369. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/__init__.py +0 -0
  370. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/backends/__init__.py +0 -0
  371. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/backends/test_backends_init.py +0 -0
  372. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/backends/test_http_backend.py +0 -0
  373. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/backends/test_primary_mode.py +0 -0
  374. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/backends/test_redis_backend.py +0 -0
  375. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/check_model_ref_type_blocks.py +0 -0
  376. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/create_env_file_example.py +0 -0
  377. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/create_example_json.py +0 -0
  378. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/helpers.py +0 -0
  379. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/horde_api/__init__.py +0 -0
  380. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/horde_api/conftest.py +0 -0
  381. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/horde_api/test_data_merger.py +0 -0
  382. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/horde_api/test_deletion_risk_analysis_live.py +0 -0
  383. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/horde_api/test_deletion_risk_worker_count.py +0 -0
  384. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/horde_api/test_horde_api_integration.py +0 -0
  385. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/horde_api/test_horde_api_integration_live.py +0 -0
  386. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/horde_api/test_indexed_horde_types.py +0 -0
  387. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/integrations/test_stats_aggregation.py +0 -0
  388. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/pending_queue/test_apply.py +0 -0
  389. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/pending_queue/test_audit_view.py +0 -0
  390. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/pending_queue/test_diff_service.py +0 -0
  391. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/__init__.py +0 -0
  392. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_replica_backend_base.py +0 -0
  393. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_shared_allowlists.py +0 -0
  394. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_shared_auth.py +0 -0
  395. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/service/test_user_roles_endpoint.py +0 -0
  396. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/statistics_and_audit/__init__.py +0 -0
  397. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/statistics_and_audit/test_deletion_risk_analysis.py +0 -0
  398. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/statistics_and_audit/test_statistics_cache.py +0 -0
  399. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/statistics_and_audit/test_text_model_grouping.py +0 -0
  400. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/sync/__init__.py +0 -0
  401. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/sync/test_comparator.py +0 -0
  402. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/sync/test_comparator_integration.py +0 -0
  403. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/sync/test_config.py +0 -0
  404. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/sync/test_legacy_text_validator.py +0 -0
  405. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_audit_replay.py +0 -0
  406. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_audit_trail.py +0 -0
  407. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_combined_model_statistics.py +0 -0
  408. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_consts.py +0 -0
  409. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_convert_legacy_database.py +0 -0
  410. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_converters.py +0 -0
  411. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_env_example.py +0 -0
  412. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_model_kind_validation.py +0 -0
  413. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_scripts.py +0 -0
  414. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_text_generation_csv_conversion.py +0 -0
  415. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_text_generation_file_paths.py +0 -0
  416. {horde_model_reference-3.0.0 → horde_model_reference-4.0.0}/tests/test_text_model_group.py +0 -0
@@ -106,8 +106,8 @@
106
106
  # Enable pub/sub for cache invalidation across multiple PRIMARY workers.
107
107
  # HORDE_MODEL_REFERENCE_REDIS__USE_PUBSUB=True
108
108
 
109
- # URL of PRIMARY server API for REPLICA clients to fetch model references from. If None, REPLICA clients will only use GitHub. Example: https://stablehorde.net/api/model_references/
110
- # HORDE_MODEL_REFERENCE_PRIMARY_API_URL=https://stablehorde.net/api/model_references/
109
+ # Base URL of the PRIMARY server API for REPLICA clients to fetch model references from. This must include the service's /api root path; the backend appends /model_references/v2/{category}. If None, REPLICA clients will only use GitHub. Example: https://models.aihorde.net/api
110
+ # HORDE_MODEL_REFERENCE_PRIMARY_API_URL=https://models.aihorde.net/api
111
111
 
112
112
  # Timeout in seconds for HTTP requests to PRIMARY API.
113
113
  # HORDE_MODEL_REFERENCE_PRIMARY_API_TIMEOUT=10
@@ -364,8 +364,8 @@
364
364
  # Enable pub/sub for cache invalidation across multiple PRIMARY workers.
365
365
  # HORDE_MODEL_REFERENCE_REDIS__USE_PUBSUB=True
366
366
 
367
- # URL of PRIMARY server API for REPLICA clients to fetch model references from. If None, REPLICA clients will only use GitHub. Example: https://stablehorde.net/api/model_references/
368
- # HORDE_MODEL_REFERENCE_PRIMARY_API_URL=https://stablehorde.net/api/model_references/
367
+ # Base URL of the PRIMARY server API for REPLICA clients to fetch model references from. This must include the service's /api root path; the backend appends /model_references/v2/{category}. If None, REPLICA clients will only use GitHub. Example: https://models.aihorde.net/api
368
+ # HORDE_MODEL_REFERENCE_PRIMARY_API_URL=https://models.aihorde.net/api
369
369
 
370
370
  # Timeout in seconds for HTTP requests to PRIMARY API.
371
371
  # HORDE_MODEL_REFERENCE_PRIMARY_API_TIMEOUT=10
@@ -0,0 +1 @@
1
+ fb9a0b752e2c696acf24bfd657265820213986df
@@ -0,0 +1,88 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: ["main"]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: ["main"]
20
+ paths-ignore:
21
+ - "**/*.md"
22
+ - "**/*.txt"
23
+ - "**/*.json"
24
+ - "**/*.toml"
25
+ - "**/*.yaml"
26
+ - "**/*.yml"
27
+ schedule:
28
+ - cron: "30 13 * * 3"
29
+
30
+ jobs:
31
+ analyze:
32
+ name: Analyze
33
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
34
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
35
+ # - https://gh.io/supported-runners-and-hardware-resources
36
+ # - https://gh.io/using-larger-runners
37
+ # Consider using larger runners for possible analysis time improvements.
38
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
39
+ timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
40
+ permissions:
41
+ actions: read
42
+ contents: read
43
+ security-events: write
44
+
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ language: ["python"]
49
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
50
+ # Use only 'java' to analyze code written in Java, Kotlin or both
51
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
52
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
53
+
54
+ steps:
55
+ - name: Checkout repository
56
+ uses: actions/checkout@v6
57
+
58
+ # Initializes the CodeQL tools for scanning.
59
+ - name: Initialize CodeQL
60
+ uses: github/codeql-action/init@v3
61
+ with:
62
+ languages: ${{ matrix.language }}
63
+ # If you wish to specify custom queries, you can do so here or in a config file.
64
+ # By default, queries listed here will override any specified in a config file.
65
+ # Prefix the list here with "+" to use these queries and those in the config file.
66
+
67
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
68
+ # queries: security-extended,security-and-quality
69
+
70
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
71
+ # If this step fails, then you should remove it and run the build manually (see below)
72
+ - name: Autobuild
73
+ uses: github/codeql-action/autobuild@v3
74
+
75
+ # ℹ️ Command-line programs to run using the OS shell.
76
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
77
+
78
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
79
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
80
+
81
+ # - run: |
82
+ # echo "Run, Build Application using script"
83
+ # ./location_of_script_within_repo/buildscript.sh
84
+
85
+ - name: Perform CodeQL Analysis
86
+ uses: github/codeql-action/analyze@v3
87
+ with:
88
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,261 @@
1
+ # SPDX-FileCopyrightText: 2026 Tazlin
2
+ #
3
+ # SPDX-License-Identifier: AGPL-3.0-or-later
4
+
5
+ name: Docker image publish
6
+
7
+ on:
8
+ push:
9
+ branches: [main]
10
+ tags: ['v*']
11
+ pull_request:
12
+ branches: [main]
13
+ paths:
14
+ - 'Dockerfile'
15
+ - '.dockerignore'
16
+ - 'src/**'
17
+ - 'pyproject.toml'
18
+ - 'uv.lock'
19
+ - '.github/workflows/docker-publish.yml'
20
+ workflow_dispatch:
21
+
22
+ env:
23
+ REGISTRY: ghcr.io
24
+ IMAGE_NAME: ${{ github.repository }}
25
+
26
+ concurrency:
27
+ group: docker-${{ github.ref }}
28
+ cancel-in-progress: true
29
+
30
+ jobs:
31
+ # -----------------------------------------------------------
32
+ # Build the Docker image and push to GHCR on main / tags.
33
+ # PRs only build (no push) so the image can be validated.
34
+ #
35
+ # IMPORTANT: The image MUST be built with --build-arg EXTRA_DEPS=redis
36
+ # to include the redis[hiredis] extra. Without it, multi-worker PRIMARY
37
+ # deployments fail with ImportError on startup.
38
+ # -----------------------------------------------------------
39
+ build-and-push:
40
+ runs-on: ubuntu-latest
41
+ permissions:
42
+ contents: read
43
+ packages: write
44
+ attestations: write
45
+ id-token: write
46
+ outputs:
47
+ image-digest: ${{ steps.build.outputs.digest }}
48
+ image-tags: ${{ steps.meta.outputs.tags }}
49
+ image-version: ${{ steps.meta.outputs.version }}
50
+ steps:
51
+ - name: Checkout
52
+ uses: actions/checkout@v4
53
+
54
+ - name: Set up Docker Buildx
55
+ uses: docker/setup-buildx-action@v3
56
+
57
+ - name: Log in to GHCR
58
+ if: github.event_name != 'pull_request'
59
+ uses: docker/login-action@v3
60
+ with:
61
+ registry: ${{ env.REGISTRY }}
62
+ username: ${{ github.actor }}
63
+ password: ${{ secrets.GITHUB_TOKEN }}
64
+
65
+ - name: Extract metadata (tags, labels)
66
+ id: meta
67
+ uses: docker/metadata-action@v5
68
+ with:
69
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
70
+ tags: |
71
+ type=ref,event=branch
72
+ type=ref,event=pr
73
+ type=semver,pattern={{version}}
74
+ type=semver,pattern={{major}}.{{minor}}
75
+ type=sha
76
+
77
+ - name: Build and push
78
+ id: build
79
+ uses: docker/build-push-action@v6
80
+ with:
81
+ context: .
82
+ push: ${{ github.event_name != 'pull_request' }}
83
+ load: ${{ github.event_name == 'pull_request' }}
84
+ tags: ${{ steps.meta.outputs.tags }}
85
+ labels: ${{ steps.meta.outputs.labels }}
86
+ build-args: EXTRA_DEPS=redis
87
+ cache-from: type=gha
88
+ cache-to: type=gha,mode=max
89
+
90
+ - name: Generate artifact attestation
91
+ if: github.event_name != 'pull_request'
92
+ uses: actions/attest-build-provenance@v2
93
+ with:
94
+ subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
95
+ subject-digest: ${{ steps.build.outputs.digest }}
96
+ push-to-registry: true
97
+
98
+ # -----------------------------------------------------------
99
+ # Validate the image starts and responds to the health check.
100
+ #
101
+ # Runs in PRIMARY mode with GitHub seeding enabled so the
102
+ # service downloads real model data and exercises the full
103
+ # startup path (no Postgres dependency, service uses file
104
+ # system as its primary storage backend).
105
+ #
106
+ # Tested variants in this job:
107
+ # 1. Single-worker PRIMARY (default CMD / fastapi run)
108
+ # 2. Multi-worker PRIMARY + Redis (uvicorn --workers 2)
109
+ #
110
+ # Both must pass /api/heartbeat before the job succeeds.
111
+ # -----------------------------------------------------------
112
+ validate:
113
+ runs-on: ubuntu-latest
114
+ needs: build-and-push
115
+ permissions:
116
+ contents: read
117
+ packages: read
118
+ services:
119
+ redis:
120
+ image: redis:7-alpine
121
+ ports:
122
+ - 6379:6379
123
+ options: >-
124
+ --health-cmd "redis-cli ping"
125
+ --health-interval 10s
126
+ --health-timeout 5s
127
+ --health-retries 5
128
+
129
+ steps:
130
+ # -- For pushes: pull the published image by digest ------
131
+ - name: Log in to GHCR
132
+ if: github.event_name != 'pull_request'
133
+ uses: docker/login-action@v3
134
+ with:
135
+ registry: ${{ env.REGISTRY }}
136
+ username: ${{ github.actor }}
137
+ password: ${{ secrets.GITHUB_TOKEN }}
138
+
139
+ - name: Pull published image
140
+ if: github.event_name != 'pull_request'
141
+ env:
142
+ IMAGE_NAME_LC: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
143
+ run: |
144
+ IMAGE="$(echo "$IMAGE_NAME_LC" | tr '[:upper:]' '[:lower:]')@${{ needs.build-and-push.outputs.image-digest }}"
145
+ docker pull "$IMAGE"
146
+ docker tag "$IMAGE" horde-model-reference:validate
147
+ echo "Pulled $IMAGE"
148
+
149
+ # -- For PRs: rebuild from GHA cache ---------------------
150
+ - name: Checkout
151
+ if: github.event_name == 'pull_request'
152
+ uses: actions/checkout@v4
153
+
154
+ - name: Set up Docker Buildx
155
+ if: github.event_name == 'pull_request'
156
+ uses: docker/setup-buildx-action@v3
157
+
158
+ - name: Rebuild from cache for validation
159
+ if: github.event_name == 'pull_request'
160
+ uses: docker/build-push-action@v6
161
+ with:
162
+ context: .
163
+ load: true
164
+ tags: horde-model-reference:validate
165
+ build-args: EXTRA_DEPS=redis
166
+ cache-from: type=gha
167
+
168
+ # -- Variant 1: Single-worker PRIMARY --------------------
169
+ - name: Start single-worker PRIMARY container
170
+ run: |
171
+ docker run -d --name hmr-validate-single \
172
+ --network host \
173
+ -e HORDE_MODEL_REFERENCE_REPLICATE_MODE=PRIMARY \
174
+ -e HORDE_MODEL_REFERENCE_MAKE_FOLDERS=true \
175
+ -e HORDE_MODEL_REFERENCE_GITHUB_SEED_ENABLED=true \
176
+ -e HORDE_MODEL_REFERENCE_CANONICAL_FORMAT=v2 \
177
+ -e OTEL_SDK_DISABLED=true \
178
+ horde-model-reference:validate
179
+
180
+ - name: Wait for single-worker PRIMARY heartbeat
181
+ run: |
182
+ timeout=90
183
+ while ! curl -sf http://localhost:19800/api/heartbeat > /dev/null 2>&1; do
184
+ timeout=$((timeout - 2))
185
+ if [ "$timeout" -le 0 ]; then
186
+ echo "::error::Single-worker PRIMARY failed heartbeat within timeout"
187
+ docker logs hmr-validate-single
188
+ exit 1
189
+ fi
190
+ sleep 2
191
+ done
192
+ echo "Single-worker PRIMARY: heartbeat OK"
193
+
194
+ - name: Assert single-worker PRIMARY mode response
195
+ run: |
196
+ response=$(curl -sf http://localhost:19800/api/replicate_mode)
197
+ echo "replicate_mode response: $response"
198
+ echo "$response" | python3 -c "
199
+ import json, sys
200
+ d = json.load(sys.stdin)
201
+ assert d.get('replicate_mode') == 'PRIMARY', f'Expected PRIMARY, got: {d}'
202
+ assert d.get('writable') is True, f'Expected writable=true, got: {d}'
203
+ print('PASS: replicate_mode=PRIMARY, writable=true')
204
+ "
205
+
206
+ - name: Stop single-worker container
207
+ run: docker stop hmr-validate-single && docker rm hmr-validate-single
208
+
209
+ # -- Variant 2: Multi-worker PRIMARY + Redis -------------
210
+ - name: Start multi-worker PRIMARY container (2 workers + Redis)
211
+ run: |
212
+ docker run -d --name hmr-validate-multi \
213
+ --network host \
214
+ -e HORDE_MODEL_REFERENCE_REPLICATE_MODE=PRIMARY \
215
+ -e HORDE_MODEL_REFERENCE_MAKE_FOLDERS=true \
216
+ -e HORDE_MODEL_REFERENCE_GITHUB_SEED_ENABLED=true \
217
+ -e HORDE_MODEL_REFERENCE_CANONICAL_FORMAT=v2 \
218
+ -e HORDE_MODEL_REFERENCE_REDIS__USE_REDIS=true \
219
+ -e HORDE_MODEL_REFERENCE_REDIS__URL=redis://localhost:6379/0 \
220
+ -e HORDE_MODEL_REFERENCE_REDIS__USE_PUBSUB=true \
221
+ -e OTEL_SDK_DISABLED=true \
222
+ horde-model-reference:validate \
223
+ /app/.venv/bin/python -m uvicorn \
224
+ horde_model_reference.service.app:app \
225
+ --host 0.0.0.0 --port 19800 --workers 2
226
+
227
+ - name: Wait for multi-worker PRIMARY heartbeat
228
+ run: |
229
+ timeout=90
230
+ while ! curl -sf http://localhost:19800/api/heartbeat > /dev/null 2>&1; do
231
+ timeout=$((timeout - 2))
232
+ if [ "$timeout" -le 0 ]; then
233
+ echo "::error::Multi-worker PRIMARY failed heartbeat within timeout"
234
+ docker logs hmr-validate-multi
235
+ exit 1
236
+ fi
237
+ sleep 2
238
+ done
239
+ echo "Multi-worker PRIMARY: heartbeat OK"
240
+
241
+ - name: Assert multi-worker PRIMARY mode response
242
+ run: |
243
+ response=$(curl -sf http://localhost:19800/api/replicate_mode)
244
+ echo "replicate_mode response: $response"
245
+ echo "$response" | python3 -c "
246
+ import json, sys
247
+ d = json.load(sys.stdin)
248
+ assert d.get('replicate_mode') == 'PRIMARY', f'Expected PRIMARY, got: {d}'
249
+ assert d.get('writable') is True, f'Expected writable=true, got: {d}'
250
+ print('PASS: replicate_mode=PRIMARY, writable=true (multi-worker + Redis)')
251
+ "
252
+
253
+ - name: Stop multi-worker container
254
+ run: docker stop hmr-validate-multi && docker rm hmr-validate-multi
255
+
256
+ # -- Always dump logs on failure -------------------------
257
+ - name: Dump container logs on failure
258
+ if: failure()
259
+ run: |
260
+ docker logs hmr-validate-single 2>&1 || true
261
+ docker logs hmr-validate-multi 2>&1 || true
@@ -9,10 +9,10 @@ on:
9
9
  branches:
10
10
  - main
11
11
  paths:
12
- - 'Dockerfile'
13
- - 'docker-compose*.yml'
14
- - '.dockerignore'
15
- - '.github/workflows/docker-validation.yml'
12
+ - "Dockerfile"
13
+ - "docker-compose*.yml"
14
+ - ".dockerignore"
15
+ - ".github/workflows/docker-validation.yml"
16
16
 
17
17
  permissions:
18
18
  security-events: write
@@ -253,11 +253,11 @@ jobs:
253
253
  - name: Run Trivy vulnerability scanner on Dockerfile
254
254
  uses: aquasecurity/trivy-action@0.35.0
255
255
  with:
256
- scan-type: 'config'
257
- scan-ref: 'Dockerfile'
258
- format: 'sarif'
259
- output: 'trivy-dockerfile-results.sarif'
260
- severity: 'CRITICAL,HIGH'
256
+ scan-type: "config"
257
+ scan-ref: "Dockerfile"
258
+ format: "sarif"
259
+ output: "trivy-dockerfile-results.sarif"
260
+ severity: "CRITICAL,HIGH"
261
261
 
262
262
  - name: Upload Trivy SARIF results
263
263
  if: always()
@@ -289,11 +289,11 @@ jobs:
289
289
  - name: Run Trivy vulnerability scanner on image
290
290
  uses: aquasecurity/trivy-action@0.35.0
291
291
  with:
292
- scan-type: 'image'
293
- image-ref: 'horde-model-reference:scan'
294
- format: 'sarif'
295
- output: 'trivy-image-results.sarif'
296
- severity: 'CRITICAL,HIGH'
292
+ scan-type: "image"
293
+ image-ref: "horde-model-reference:scan"
294
+ format: "sarif"
295
+ output: "trivy-image-results.sarif"
296
+ severity: "CRITICAL,HIGH"
297
297
 
298
298
  - name: Upload Trivy image SARIF results
299
299
  if: always()
@@ -0,0 +1,66 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - service
8
+ pull_request:
9
+ branches:
10
+ - main
11
+ paths:
12
+ - "**.md"
13
+ - "docs/**"
14
+ - "mkdocs.yml"
15
+ - "src/**"
16
+ - "pyproject.toml"
17
+ - "uv.lock"
18
+ - ".github/workflows/docs.yml"
19
+
20
+ jobs:
21
+ build:
22
+ name: MkDocs strict build
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v6
26
+
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@v8.0.0
29
+ with:
30
+ python-version: "3.12"
31
+ enable-cache: true
32
+
33
+ - name: Install dependencies
34
+ run: uv sync --locked --all-extras --group docs
35
+
36
+ # --strict fails the build on broken internal links and missing nav
37
+ # targets within the MkDocs site.
38
+ - name: Build docs (strict)
39
+ run: uv run mkdocs build --strict
40
+
41
+ link-check:
42
+ name: Markdown link check
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - uses: actions/checkout@v6
46
+
47
+ # We need to initialize the submodules to get the markdown files for link checking.
48
+ - name: Initialize submodules
49
+ run: git submodule update --init --recursive
50
+
51
+ # README and other root markdown live outside the MkDocs site, so the
52
+ # strict build above does not cover them. lychee in --offline mode
53
+ # validates relative/local links (catching README -> file drift) without
54
+ # hitting the network, so external-URL flakiness can't fail CI.
55
+ - name: Check relative links
56
+ uses: lycheeverse/lychee-action@v2
57
+ with:
58
+ args: >-
59
+ --offline
60
+ --no-progress
61
+ "README.md"
62
+ "CONTRIBUTING.md"
63
+ "DEPLOYMENT.md"
64
+ "./docs/**/*.md"
65
+ "./examples/**/*.md"
66
+ fail: true
@@ -9,11 +9,11 @@ on:
9
9
  branches:
10
10
  - main
11
11
  paths:
12
- - '**.py'
13
- - 'pyproject.toml'
14
- - 'uv.lock'
15
- - '.github/workflows/lint.yml'
16
- - '.pre-commit-config.yaml'
12
+ - "**.py"
13
+ - "pyproject.toml"
14
+ - "uv.lock"
15
+ - ".github/workflows/lint.yml"
16
+ - ".pre-commit-config.yaml"
17
17
 
18
18
  jobs:
19
19
  pre-commit:
@@ -32,7 +32,7 @@ jobs:
32
32
  run: uv sync --locked --all-extras --dev
33
33
 
34
34
  - name: Run pre-commit
35
- run: SKIP=mypy uv run pre-commit run --all-files --show-diff-on-failure
35
+ run: SKIP=pyrefly-check uv run pre-commit run --all-files --show-diff-on-failure
36
36
 
37
37
  lint:
38
38
  name: Lint (Ruff lint)
@@ -71,7 +71,7 @@ jobs:
71
71
  run: uv run ruff format .
72
72
 
73
73
  type-check:
74
- name: Type Check (mypy)
74
+ name: Type Check (pyrefly)
75
75
  runs-on: ubuntu-latest
76
76
  strategy:
77
77
  matrix:
@@ -90,5 +90,5 @@ jobs:
90
90
  - name: Install dependencies
91
91
  run: uv sync --locked --all-extras --dev
92
92
 
93
- - name: Run mypy
94
- run: uv run mypy src/
93
+ - name: Run pyrefly
94
+ run: uv run pyrefly check src/ tests/
@@ -5,14 +5,14 @@ on:
5
5
  branches:
6
6
  - main
7
7
  paths:
8
- - '**.py'
9
- - '**.md'
10
- - '**.json'
11
- - '.github/workflows/maintests.yml'
12
- - '.github/workflows/prtests.yml'
13
- - '.github/workflows/release.yml'
14
- - 'uv.lock'
15
- - 'pyproject.toml'
8
+ - "**.py"
9
+ - "**.md"
10
+ - "**.json"
11
+ - ".github/workflows/maintests.yml"
12
+ - ".github/workflows/prtests.yml"
13
+ - ".github/workflows/release.yml"
14
+ - "uv.lock"
15
+ - "pyproject.toml"
16
16
  jobs:
17
17
  no_extra_fields:
18
18
  env:
@@ -68,7 +68,6 @@ jobs:
68
68
  - name: Check that query fields have not drifted
69
69
  run: uv run python scripts/verify_query_fields.py
70
70
 
71
-
72
71
  build:
73
72
  env:
74
73
  AIWORKER_CACHE_HOME: ${{ github.workspace }}/.cache
@@ -92,6 +91,5 @@ jobs:
92
91
  - name: Install the project
93
92
  run: uv sync --locked --all-extras --dev
94
93
 
95
-
96
94
  - name: Run tests
97
95
  run: uv run pytest tests -m "not integration"
@@ -8,14 +8,14 @@ on:
8
8
  - opened
9
9
  - synchronize
10
10
  paths:
11
- - '**.py'
12
- - '**.md'
13
- - '**.json'
14
- - '.github/workflows/maintests.yml'
15
- - '.github/workflows/prtests.yml'
16
- - '.github/workflows/release.yml'
17
- - 'uv.lock'
18
- - 'pyproject.toml'
11
+ - "**.py"
12
+ - "**.md"
13
+ - "**.json"
14
+ - ".github/workflows/maintests.yml"
15
+ - ".github/workflows/prtests.yml"
16
+ - ".github/workflows/release.yml"
17
+ - "uv.lock"
18
+ - "pyproject.toml"
19
19
  jobs:
20
20
  no_extra_fields:
21
21
  env:
@@ -0,0 +1,82 @@
1
+ name: horde_model_reference build and publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - releases
7
+
8
+ jobs:
9
+ build-n-publish:
10
+ name: horde_model_reference build and publish
11
+ runs-on: ubuntu-latest
12
+
13
+ environment: # see https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/
14
+ name: pypi
15
+ url: https://pypi.org/p/horde-model-reference/
16
+
17
+ permissions:
18
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
19
+ contents: write
20
+ pull-requests: read
21
+
22
+ steps:
23
+ - name: "📣 Release on push"
24
+ id: release
25
+ uses: rymndhng/release-on-push-action@v0.28.0
26
+ env:
27
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28
+ with:
29
+ bump_version_scheme: patch
30
+ use_github_release_notes: true
31
+
32
+ - name: "✔️ Checkout"
33
+ uses: actions/checkout@v6
34
+ with:
35
+ fetch-depth: 0
36
+
37
+ # Pass the version number in an env var to the below steps
38
+ - name: Set build version env var
39
+ run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=${{ steps.release.outputs.version }}" >> $GITHUB_ENV
40
+
41
+ # We need python...
42
+ - name: "🐍 Set up Python 3.10"
43
+ if: ${{ steps.release.outputs.version != '' }}
44
+ uses: actions/setup-python@v5
45
+ with:
46
+ python-version: "3.10"
47
+
48
+ # Install build deps
49
+ - name: "🛠 Install pypa/build"
50
+ if: ${{ steps.release.outputs.version != '' }}
51
+ run: |
52
+ python -m pip install --upgrade pip
53
+ python -m pip install build
54
+
55
+ # Build a pypi distribution using the env var version number
56
+ - name: "🔧 Build a binary wheel and a source tarball"
57
+ if: ${{ steps.release.outputs.version != '' }}
58
+ run: >-
59
+ python -m build --sdist --wheel --outdir dist/ .
60
+
61
+ # # Publish the package
62
+ - name: "📦 Publish distribution to PyPI"
63
+ if: ${{ steps.release.outputs.version != '' }}
64
+ uses: pypa/gh-action-pypi-publish@release/v1
65
+
66
+ # # Update the badges (maybe, if we're lucky)
67
+ # - name: "📦 Refresh pypi badge cache"
68
+ # run: >-
69
+ # curl -X PURGE
70
+ # url_here
71
+
72
+ # - name: "📦 Refresh downloads badge cache"
73
+ # run: >-
74
+ # curl -X PURGE
75
+ # url_here
76
+
77
+ # - name: "Inform with Discord Webhook"
78
+ # if: ${{ steps.release.outputs.version != '' }}
79
+ # uses: tsickert/discord-webhook@v5.3.0
80
+ # with:
81
+ # webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
82
+ # content: "New version of horde_model_reference has been published to pypi: ${{ steps.release.outputs.version }}."