corpus-forge 0.1.0b2__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.
- corpus_forge-0.1.0b2/.gitignore +35 -0
- corpus_forge-0.1.0b2/LICENSE +202 -0
- corpus_forge-0.1.0b2/Makefile +139 -0
- corpus_forge-0.1.0b2/PKG-INFO +758 -0
- corpus_forge-0.1.0b2/README.md +682 -0
- corpus_forge-0.1.0b2/config.example.toml +445 -0
- corpus_forge-0.1.0b2/corpus_forge/__init__.py +3 -0
- corpus_forge-0.1.0b2/corpus_forge/__main__.py +6 -0
- corpus_forge-0.1.0b2/corpus_forge/_http.py +193 -0
- corpus_forge-0.1.0b2/corpus_forge/_ml_device.py +57 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/__init__.py +0 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/env.py +120 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/script.py.mako +30 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/.gitkeep +0 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0001_core.py +353 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0002_chunk_content_hash.py +53 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0003_views.py +74 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0004_sync.py +105 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0005_fts.py +75 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0006_writes_and_feedback.py +135 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0007_chat_templates.py +60 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0008_feedback_sessions.py +86 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0009_feedback_host_default.py +70 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0010_document_label_confidence.py +57 -0
- corpus_forge-0.1.0b2/corpus_forge/alembic/versions/0011_image_embeddings.py +69 -0
- corpus_forge-0.1.0b2/corpus_forge/backends/base.py +285 -0
- corpus_forge-0.1.0b2/corpus_forge/backends/postgres.py +2655 -0
- corpus_forge-0.1.0b2/corpus_forge/backends/sqlite.py +3225 -0
- corpus_forge-0.1.0b2/corpus_forge/backends/sqlite_vec_loader.py +47 -0
- corpus_forge-0.1.0b2/corpus_forge/chunkers/__init__.py +39 -0
- corpus_forge-0.1.0b2/corpus_forge/chunkers/base.py +216 -0
- corpus_forge-0.1.0b2/corpus_forge/chunkers/cdc.py +241 -0
- corpus_forge-0.1.0b2/corpus_forge/chunkers/code.py +465 -0
- corpus_forge-0.1.0b2/corpus_forge/chunkers/conversation.py +9 -0
- corpus_forge-0.1.0b2/corpus_forge/chunkers/markdown.py +9 -0
- corpus_forge-0.1.0b2/corpus_forge/classifiers/__init__.py +137 -0
- corpus_forge-0.1.0b2/corpus_forge/classifiers/base.py +202 -0
- corpus_forge-0.1.0b2/corpus_forge/classifiers/llm.py +254 -0
- corpus_forge-0.1.0b2/corpus_forge/classifiers/registry.py +113 -0
- corpus_forge-0.1.0b2/corpus_forge/classifiers/rule_based.py +342 -0
- corpus_forge-0.1.0b2/corpus_forge/cli.py +1914 -0
- corpus_forge-0.1.0b2/corpus_forge/config.py +624 -0
- corpus_forge-0.1.0b2/corpus_forge/curation/__init__.py +36 -0
- corpus_forge-0.1.0b2/corpus_forge/curation/prompts.py +54 -0
- corpus_forge-0.1.0b2/corpus_forge/curation/selector.py +774 -0
- corpus_forge-0.1.0b2/corpus_forge/daemon.py +77 -0
- corpus_forge-0.1.0b2/corpus_forge/doctor/__init__.py +34 -0
- corpus_forge-0.1.0b2/corpus_forge/doctor/checks.py +146 -0
- corpus_forge-0.1.0b2/corpus_forge/embed.py +320 -0
- corpus_forge-0.1.0b2/corpus_forge/embedders/base.py +62 -0
- corpus_forge-0.1.0b2/corpus_forge/embedders/clip_local.py +123 -0
- corpus_forge-0.1.0b2/corpus_forge/embedders/clip_remote.py +133 -0
- corpus_forge-0.1.0b2/corpus_forge/embedders/multimodal.py +83 -0
- corpus_forge-0.1.0b2/corpus_forge/embedders/openai.py +133 -0
- corpus_forge-0.1.0b2/corpus_forge/embedders/registry.py +58 -0
- corpus_forge-0.1.0b2/corpus_forge/embedders/sentence_transformers.py +124 -0
- corpus_forge-0.1.0b2/corpus_forge/enrichers/__init__.py +157 -0
- corpus_forge-0.1.0b2/corpus_forge/enrichers/base.py +319 -0
- corpus_forge-0.1.0b2/corpus_forge/enrichers/qwen_local.py +180 -0
- corpus_forge-0.1.0b2/corpus_forge/enrichers/qwen_remote.py +195 -0
- corpus_forge-0.1.0b2/corpus_forge/enrichers/registry.py +61 -0
- corpus_forge-0.1.0b2/corpus_forge/estimate.py +601 -0
- corpus_forge-0.1.0b2/corpus_forge/eval/__init__.py +39 -0
- corpus_forge-0.1.0b2/corpus_forge/eval/dataset.py +167 -0
- corpus_forge-0.1.0b2/corpus_forge/eval/datasets/forge_self.corpus.md +84 -0
- corpus_forge-0.1.0b2/corpus_forge/eval/datasets/forge_self.jsonl +28 -0
- corpus_forge-0.1.0b2/corpus_forge/eval/metrics.py +171 -0
- corpus_forge-0.1.0b2/corpus_forge/eval/runner.py +309 -0
- corpus_forge-0.1.0b2/corpus_forge/export.py +251 -0
- corpus_forge-0.1.0b2/corpus_forge/exports/huggingface.py +66 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/__init__.py +16 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/audio.py +86 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/base.py +89 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/code.py +243 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/csv.py +74 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/epub.py +73 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/html.py +47 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/image.py +98 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/notebook.py +82 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/office.py +82 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/passthrough.py +43 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/pdf.py +427 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/plaintext.py +54 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/registry.py +307 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/structured.py +122 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/subtitle.py +76 -0
- corpus_forge-0.1.0b2/corpus_forge/extractors/video.py +157 -0
- corpus_forge-0.1.0b2/corpus_forge/identity.py +30 -0
- corpus_forge-0.1.0b2/corpus_forge/ingest.py +634 -0
- corpus_forge-0.1.0b2/corpus_forge/mcp/__init__.py +25 -0
- corpus_forge-0.1.0b2/corpus_forge/mcp/server.py +1557 -0
- corpus_forge-0.1.0b2/corpus_forge/mcp/templates.py +270 -0
- corpus_forge-0.1.0b2/corpus_forge/mcp/transport.py +33 -0
- corpus_forge-0.1.0b2/corpus_forge/mcp/writes.py +706 -0
- corpus_forge-0.1.0b2/corpus_forge/py.typed +0 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/__init__.py +29 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/fusion.py +89 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/normalize.py +72 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/rerank/__init__.py +35 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/rerank/base.py +64 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/rerank/cross_encoder.py +201 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/rerank/ollama.py +192 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/retriever.py +231 -0
- corpus_forge-0.1.0b2/corpus_forge/retrieval/types.py +85 -0
- corpus_forge-0.1.0b2/corpus_forge/schema/migrate.py +134 -0
- corpus_forge-0.1.0b2/corpus_forge/schema/per_embedder.sql.tmpl +9 -0
- corpus_forge-0.1.0b2/corpus_forge/setup/__init__.py +34 -0
- corpus_forge-0.1.0b2/corpus_forge/setup/questions.toml +331 -0
- corpus_forge-0.1.0b2/corpus_forge/setup/wizard.py +438 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/_flatten.py +66 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/_session_link.py +26 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/base.py +106 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/chatgpt_export.py +184 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/claude_code.py +119 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/codex_cli.py +90 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/filesystem.py +243 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/gemini_cli.py +98 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/jsonl_chat.py +94 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/markdown_vault.py +74 -0
- corpus_forge-0.1.0b2/corpus_forge/sources/opencode.py +92 -0
- corpus_forge-0.1.0b2/corpus_forge/sync/__init__.py +5 -0
- corpus_forge-0.1.0b2/corpus_forge/sync/cloud.py +67 -0
- corpus_forge-0.1.0b2/corpus_forge/sync/conflicts.py +75 -0
- corpus_forge-0.1.0b2/corpus_forge/sync/echo.py +78 -0
- corpus_forge-0.1.0b2/corpus_forge/sync/engine.py +59 -0
- corpus_forge-0.1.0b2/corpus_forge/sync/fs.py +99 -0
- corpus_forge-0.1.0b2/corpus_forge/sync/pull.py +155 -0
- corpus_forge-0.1.0b2/corpus_forge/sync/push.py +248 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/__init__.py +86 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/builtins/__init__.py +1 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/builtins/alpaca.py +23 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/builtins/chatml.py +19 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/builtins/gemma.py +21 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/builtins/llama3.py +22 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/builtins/qwen.py +19 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/builtins/vicuna.py +23 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/hf.py +39 -0
- corpus_forge-0.1.0b2/corpus_forge/templates/tools.py +25 -0
- corpus_forge-0.1.0b2/corpus_forge/update/__init__.py +30 -0
- corpus_forge-0.1.0b2/corpus_forge/update/channels.py +204 -0
- corpus_forge-0.1.0b2/corpus_forge/update/version_check.py +202 -0
- corpus_forge-0.1.0b2/corpus_forge/vlm/__init__.py +45 -0
- corpus_forge-0.1.0b2/corpus_forge/vlm/base.py +146 -0
- corpus_forge-0.1.0b2/corpus_forge/vlm/mistral.py +127 -0
- corpus_forge-0.1.0b2/corpus_forge/vlm/ollama.py +138 -0
- corpus_forge-0.1.0b2/corpus_forge/vlm/registry.py +143 -0
- corpus_forge-0.1.0b2/corpus_forge/whisper/__init__.py +45 -0
- corpus_forge-0.1.0b2/corpus_forge/whisper/base.py +138 -0
- corpus_forge-0.1.0b2/corpus_forge/whisper/local.py +186 -0
- corpus_forge-0.1.0b2/corpus_forge/whisper/registry.py +145 -0
- corpus_forge-0.1.0b2/corpus_forge/whisper/remote.py +109 -0
- corpus_forge-0.1.0b2/examples/mcp-config/README.md +68 -0
- corpus_forge-0.1.0b2/packaging/corpus-forge.nssm.template +40 -0
- corpus_forge-0.1.0b2/packaging/corpus-forge.plist.template +30 -0
- corpus_forge-0.1.0b2/packaging/corpus-forge.service.template +20 -0
- corpus_forge-0.1.0b2/packaging/distribution/corpus-forge.json +33 -0
- corpus_forge-0.1.0b2/packaging/distribution/corpus-forge.rb +46 -0
- corpus_forge-0.1.0b2/pyproject.toml +292 -0
- corpus_forge-0.1.0b2/scripts/build_fixture_corpus.py +1332 -0
- corpus_forge-0.1.0b2/scripts/linux/install.sh +65 -0
- corpus_forge-0.1.0b2/scripts/linux/stop.sh +14 -0
- corpus_forge-0.1.0b2/scripts/linux/uninstall.sh +26 -0
- corpus_forge-0.1.0b2/scripts/macos/install.sh +57 -0
- corpus_forge-0.1.0b2/scripts/macos/stop.sh +21 -0
- corpus_forge-0.1.0b2/scripts/macos/uninstall.sh +30 -0
- corpus_forge-0.1.0b2/scripts/query_repo_sqlite.py +115 -0
- corpus_forge-0.1.0b2/scripts/qwen3_via_ollama.py +186 -0
- corpus_forge-0.1.0b2/scripts/vectorize_repo_sqlite.py +155 -0
- corpus_forge-0.1.0b2/scripts/windows/install.ps1 +184 -0
- corpus_forge-0.1.0b2/secrets.env.example +10 -0
- corpus_forge-0.1.0b2/tests/conftest.py +422 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/.gitignore +13 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/README.md +49 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/beam/hello.ex +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/beam/mod.erl +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/beam/mod.hrl +1 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/c/lib.c +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/c/lib.h +6 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/cpp/main.cpp +7 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/cpp/util.cpp +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/cpp/util.h +3 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/exotic/app.cr +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/exotic/app.swift +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/exotic/default.nix +6 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/exotic/mod.nim +4 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/exotic/plot.r +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/exotic/run.jl +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/exotic/tiny.zig +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/exotic/ui.dart +7 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/go/internal/handler.go +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/go/main.go +7 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/haskell-ocaml/Main.hs +4 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/haskell-ocaml/main.ml +1 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/java/App.java +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/js-ts/app.ts +3 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/js-ts/react.tsx +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/js-ts/server.js +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/kotlin-scala/App.kt +3 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/kotlin-scala/App.scala +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/lisp-clj/core.clj +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/lisp-clj/demo.lisp +3 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/lisp-clj/demo.scm +4 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/prolog/rules.pl +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/python/module.py +13 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/python/package/__init__.py +3 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/python/package/util.py +6 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/ruby/app.rb +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/rust/lib.rs +3 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/rust/main.rs +3 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/shell/deploy.bash +3 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/shell/fish.fish +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/shell/install.sh +2 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/web/page.html +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/web/query.sql +4 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/code/web/styles.css +8 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/data/config.toml +7 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/data/manifest.json +6 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/data/records.csv +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/data/transcript.srt +7 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/epub/small-book.epub +0 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/html/nav-and-ads.html +39 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/html/simple-article.html +18 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/images/diagram.webp +0 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/images/photo-of-receipt.jpg +0 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/images/screenshot.png +0 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/notebook/analysis.ipynb +58 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/office/report.docx +0 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/office/slides.pptx +0 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/office/tiny-sheet.xlsx +0 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/pdf/digital-single-col.pdf +68 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/pdf/digital-two-col-equations.pdf +68 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/pdf/scanned-paper.pdf +79 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/prose/frontmatter.md +9 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/prose/intro.md +12 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/prose/notes.txt +5 -0
- corpus_forge-0.1.0b2/tests/fixtures/multi_format_corpus/prose/tex-snippet.tex +7 -0
- corpus_forge-0.1.0b2/tests/fuzz/__init__.py +0 -0
- corpus_forge-0.1.0b2/tests/fuzz/profiles.py +61 -0
- corpus_forge-0.1.0b2/tests/fuzz/test_fuzz.py +242 -0
- corpus_forge-0.1.0b2/tests/integration/__init__.py +0 -0
- corpus_forge-0.1.0b2/tests/integration/conftest.py +347 -0
- corpus_forge-0.1.0b2/tests/integration/test_alembic_0006_writes_and_feedback.py +562 -0
- corpus_forge-0.1.0b2/tests/integration/test_alembic_0007_chat_templates.py +490 -0
- corpus_forge-0.1.0b2/tests/integration/test_alembic_0008_feedback_sessions.py +794 -0
- corpus_forge-0.1.0b2/tests/integration/test_alembic_backfill_content_hash.py +357 -0
- corpus_forge-0.1.0b2/tests/integration/test_alembic_backfill_fts_sqlite.py +399 -0
- corpus_forge-0.1.0b2/tests/integration/test_append_conversation_e2e.py +234 -0
- corpus_forge-0.1.0b2/tests/integration/test_apply_migrations_uses_alembic.py +235 -0
- corpus_forge-0.1.0b2/tests/integration/test_backend.py +528 -0
- corpus_forge-0.1.0b2/tests/integration/test_backend_dual.py +1284 -0
- corpus_forge-0.1.0b2/tests/integration/test_backend_sqlite.py +1612 -0
- corpus_forge-0.1.0b2/tests/integration/test_chunk_reuse_e2e.py +340 -0
- corpus_forge-0.1.0b2/tests/integration/test_chunk_reuse_isolation.py +222 -0
- corpus_forge-0.1.0b2/tests/integration/test_classify_cli_e2e.py +440 -0
- corpus_forge-0.1.0b2/tests/integration/test_classify_llm_e2e.py +350 -0
- corpus_forge-0.1.0b2/tests/integration/test_claude_code_session_link_e2e.py +247 -0
- corpus_forge-0.1.0b2/tests/integration/test_curation_e2e.py +228 -0
- corpus_forge-0.1.0b2/tests/integration/test_dsn_fixture.py +63 -0
- corpus_forge-0.1.0b2/tests/integration/test_embedder_contract.py +196 -0
- corpus_forge-0.1.0b2/tests/integration/test_enrich_e2e.py +318 -0
- corpus_forge-0.1.0b2/tests/integration/test_estimate_real_tree.py +153 -0
- corpus_forge-0.1.0b2/tests/integration/test_export_chat_jsonl.py +361 -0
- corpus_forge-0.1.0b2/tests/integration/test_export_chat_parquet_hf_compatible.py +249 -0
- corpus_forge-0.1.0b2/tests/integration/test_feedback_loop_e2e.py +402 -0
- corpus_forge-0.1.0b2/tests/integration/test_ingest.py +326 -0
- corpus_forge-0.1.0b2/tests/integration/test_mcp_read_enrichment.py +631 -0
- corpus_forge-0.1.0b2/tests/integration/test_mcp_writes_postgres.py +607 -0
- corpus_forge-0.1.0b2/tests/integration/test_migrate_002.py +48 -0
- corpus_forge-0.1.0b2/tests/integration/test_migrate_003.py +348 -0
- corpus_forge-0.1.0b2/tests/integration/test_migrate_004_postgres.py +172 -0
- corpus_forge-0.1.0b2/tests/integration/test_migrate_004_sqlite.py +230 -0
- corpus_forge-0.1.0b2/tests/integration/test_migrate_image_embeddings.py +104 -0
- corpus_forge-0.1.0b2/tests/integration/test_migrate_label_confidence.py +205 -0
- corpus_forge-0.1.0b2/tests/integration/test_migrate_sqlite.py +507 -0
- corpus_forge-0.1.0b2/tests/integration/test_multi_format_ingest_e2e.py +514 -0
- corpus_forge-0.1.0b2/tests/integration/test_multimodal_embed_e2e.py +72 -0
- corpus_forge-0.1.0b2/tests/integration/test_ocr_local_e2e.py +185 -0
- corpus_forge-0.1.0b2/tests/integration/test_ocr_remote_e2e.py +103 -0
- corpus_forge-0.1.0b2/tests/integration/test_rechunk_e2e.py +301 -0
- corpus_forge-0.1.0b2/tests/integration/test_render_conversation_mcp.py +352 -0
- corpus_forge-0.1.0b2/tests/integration/test_render_register_export_e2e.py +400 -0
- corpus_forge-0.1.0b2/tests/integration/test_self_distillation_export.py +229 -0
- corpus_forge-0.1.0b2/tests/integration/test_sync_icloud_dupe.py +444 -0
- corpus_forge-0.1.0b2/tests/integration/test_sync_push_pull.py +456 -0
- corpus_forge-0.1.0b2/tests/integration/test_sync_tombstone.py +822 -0
- corpus_forge-0.1.0b2/tests/integration/test_two_ingester_one_mcp.py +386 -0
- corpus_forge-0.1.0b2/tests/integration/test_whisper_local_e2e.py +80 -0
- corpus_forge-0.1.0b2/tests/smoke/__init__.py +0 -0
- corpus_forge-0.1.0b2/tests/smoke/test_eval_smoke.py +260 -0
- corpus_forge-0.1.0b2/tests/smoke/test_mcp_serve_boots_with_alembic.py +381 -0
- corpus_forge-0.1.0b2/tests/smoke/test_mcp_stdio.py +184 -0
- corpus_forge-0.1.0b2/tests/smoke/test_mcp_writes_disabled_by_default.py +196 -0
- corpus_forge-0.1.0b2/tests/smoke/test_satellite_deployment_doc.py +68 -0
- corpus_forge-0.1.0b2/tests/smoke/test_skill_tool_contract.py +326 -0
- corpus_forge-0.1.0b2/tests/smoke/test_smoke.py +306 -0
- corpus_forge-0.1.0b2/tests/smoke/test_smoke_sqlite.py +225 -0
- corpus_forge-0.1.0b2/tests/unit/test_alembic_revision_chain.py +246 -0
- corpus_forge-0.1.0b2/tests/unit/test_backend_classifier_helpers.py +201 -0
- corpus_forge-0.1.0b2/tests/unit/test_backend_enrichment_helpers.py +344 -0
- corpus_forge-0.1.0b2/tests/unit/test_backend_image_embeddings.py +170 -0
- corpus_forge-0.1.0b2/tests/unit/test_backend_write_helpers.py +789 -0
- corpus_forge-0.1.0b2/tests/unit/test_cdc_chunker.py +251 -0
- corpus_forge-0.1.0b2/tests/unit/test_cdc_stability.py +216 -0
- corpus_forge-0.1.0b2/tests/unit/test_chat_template_backend_helpers.py +271 -0
- corpus_forge-0.1.0b2/tests/unit/test_chunk_reuse.py +228 -0
- corpus_forge-0.1.0b2/tests/unit/test_chunker_dispatch.py +240 -0
- corpus_forge-0.1.0b2/tests/unit/test_chunkers.py +202 -0
- corpus_forge-0.1.0b2/tests/unit/test_chunkers_extended.py +143 -0
- corpus_forge-0.1.0b2/tests/unit/test_chunkers_init.py +80 -0
- corpus_forge-0.1.0b2/tests/unit/test_chunkers_regression.py +491 -0
- corpus_forge-0.1.0b2/tests/unit/test_ci_no_docker.py +125 -0
- corpus_forge-0.1.0b2/tests/unit/test_ci_workflow_yaml.py +158 -0
- corpus_forge-0.1.0b2/tests/unit/test_classifier_registry.py +384 -0
- corpus_forge-0.1.0b2/tests/unit/test_claude_agent_frontmatter.py +110 -0
- corpus_forge-0.1.0b2/tests/unit/test_claude_code_session_link.py +259 -0
- corpus_forge-0.1.0b2/tests/unit/test_claude_integration_doc.py +74 -0
- corpus_forge-0.1.0b2/tests/unit/test_claude_skill_frontmatter.py +120 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_classify.py +335 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_enrich.py +403 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_estimate.py +285 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_eval.py +363 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_mcp_serve.py +110 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_migrate.py +153 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_rechunk.py +389 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_search.py +262 -0
- corpus_forge-0.1.0b2/tests/unit/test_cli_sync.py +58 -0
- corpus_forge-0.1.0b2/tests/unit/test_cliff_config.py +75 -0
- corpus_forge-0.1.0b2/tests/unit/test_clip_local.py +139 -0
- corpus_forge-0.1.0b2/tests/unit/test_clip_remote.py +229 -0
- corpus_forge-0.1.0b2/tests/unit/test_code_chunker.py +242 -0
- corpus_forge-0.1.0b2/tests/unit/test_config.py +179 -0
- corpus_forge-0.1.0b2/tests/unit/test_config_classifier.py +178 -0
- corpus_forge-0.1.0b2/tests/unit/test_config_enricher.py +172 -0
- corpus_forge-0.1.0b2/tests/unit/test_config_extended.py +1295 -0
- corpus_forge-0.1.0b2/tests/unit/test_config_multi_format.py +122 -0
- corpus_forge-0.1.0b2/tests/unit/test_config_retrieval.py +299 -0
- corpus_forge-0.1.0b2/tests/unit/test_config_vlm.py +266 -0
- corpus_forge-0.1.0b2/tests/unit/test_config_whisper.py +133 -0
- corpus_forge-0.1.0b2/tests/unit/test_cross_encoder_branches.py +163 -0
- corpus_forge-0.1.0b2/tests/unit/test_curation_selector.py +842 -0
- corpus_forge-0.1.0b2/tests/unit/test_daemon.py +321 -0
- corpus_forge-0.1.0b2/tests/unit/test_dependabot_config.py +69 -0
- corpus_forge-0.1.0b2/tests/unit/test_docs_consistency.py +209 -0
- corpus_forge-0.1.0b2/tests/unit/test_doctor.py +39 -0
- corpus_forge-0.1.0b2/tests/unit/test_dummy_editable_install.py +20 -0
- corpus_forge-0.1.0b2/tests/unit/test_embed.py +1 -0
- corpus_forge-0.1.0b2/tests/unit/test_embed_backfill.py +236 -0
- corpus_forge-0.1.0b2/tests/unit/test_embed_extended.py +334 -0
- corpus_forge-0.1.0b2/tests/unit/test_embed_image.py +209 -0
- corpus_forge-0.1.0b2/tests/unit/test_embed_sqlite_wiring.py +430 -0
- corpus_forge-0.1.0b2/tests/unit/test_embedder_encode_query.py +331 -0
- corpus_forge-0.1.0b2/tests/unit/test_embedder_implementations.py +178 -0
- corpus_forge-0.1.0b2/tests/unit/test_embedders.py +157 -0
- corpus_forge-0.1.0b2/tests/unit/test_enricher_registry.py +384 -0
- corpus_forge-0.1.0b2/tests/unit/test_estimate.py +736 -0
- corpus_forge-0.1.0b2/tests/unit/test_eval_bundled_dataset.py +75 -0
- corpus_forge-0.1.0b2/tests/unit/test_eval_dataset.py +316 -0
- corpus_forge-0.1.0b2/tests/unit/test_eval_metrics.py +262 -0
- corpus_forge-0.1.0b2/tests/unit/test_eval_runner.py +640 -0
- corpus_forge-0.1.0b2/tests/unit/test_eval_runner_uses_protocol.py +121 -0
- corpus_forge-0.1.0b2/tests/unit/test_export_chat_cli.py +219 -0
- corpus_forge-0.1.0b2/tests/unit/test_export_feedback_pairs.py +391 -0
- corpus_forge-0.1.0b2/tests/unit/test_export_feedback_pairs_cli.py +153 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_audio.py +174 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_code.py +389 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_csv.py +203 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_epub.py +187 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_html.py +207 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_image.py +232 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_notebook.py +213 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_office.py +179 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_passthrough.py +92 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_pdf_digital.py +204 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_plaintext.py +104 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_registry.py +384 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_structured.py +125 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_subtitle.py +124 -0
- corpus_forge-0.1.0b2/tests/unit/test_extractor_video.py +215 -0
- corpus_forge-0.1.0b2/tests/unit/test_filesystem_source.py +574 -0
- corpus_forge-0.1.0b2/tests/unit/test_flatten.py +122 -0
- corpus_forge-0.1.0b2/tests/unit/test_gemini_extension_manifest.py +109 -0
- corpus_forge-0.1.0b2/tests/unit/test_gemini_integration_doc.py +100 -0
- corpus_forge-0.1.0b2/tests/unit/test_gemini_md_content.py +93 -0
- corpus_forge-0.1.0b2/tests/unit/test_get_chunk_by_content_hash.py +160 -0
- corpus_forge-0.1.0b2/tests/unit/test_github_templates.py +129 -0
- corpus_forge-0.1.0b2/tests/unit/test_governance_files.py +172 -0
- corpus_forge-0.1.0b2/tests/unit/test_http_helper.py +295 -0
- corpus_forge-0.1.0b2/tests/unit/test_hypothesis_profiles.py +83 -0
- corpus_forge-0.1.0b2/tests/unit/test_identity.py +156 -0
- corpus_forge-0.1.0b2/tests/unit/test_ingest_core.py +533 -0
- corpus_forge-0.1.0b2/tests/unit/test_ingest_embedders.py +475 -0
- corpus_forge-0.1.0b2/tests/unit/test_ingest_extended.py +542 -0
- corpus_forge-0.1.0b2/tests/unit/test_ingest_filesystem.py +138 -0
- corpus_forge-0.1.0b2/tests/unit/test_ingest_helpers.py +72 -0
- corpus_forge-0.1.0b2/tests/unit/test_ingest_once.py +223 -0
- corpus_forge-0.1.0b2/tests/unit/test_ingest_sqlite_wiring.py +355 -0
- corpus_forge-0.1.0b2/tests/unit/test_install_questions_schema.py +190 -0
- corpus_forge-0.1.0b2/tests/unit/test_llm_classifier.py +376 -0
- corpus_forge-0.1.0b2/tests/unit/test_markdown_vault.py +111 -0
- corpus_forge-0.1.0b2/tests/unit/test_markers_and_xfail.py +87 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_config_examples.py +162 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_config_gemini.py +75 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_config_opencode.py +79 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_curation_tools.py +574 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_estimate.py +286 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_module_scaffold.py +58 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_register_session_dispatch.py +138 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_server.py +414 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_server_enrichment.py +1375 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_templates_dispatch.py +602 -0
- corpus_forge-0.1.0b2/tests/unit/test_mcp_writes_dispatch.py +757 -0
- corpus_forge-0.1.0b2/tests/unit/test_migrate_branches.py +152 -0
- corpus_forge-0.1.0b2/tests/unit/test_ml_device.py +74 -0
- corpus_forge-0.1.0b2/tests/unit/test_multimodal_protocol.py +79 -0
- corpus_forge-0.1.0b2/tests/unit/test_ollama_reranker_branches.py +76 -0
- corpus_forge-0.1.0b2/tests/unit/test_openai_embedder.py +257 -0
- corpus_forge-0.1.0b2/tests/unit/test_opencode_agent_frontmatter.py +112 -0
- corpus_forge-0.1.0b2/tests/unit/test_opencode_command_frontmatter.py +121 -0
- corpus_forge-0.1.0b2/tests/unit/test_opencode_integration_doc.py +74 -0
- corpus_forge-0.1.0b2/tests/unit/test_pdf_extractor_escalation.py +440 -0
- corpus_forge-0.1.0b2/tests/unit/test_phase_b_pyproject.py +140 -0
- corpus_forge-0.1.0b2/tests/unit/test_phase_ci1_pyproject.py +147 -0
- corpus_forge-0.1.0b2/tests/unit/test_phase_ci2_yaml.py +215 -0
- corpus_forge-0.1.0b2/tests/unit/test_phase_ci3_packaging.py +123 -0
- corpus_forge-0.1.0b2/tests/unit/test_phase_ci3_pyproject.py +243 -0
- corpus_forge-0.1.0b2/tests/unit/test_phase_ci3_scripts.py +227 -0
- corpus_forge-0.1.0b2/tests/unit/test_phase_ci3_wheel_metadata.py +289 -0
- corpus_forge-0.1.0b2/tests/unit/test_phase_d_housekeeping.py +415 -0
- corpus_forge-0.1.0b2/tests/unit/test_postgres_backend.py +523 -0
- corpus_forge-0.1.0b2/tests/unit/test_postgres_backend_helpers.py +1169 -0
- corpus_forge-0.1.0b2/tests/unit/test_protocol_retrieval_surface.py +159 -0
- corpus_forge-0.1.0b2/tests/unit/test_pyproject_eval_extras.py +78 -0
- corpus_forge-0.1.0b2/tests/unit/test_pyproject_mcp.py +74 -0
- corpus_forge-0.1.0b2/tests/unit/test_pyproject_rerank.py +62 -0
- corpus_forge-0.1.0b2/tests/unit/test_qwen_local.py +405 -0
- corpus_forge-0.1.0b2/tests/unit/test_qwen_remote.py +479 -0
- corpus_forge-0.1.0b2/tests/unit/test_release_workflow.py +222 -0
- corpus_forge-0.1.0b2/tests/unit/test_remaining.py +244 -0
- corpus_forge-0.1.0b2/tests/unit/test_requires_unix_gate.py +93 -0
- corpus_forge-0.1.0b2/tests/unit/test_reranker_cross_encoder.py +315 -0
- corpus_forge-0.1.0b2/tests/unit/test_reranker_lazy_load.py +150 -0
- corpus_forge-0.1.0b2/tests/unit/test_reranker_ollama.py +246 -0
- corpus_forge-0.1.0b2/tests/unit/test_reranker_protocol.py +178 -0
- corpus_forge-0.1.0b2/tests/unit/test_retrieval_fusion.py +163 -0
- corpus_forge-0.1.0b2/tests/unit/test_retrieval_normalize.py +94 -0
- corpus_forge-0.1.0b2/tests/unit/test_retrieval_retriever.py +676 -0
- corpus_forge-0.1.0b2/tests/unit/test_retrieval_types.py +265 -0
- corpus_forge-0.1.0b2/tests/unit/test_revisions.py +334 -0
- corpus_forge-0.1.0b2/tests/unit/test_rule_based_classifier.py +429 -0
- corpus_forge-0.1.0b2/tests/unit/test_sentence_transformers_embedder.py +263 -0
- corpus_forge-0.1.0b2/tests/unit/test_setup_wizard.py +450 -0
- corpus_forge-0.1.0b2/tests/unit/test_source_chatgpt_export.py +198 -0
- corpus_forge-0.1.0b2/tests/unit/test_source_codex_cli.py +114 -0
- corpus_forge-0.1.0b2/tests/unit/test_source_gemini_cli.py +145 -0
- corpus_forge-0.1.0b2/tests/unit/test_source_jsonl_chat.py +136 -0
- corpus_forge-0.1.0b2/tests/unit/test_sources.py +211 -0
- corpus_forge-0.1.0b2/tests/unit/test_sqlite_backend.py +4855 -0
- corpus_forge-0.1.0b2/tests/unit/test_sqlite_vec_loader.py +253 -0
- corpus_forge-0.1.0b2/tests/unit/test_sync_cloud.py +271 -0
- corpus_forge-0.1.0b2/tests/unit/test_sync_conflicts.py +583 -0
- corpus_forge-0.1.0b2/tests/unit/test_sync_echo.py +365 -0
- corpus_forge-0.1.0b2/tests/unit/test_sync_engine.py +130 -0
- corpus_forge-0.1.0b2/tests/unit/test_sync_fs.py +854 -0
- corpus_forge-0.1.0b2/tests/unit/test_sync_pull.py +312 -0
- corpus_forge-0.1.0b2/tests/unit/test_sync_push.py +858 -0
- corpus_forge-0.1.0b2/tests/unit/test_template_builtins.py +388 -0
- corpus_forge-0.1.0b2/tests/unit/test_template_hf.py +228 -0
- corpus_forge-0.1.0b2/tests/unit/test_template_registry.py +199 -0
- corpus_forge-0.1.0b2/tests/unit/test_template_tools.py +113 -0
- corpus_forge-0.1.0b2/tests/unit/test_timeout_wired.py +74 -0
- corpus_forge-0.1.0b2/tests/unit/test_update_channels.py +85 -0
- corpus_forge-0.1.0b2/tests/unit/test_version_check.py +120 -0
- corpus_forge-0.1.0b2/tests/unit/test_vlm_mistral.py +370 -0
- corpus_forge-0.1.0b2/tests/unit/test_vlm_ollama.py +464 -0
- corpus_forge-0.1.0b2/tests/unit/test_vlm_registry.py +403 -0
- corpus_forge-0.1.0b2/tests/unit/test_watched_source.py +173 -0
- corpus_forge-0.1.0b2/tests/unit/test_whisper_local.py +202 -0
- corpus_forge-0.1.0b2/tests/unit/test_whisper_registry.py +337 -0
- corpus_forge-0.1.0b2/tests/unit/test_whisper_remote.py +192 -0
- corpus_forge-0.1.0b2/tests/unit/test_writes_error_branches.py +342 -0
- corpus_forge-0.1.0b2/tests/unit/test_writes_session_link.py +429 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
.venv/
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.pyc
|
|
5
|
+
*.pyo
|
|
6
|
+
*.egg-info/
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
|
|
10
|
+
# Tests / coverage
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
.hypothesis/
|
|
14
|
+
.coverage
|
|
15
|
+
.coverage.*
|
|
16
|
+
htmlcov/
|
|
17
|
+
coverage.xml
|
|
18
|
+
|
|
19
|
+
# Type checkers
|
|
20
|
+
.mypy_cache/
|
|
21
|
+
.pyre/
|
|
22
|
+
.pyrefly/
|
|
23
|
+
|
|
24
|
+
# Docs
|
|
25
|
+
site/
|
|
26
|
+
|
|
27
|
+
# Editors
|
|
28
|
+
.DS_Store
|
|
29
|
+
.idea/
|
|
30
|
+
.vscode/
|
|
31
|
+
|
|
32
|
+
# Secrets / local config — never commit
|
|
33
|
+
.env
|
|
34
|
+
secrets.env
|
|
35
|
+
*.secret
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Evan Owen / corpus-forge contributors
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
.PHONY: help install dev lint format typecheck test test-unit test-integration test-fuzz test-smoke \
|
|
2
|
+
test-ocr test-ocr-local migrate ingest embed backfill daemon stop logs ci docs docs-serve clean
|
|
3
|
+
|
|
4
|
+
# Cross-platform dispatch: `make stop` / `make logs` need to talk to launchd
|
|
5
|
+
# on macOS and to systemd-user on Linux. Detect OS once at the top.
|
|
6
|
+
OS := $(shell uname -s)
|
|
7
|
+
|
|
8
|
+
help: ## Show this help
|
|
9
|
+
@grep -E '^[a-zA-Z_-]+:.*?##' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?##"};{printf " %-18s %s\n",$$1,$$2}'
|
|
10
|
+
|
|
11
|
+
install: ## Install runtime dependencies (uv sync)
|
|
12
|
+
uv sync
|
|
13
|
+
@$(MAKE) --no-print-directory _unhide-pth
|
|
14
|
+
|
|
15
|
+
dev: ## Install dev dependencies + pre-commit hook
|
|
16
|
+
uv sync --all-extras --group dev
|
|
17
|
+
uv run pre-commit install
|
|
18
|
+
@$(MAKE) --no-print-directory _unhide-pth
|
|
19
|
+
|
|
20
|
+
# Darwin-only workaround: when the repo lives in iCloud Drive (~/Library/Mobile
|
|
21
|
+
# Documents/...), every freshly written file inherits the parent UF_HIDDEN flag,
|
|
22
|
+
# which makes site.py silently skip every .pth file — breaking our editable
|
|
23
|
+
# install (and therefore `import corpus_forge` from tests). Strip the flag
|
|
24
|
+
# after each sync so the .pth gets honoured. No-op on non-darwin systems.
|
|
25
|
+
.PHONY: _unhide-pth _warmup-grammars
|
|
26
|
+
_unhide-pth:
|
|
27
|
+
ifeq ($(OS),Darwin)
|
|
28
|
+
@if [ -d .venv/lib ]; then \
|
|
29
|
+
find .venv/lib -name "*.pth" -exec chflags nohidden {} + 2>/dev/null || true; \
|
|
30
|
+
fi
|
|
31
|
+
endif
|
|
32
|
+
|
|
33
|
+
lint: ## ruff check
|
|
34
|
+
uv run ruff check corpus_forge tests
|
|
35
|
+
|
|
36
|
+
format: ## ruff format (writes)
|
|
37
|
+
uv run ruff format corpus_forge tests
|
|
38
|
+
|
|
39
|
+
format-check: ## ruff format --check (CI)
|
|
40
|
+
uv run ruff format --check corpus_forge tests
|
|
41
|
+
|
|
42
|
+
typecheck: ## pyrefly strict
|
|
43
|
+
uv run pyrefly check corpus_forge
|
|
44
|
+
|
|
45
|
+
test: test-unit test-integration test-fuzz test-smoke ## All four test categories
|
|
46
|
+
|
|
47
|
+
test-unit: _warmup-grammars ## Fast, parallel, no Docker, coverage-gated
|
|
48
|
+
uv run pytest tests/unit -v -n auto --timeout=60 --cov=corpus_forge --cov-report=term-missing --cov-fail-under=90
|
|
49
|
+
|
|
50
|
+
# Pre-warm the tree-sitter grammar cache in a single process so the
|
|
51
|
+
# parallel pytest-xdist workers don't race on `pack.download()` writes.
|
|
52
|
+
# Idempotent — fast no-op once the cache is populated. The set of
|
|
53
|
+
# languages mirrors what the unit suite exercises in code chunker /
|
|
54
|
+
# code extractor tests; expand as new languages are added to the corpus.
|
|
55
|
+
_warmup-grammars:
|
|
56
|
+
@uv run python -c "import tree_sitter_language_pack as pack; \
|
|
57
|
+
pack.download(['python', 'javascript', 'typescript', 'tsx', 'go', 'rust', \
|
|
58
|
+
'java', 'kotlin', 'scala', 'ruby', 'elixir', 'erlang', 'haskell', 'ocaml', \
|
|
59
|
+
'clojure', 'commonlisp', 'scheme', 'bash', 'sql', 'css', 'lua', 'zig', \
|
|
60
|
+
'nim', 'crystal', 'r', 'julia', 'swift', 'dart', 'nix', 'c', 'cpp', \
|
|
61
|
+
'make', 'dockerfile'])" 2>&1 | tail -3 || true
|
|
62
|
+
|
|
63
|
+
test-integration: ## Requires Docker (testcontainers pgvector)
|
|
64
|
+
uv run pytest tests/integration -v
|
|
65
|
+
|
|
66
|
+
test-fuzz: ## Hypothesis-driven property tests (HYPOTHESIS_PROFILE=dev|ci|nightly)
|
|
67
|
+
HYPOTHESIS_PROFILE=$${HYPOTHESIS_PROFILE:-dev} uv run pytest tests/fuzz -v --hypothesis-show-statistics
|
|
68
|
+
|
|
69
|
+
test-smoke: ## End-to-end happy paths against fake embedder
|
|
70
|
+
uv run pytest tests/smoke -v
|
|
71
|
+
|
|
72
|
+
# Phase D / Wave 6 (P1 gate): the live-OCR end-to-end tests are
|
|
73
|
+
# marker-gated. They are *collected* as part of the regular integration
|
|
74
|
+
# suite but auto-skip via tests/integration/conftest.py when their
|
|
75
|
+
# dependency is absent (Ollama daemon down, MISTRAL_API_KEY unset). The
|
|
76
|
+
# targets below force them to run by selecting the markers directly.
|
|
77
|
+
test-ocr: ## Run both live OCR suites (requires_ollama or requires_mistral_api)
|
|
78
|
+
uv run pytest tests/integration -v -m "requires_ollama or requires_mistral_api"
|
|
79
|
+
|
|
80
|
+
test-ocr-local: ## Run the live-Ollama OCR suite only (requires_ollama)
|
|
81
|
+
uv run pytest tests/integration -v -m requires_ollama
|
|
82
|
+
|
|
83
|
+
migrate: ## Apply schema migrations
|
|
84
|
+
uv run corpus-forge migrate
|
|
85
|
+
|
|
86
|
+
ingest: ## One-shot ingestion pass
|
|
87
|
+
uv run corpus-forge ingest --once
|
|
88
|
+
|
|
89
|
+
embed: ## Backfill an embedder: make embed E=qwen3_8b
|
|
90
|
+
uv run corpus-forge embed --embedder=$(E)
|
|
91
|
+
|
|
92
|
+
backfill: ## Backfill all active embedders
|
|
93
|
+
uv run corpus-forge embed
|
|
94
|
+
|
|
95
|
+
daemon: ## Run daemon in foreground (dev)
|
|
96
|
+
uv run corpus-forge daemon
|
|
97
|
+
|
|
98
|
+
stop: ## Stop the corpus-forge daemon (macOS launchd / Linux systemd-user)
|
|
99
|
+
ifeq ($(OS),Darwin)
|
|
100
|
+
./scripts/macos/stop.sh
|
|
101
|
+
else ifeq ($(OS),Linux)
|
|
102
|
+
systemctl --user stop corpus-forge.service || true
|
|
103
|
+
else
|
|
104
|
+
@echo "make stop: unsupported OS '$(OS)' — run 'corpus-forge daemon' supervisor manually."
|
|
105
|
+
endif
|
|
106
|
+
|
|
107
|
+
logs: ## Tail the corpus-forge daemon logs (macOS launchd / Linux journald)
|
|
108
|
+
ifeq ($(OS),Darwin)
|
|
109
|
+
tail -f ~/Library/Logs/corpus-forge.err.log
|
|
110
|
+
else ifeq ($(OS),Linux)
|
|
111
|
+
journalctl --user -u corpus-forge.service -f
|
|
112
|
+
else
|
|
113
|
+
@echo "make logs: unsupported OS '$(OS)' — check your supervisor's log destination."
|
|
114
|
+
endif
|
|
115
|
+
|
|
116
|
+
ci: format-check lint typecheck test ## Full CI pipeline (run before pushing)
|
|
117
|
+
|
|
118
|
+
# Replicate the GitHub Actions ``ci.yml`` gate locally — same env (FORCE_COLOR
|
|
119
|
+
# triggers Rich/typer's ANSI help wrapping that broke CliRunner asserts),
|
|
120
|
+
# same step order, and bypasses ``uv run`` for pytest so the iCloud-Drive
|
|
121
|
+
# .pth hidden-flag fix isn't undone between steps.
|
|
122
|
+
ci-local: ## CI gate locally (FORCE_COLOR=1, HYPOTHESIS_PROFILE=ci) — catches CI-only failures
|
|
123
|
+
ifeq ($(OS),Darwin)
|
|
124
|
+
@find .venv -name "*.pth" -exec chflags nohidden {} + 2>/dev/null || true
|
|
125
|
+
endif
|
|
126
|
+
FORCE_COLOR=1 HYPOTHESIS_PROFILE=ci CI=true UV_NO_PROGRESS=1 .venv/bin/ruff format --check corpus_forge tests
|
|
127
|
+
FORCE_COLOR=1 HYPOTHESIS_PROFILE=ci CI=true UV_NO_PROGRESS=1 .venv/bin/ruff check corpus_forge tests
|
|
128
|
+
FORCE_COLOR=1 HYPOTHESIS_PROFILE=ci CI=true UV_NO_PROGRESS=1 .venv/bin/pyrefly check corpus_forge
|
|
129
|
+
FORCE_COLOR=1 HYPOTHESIS_PROFILE=ci CI=true UV_NO_PROGRESS=1 .venv/bin/python -m pytest tests/unit -n auto --timeout=60 -q
|
|
130
|
+
|
|
131
|
+
docs-serve: ## Live-preview docs locally (mkdocs)
|
|
132
|
+
uv run mkdocs serve
|
|
133
|
+
|
|
134
|
+
docs: ## Build docs to ./site
|
|
135
|
+
uv run mkdocs build
|
|
136
|
+
|
|
137
|
+
clean:
|
|
138
|
+
rm -rf .venv .pytest_cache .ruff_cache .coverage htmlcov dist build site
|
|
139
|
+
find . -type d -name __pycache__ -exec rm -rf {} +
|