rustfuzz 0.1.6__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.
- rustfuzz-0.1.6/.agents/workflows/push-to-main.md +65 -0
- rustfuzz-0.1.6/.agents/workflows/research-build-test-benchmark.md +124 -0
- rustfuzz-0.1.6/.cargo/config.toml +2 -0
- rustfuzz-0.1.6/.github/dependabot.yml +13 -0
- rustfuzz-0.1.6/.github/workflows/ci.yml +227 -0
- rustfuzz-0.1.6/.gitignore +35 -0
- rustfuzz-0.1.6/.pre-commit-config.yaml +82 -0
- rustfuzz-0.1.6/AGENTS.md +123 -0
- rustfuzz-0.1.6/Cargo.lock +281 -0
- rustfuzz-0.1.6/Cargo.toml +23 -0
- rustfuzz-0.1.6/LICENSE +21 -0
- rustfuzz-0.1.6/PKG-INFO +166 -0
- rustfuzz-0.1.6/README.md +142 -0
- rustfuzz-0.1.6/commit_code.sh +12 -0
- rustfuzz-0.1.6/data/scifact/dataset.zip +0 -0
- rustfuzz-0.1.6/data/scifact/scifact/corpus.jsonl +5183 -0
- rustfuzz-0.1.6/data/scifact/scifact/qrels/test.tsv +340 -0
- rustfuzz-0.1.6/data/scifact/scifact/qrels/train.tsv +920 -0
- rustfuzz-0.1.6/data/scifact/scifact/queries.jsonl +1109 -0
- rustfuzz-0.1.6/docs/architecture.md +52 -0
- rustfuzz-0.1.6/docs/cookbook/01_introduction.ipynb +255 -0
- rustfuzz-0.1.6/docs/cookbook/02_advanced_matching.ipynb +328 -0
- rustfuzz-0.1.6/docs/cookbook/03_benchmarks.ipynb +210 -0
- rustfuzz-0.1.6/docs/cookbook/04_hybrid_search.md +143 -0
- rustfuzz-0.1.6/docs/cookbook/05_langchain.md +105 -0
- rustfuzz-0.1.6/docs/cookbook/06_real_world.md +127 -0
- rustfuzz-0.1.6/docs/cookbook/07_fuzzy_join.md +485 -0
- rustfuzz-0.1.6/docs/developer_guide.md +77 -0
- rustfuzz-0.1.6/docs/index.md +118 -0
- rustfuzz-0.1.6/docs/logo.svg +88 -0
- rustfuzz-0.1.6/docs/stylesheets/extra.css +39 -0
- rustfuzz-0.1.6/examples/bench_retrieval.py +179 -0
- rustfuzz-0.1.6/mkdocs.yml +57 -0
- rustfuzz-0.1.6/pyproject.toml +102 -0
- rustfuzz-0.1.6/pyrightconfig.json +31 -0
- rustfuzz-0.1.6/rustfuzz/__init__.py +34 -0
- rustfuzz-0.1.6/rustfuzz/__init__.pyi +28 -0
- rustfuzz-0.1.6/rustfuzz/_rustfuzz.pyi +710 -0
- rustfuzz-0.1.6/rustfuzz/distance/DamerauLevenshtein.py +23 -0
- rustfuzz-0.1.6/rustfuzz/distance/DamerauLevenshtein.pyi +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/Gotoh.py +89 -0
- rustfuzz-0.1.6/rustfuzz/distance/Gotoh.pyi +39 -0
- rustfuzz-0.1.6/rustfuzz/distance/Hamming.py +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/Hamming.pyi +37 -0
- rustfuzz-0.1.6/rustfuzz/distance/Indel.py +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/Indel.pyi +37 -0
- rustfuzz-0.1.6/rustfuzz/distance/Jaro.py +23 -0
- rustfuzz-0.1.6/rustfuzz/distance/Jaro.pyi +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/JaroWinkler.py +23 -0
- rustfuzz-0.1.6/rustfuzz/distance/JaroWinkler.pyi +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/LCSseq.py +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/LCSseq.pyi +37 -0
- rustfuzz-0.1.6/rustfuzz/distance/Levenshtein.py +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/Levenshtein.pyi +37 -0
- rustfuzz-0.1.6/rustfuzz/distance/NGram.py +37 -0
- rustfuzz-0.1.6/rustfuzz/distance/NGram.pyi +19 -0
- rustfuzz-0.1.6/rustfuzz/distance/OSA.py +23 -0
- rustfuzz-0.1.6/rustfuzz/distance/OSA.pyi +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/Postfix.py +23 -0
- rustfuzz-0.1.6/rustfuzz/distance/Postfix.pyi +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/Prefix.py +23 -0
- rustfuzz-0.1.6/rustfuzz/distance/Prefix.pyi +31 -0
- rustfuzz-0.1.6/rustfuzz/distance/Soundex.py +99 -0
- rustfuzz-0.1.6/rustfuzz/distance/Soundex.pyi +32 -0
- rustfuzz-0.1.6/rustfuzz/distance/__init__.py +44 -0
- rustfuzz-0.1.6/rustfuzz/distance/_initialize.py +24 -0
- rustfuzz-0.1.6/rustfuzz/distance/_initialize.pyi +6 -0
- rustfuzz-0.1.6/rustfuzz/fuzz.py +55 -0
- rustfuzz-0.1.6/rustfuzz/fuzz.pyi +80 -0
- rustfuzz-0.1.6/rustfuzz/join.py +232 -0
- rustfuzz-0.1.6/rustfuzz/join.pyi +72 -0
- rustfuzz-0.1.6/rustfuzz/langchain.py +160 -0
- rustfuzz-0.1.6/rustfuzz/process.py +175 -0
- rustfuzz-0.1.6/rustfuzz/process.pyi +62 -0
- rustfuzz-0.1.6/rustfuzz/search.py +333 -0
- rustfuzz-0.1.6/rustfuzz/search.pyi +83 -0
- rustfuzz-0.1.6/rustfuzz/spark.py +183 -0
- rustfuzz-0.1.6/rustfuzz/utils.py +9 -0
- rustfuzz-0.1.6/rustfuzz/utils.pyi +4 -0
- rustfuzz-0.1.6/scifact/corpus.jsonl +5183 -0
- rustfuzz-0.1.6/scifact/qrels/test.tsv +340 -0
- rustfuzz-0.1.6/scifact/qrels/train.tsv +920 -0
- rustfuzz-0.1.6/scifact/queries.jsonl +1109 -0
- rustfuzz-0.1.6/src/algorithms.rs +1065 -0
- rustfuzz-0.1.6/src/distance/bktree.rs +155 -0
- rustfuzz-0.1.6/src/distance/gotoh.rs +190 -0
- rustfuzz-0.1.6/src/distance/initialize.rs +1056 -0
- rustfuzz-0.1.6/src/distance/metrics.rs +1210 -0
- rustfuzz-0.1.6/src/distance/mod.rs +8 -0
- rustfuzz-0.1.6/src/distance/ngram.rs +135 -0
- rustfuzz-0.1.6/src/distance/phonetic.rs +131 -0
- rustfuzz-0.1.6/src/fuzz.rs +780 -0
- rustfuzz-0.1.6/src/join.rs +746 -0
- rustfuzz-0.1.6/src/lib.rs +117 -0
- rustfuzz-0.1.6/src/process.rs +758 -0
- rustfuzz-0.1.6/src/search.rs +843 -0
- rustfuzz-0.1.6/src/types.rs +116 -0
- rustfuzz-0.1.6/src/utils.rs +21 -0
- rustfuzz-0.1.6/target/.rustc_info.json +1 -0
- rustfuzz-0.1.6/target/release/.cargo-lock +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/autocfg-f9331904756bbda2/dep-lib-autocfg +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/autocfg-f9331904756bbda2/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/autocfg-f9331904756bbda2/lib-autocfg +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/autocfg-f9331904756bbda2/lib-autocfg.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/cfg-if-b53176fc557a5330/dep-lib-cfg_if +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/cfg-if-b53176fc557a5330/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/cfg-if-b53176fc557a5330/lib-cfg_if +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/cfg-if-b53176fc557a5330/lib-cfg_if.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-deque-bee2a9d1f2011aee/dep-lib-crossbeam_deque +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-deque-bee2a9d1f2011aee/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-deque-bee2a9d1f2011aee/lib-crossbeam_deque +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-deque-bee2a9d1f2011aee/lib-crossbeam_deque.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-epoch-b4bb86b07f1bcf55/dep-lib-crossbeam_epoch +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-epoch-b4bb86b07f1bcf55/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-epoch-b4bb86b07f1bcf55/lib-crossbeam_epoch +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-epoch-b4bb86b07f1bcf55/lib-crossbeam_epoch.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-1e15490c5aff661e/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-1e15490c5aff661e/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-1e15490c5aff661e/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-1e15490c5aff661e/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-318c46b0e0a242a6/dep-lib-crossbeam_utils +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-318c46b0e0a242a6/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-318c46b0e0a242a6/lib-crossbeam_utils +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-318c46b0e0a242a6/lib-crossbeam_utils.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-95746cc3644d9699/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/crossbeam-utils-95746cc3644d9699/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/either-0b40d6290df7e8cb/dep-lib-either +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/either-0b40d6290df7e8cb/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/either-0b40d6290df7e8cb/lib-either +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/either-0b40d6290df7e8cb/lib-either.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/heck-e60c714152bf0b1b/dep-lib-heck +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/heck-e60c714152bf0b1b/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/heck-e60c714152bf0b1b/lib-heck +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/heck-e60c714152bf0b1b/lib-heck.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/indoc-f8a9fc09b69bcd5c/dep-lib-indoc +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/indoc-f8a9fc09b69bcd5c/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/indoc-f8a9fc09b69bcd5c/lib-indoc +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/indoc-f8a9fc09b69bcd5c/lib-indoc.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-4d570f8e59ff434c/dep-lib-libc +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-4d570f8e59ff434c/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-4d570f8e59ff434c/lib-libc +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-4d570f8e59ff434c/lib-libc.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-7402bd37dfec7b51/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-7402bd37dfec7b51/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-7402bd37dfec7b51/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-7402bd37dfec7b51/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-a02ebcc5cc96ba1e/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/libc-a02ebcc5cc96ba1e/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-0a71afae4b5835f1/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-0a71afae4b5835f1/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-0a71afae4b5835f1/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-0a71afae4b5835f1/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-e6d75e29cf5a1259/dep-lib-memoffset +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-e6d75e29cf5a1259/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-e6d75e29cf5a1259/lib-memoffset +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-e6d75e29cf5a1259/lib-memoffset.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-ff259f0509dd28e9/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/memoffset-ff259f0509dd28e9/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/once_cell-b665facdf79769c2/dep-lib-once_cell +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/once_cell-b665facdf79769c2/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/once_cell-b665facdf79769c2/lib-once_cell +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/once_cell-b665facdf79769c2/lib-once_cell.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/once_cell-ecb0a635ed658769/dep-lib-once_cell +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/once_cell-ecb0a635ed658769/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/once_cell-ecb0a635ed658769/lib-once_cell +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/once_cell-ecb0a635ed658769/lib-once_cell.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-16909ee8b5c369c3/dep-lib-proc_macro2 +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-16909ee8b5c369c3/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-16909ee8b5c369c3/lib-proc_macro2 +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-16909ee8b5c369c3/lib-proc_macro2.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-e4690d208f5a94d4/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-e4690d208f5a94d4/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-e5e2af30ed658bf0/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-e5e2af30ed658bf0/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-e5e2af30ed658bf0/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/proc-macro2-e5e2af30ed658bf0/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-04a773148e34cec3/dep-lib-pyo3 +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-04a773148e34cec3/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-04a773148e34cec3/lib-pyo3 +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-04a773148e34cec3/lib-pyo3.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-91eaf8fb26fe6a7c/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-91eaf8fb26fe6a7c/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-91eaf8fb26fe6a7c/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-91eaf8fb26fe6a7c/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-1bb2392f5c159917/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-1bb2392f5c159917/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-f1bc8b8b44b97954/dep-lib-pyo3_build_config +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-f1bc8b8b44b97954/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-f1bc8b8b44b97954/lib-pyo3_build_config +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-f1bc8b8b44b97954/lib-pyo3_build_config.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-f4dffd229795bc4a/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-f4dffd229795bc4a/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-f4dffd229795bc4a/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-build-config-f4dffd229795bc4a/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-fc8d4e98c4dcb4c9/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-fc8d4e98c4dcb4c9/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-5198ba9330a795df/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-5198ba9330a795df/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-5198ba9330a795df/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-5198ba9330a795df/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-95bd58d19598e4da/dep-lib-pyo3_ffi +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-95bd58d19598e4da/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-95bd58d19598e4da/lib-pyo3_ffi +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-95bd58d19598e4da/lib-pyo3_ffi.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-d0047d3862c5a738/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-ffi-d0047d3862c5a738/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-6d1fbd8a380ecd9f/dep-lib-pyo3_macros +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-6d1fbd8a380ecd9f/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-6d1fbd8a380ecd9f/lib-pyo3_macros +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-6d1fbd8a380ecd9f/lib-pyo3_macros.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-1bfe88ef579437aa/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-1bfe88ef579437aa/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-1bfe88ef579437aa/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-1bfe88ef579437aa/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-8d90836f6c407bb3/dep-lib-pyo3_macros_backend +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-8d90836f6c407bb3/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-8d90836f6c407bb3/lib-pyo3_macros_backend +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-8d90836f6c407bb3/lib-pyo3_macros_backend.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-eba8a539b6a0a29b/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/pyo3-macros-backend-eba8a539b6a0a29b/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-1f3afbc9cdb53d38/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-1f3afbc9cdb53d38/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-1f3afbc9cdb53d38/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-1f3afbc9cdb53d38/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-d796d2465dc83675/dep-lib-quote +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-d796d2465dc83675/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-d796d2465dc83675/lib-quote +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-d796d2465dc83675/lib-quote.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-f6ba11f3d09ce44d/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/quote-f6ba11f3d09ce44d/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-3fc69953452917c0/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-3fc69953452917c0/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-3fc69953452917c0/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-3fc69953452917c0/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-f8ea4605fd296832/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-f8ea4605fd296832/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-fe421e3471a7fc96/dep-lib-rayon_core +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-fe421e3471a7fc96/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-fe421e3471a7fc96/lib-rayon_core +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-core-fe421e3471a7fc96/lib-rayon_core.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-f5c1f57881497aed/dep-lib-rayon +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-f5c1f57881497aed/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-f5c1f57881497aed/lib-rayon +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rayon-f5c1f57881497aed/lib-rayon.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rustfuzz-fedbcfd3ce747c22/dep-lib-rustfuzz +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rustfuzz-fedbcfd3ce747c22/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rustfuzz-fedbcfd3ce747c22/lib-rustfuzz +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/rustfuzz-fedbcfd3ce747c22/lib-rustfuzz.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/syn-88d664ea50fb8ebf/dep-lib-syn +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/syn-88d664ea50fb8ebf/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/syn-88d664ea50fb8ebf/lib-syn +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/syn-88d664ea50fb8ebf/lib-syn.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-2d3560500bd3f077/run-build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-2d3560500bd3f077/run-build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-f4f26cf667fc33ce/dep-lib-target_lexicon +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-f4f26cf667fc33ce/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-f4f26cf667fc33ce/lib-target_lexicon +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-f4f26cf667fc33ce/lib-target_lexicon.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-f5f3179902a41c27/build-script-build-script-build +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-f5f3179902a41c27/build-script-build-script-build.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-f5f3179902a41c27/dep-build-script-build-script-build +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/target-lexicon-f5f3179902a41c27/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/unicode-ident-466cac9cefbe4130/dep-lib-unicode_ident +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/unicode-ident-466cac9cefbe4130/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/unicode-ident-466cac9cefbe4130/lib-unicode_ident +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/unicode-ident-466cac9cefbe4130/lib-unicode_ident.json +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/unindent-ce2d10cc6a6c6fa7/dep-lib-unindent +0 -0
- rustfuzz-0.1.6/target/release/.fingerprint/unindent-ce2d10cc6a6c6fa7/invoked.timestamp +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/unindent-ce2d10cc6a6c6fa7/lib-unindent +1 -0
- rustfuzz-0.1.6/target/release/.fingerprint/unindent-ce2d10cc6a6c6fa7/lib-unindent.json +1 -0
- rustfuzz-0.1.6/target/release/deps/autocfg-f9331904756bbda2.d +10 -0
- rustfuzz-0.1.6/target/release/deps/cfg_if-b53176fc557a5330.d +7 -0
- rustfuzz-0.1.6/target/release/deps/crossbeam_deque-bee2a9d1f2011aee.d +8 -0
- rustfuzz-0.1.6/target/release/deps/crossbeam_epoch-b4bb86b07f1bcf55.d +18 -0
- rustfuzz-0.1.6/target/release/deps/crossbeam_utils-318c46b0e0a242a6.d +19 -0
- rustfuzz-0.1.6/target/release/deps/either-0b40d6290df7e8cb.d +9 -0
- rustfuzz-0.1.6/target/release/deps/heck-e60c714152bf0b1b.d +15 -0
- rustfuzz-0.1.6/target/release/deps/indoc-f8a9fc09b69bcd5c.d +8 -0
- rustfuzz-0.1.6/target/release/deps/libautocfg-f9331904756bbda2.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libautocfg-f9331904756bbda2.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libc-4d570f8e59ff434c.d +45 -0
- rustfuzz-0.1.6/target/release/deps/libcfg_if-b53176fc557a5330.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libcfg_if-b53176fc557a5330.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libcrossbeam_deque-bee2a9d1f2011aee.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libcrossbeam_deque-bee2a9d1f2011aee.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libcrossbeam_epoch-b4bb86b07f1bcf55.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libcrossbeam_epoch-b4bb86b07f1bcf55.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libcrossbeam_utils-318c46b0e0a242a6.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libcrossbeam_utils-318c46b0e0a242a6.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libeither-0b40d6290df7e8cb.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libeither-0b40d6290df7e8cb.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libheck-e60c714152bf0b1b.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libheck-e60c714152bf0b1b.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libindoc-f8a9fc09b69bcd5c.dylib +0 -0
- rustfuzz-0.1.6/target/release/deps/liblibc-4d570f8e59ff434c.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/liblibc-4d570f8e59ff434c.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libmemoffset-e6d75e29cf5a1259.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libmemoffset-e6d75e29cf5a1259.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libonce_cell-b665facdf79769c2.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libonce_cell-b665facdf79769c2.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libonce_cell-ecb0a635ed658769.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libonce_cell-ecb0a635ed658769.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libproc_macro2-16909ee8b5c369c3.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libproc_macro2-16909ee8b5c369c3.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3-04a773148e34cec3.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3-04a773148e34cec3.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3_build_config-f1bc8b8b44b97954.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3_build_config-f1bc8b8b44b97954.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3_ffi-95bd58d19598e4da.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3_ffi-95bd58d19598e4da.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3_macros-6d1fbd8a380ecd9f.dylib +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3_macros_backend-8d90836f6c407bb3.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libpyo3_macros_backend-8d90836f6c407bb3.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libquote-d796d2465dc83675.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libquote-d796d2465dc83675.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/librayon-f5c1f57881497aed.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/librayon-f5c1f57881497aed.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/librayon_core-fe421e3471a7fc96.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/librayon_core-fe421e3471a7fc96.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/librustfuzz.dylib +0 -0
- rustfuzz-0.1.6/target/release/deps/libsyn-88d664ea50fb8ebf.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libsyn-88d664ea50fb8ebf.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libtarget_lexicon-f4f26cf667fc33ce.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libtarget_lexicon-f4f26cf667fc33ce.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libunicode_ident-466cac9cefbe4130.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libunicode_ident-466cac9cefbe4130.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/libunindent-ce2d10cc6a6c6fa7.rlib +0 -0
- rustfuzz-0.1.6/target/release/deps/libunindent-ce2d10cc6a6c6fa7.rmeta +0 -0
- rustfuzz-0.1.6/target/release/deps/memoffset-e6d75e29cf5a1259.d +10 -0
- rustfuzz-0.1.6/target/release/deps/once_cell-b665facdf79769c2.d +9 -0
- rustfuzz-0.1.6/target/release/deps/once_cell-ecb0a635ed658769.d +9 -0
- rustfuzz-0.1.6/target/release/deps/proc_macro2-16909ee8b5c369c3.d +17 -0
- rustfuzz-0.1.6/target/release/deps/pyo3-04a773148e34cec3.d +121 -0
- rustfuzz-0.1.6/target/release/deps/pyo3_build_config-f1bc8b8b44b97954.d +14 -0
- rustfuzz-0.1.6/target/release/deps/pyo3_ffi-95bd58d19598e4da.d +64 -0
- rustfuzz-0.1.6/target/release/deps/pyo3_macros-6d1fbd8a380ecd9f.d +7 -0
- rustfuzz-0.1.6/target/release/deps/pyo3_macros_backend-8d90836f6c407bb3.d +25 -0
- rustfuzz-0.1.6/target/release/deps/quote-d796d2465dc83675.d +13 -0
- rustfuzz-0.1.6/target/release/deps/rayon-f5c1f57881497aed.d +103 -0
- rustfuzz-0.1.6/target/release/deps/rayon_core-fe421e3471a7fc96.d +29 -0
- rustfuzz-0.1.6/target/release/deps/rustfuzz.d +12 -0
- rustfuzz-0.1.6/target/release/deps/syn-88d664ea50fb8ebf.d +57 -0
- rustfuzz-0.1.6/target/release/deps/target_lexicon-f4f26cf667fc33ce.d +15 -0
- rustfuzz-0.1.6/target/release/deps/unicode_ident-466cac9cefbe4130.d +8 -0
- rustfuzz-0.1.6/target/release/deps/unindent-ce2d10cc6a6c6fa7.d +8 -0
- rustfuzz-0.1.6/target/release/librustfuzz.d +1 -0
- rustfuzz-0.1.6/target/release/librustfuzz.dylib +0 -0
- rustfuzz-0.1.6/target/wheels/rustfuzz-3.14.3-cp310-abi3-macosx_11_0_arm64.whl +0 -0
- rustfuzz-0.1.6/tests/__init__.py +0 -0
- rustfuzz-0.1.6/tests/bench_bigdata.py +67 -0
- rustfuzz-0.1.6/tests/bench_join.py +229 -0
- rustfuzz-0.1.6/tests/bench_scaling.py +69 -0
- rustfuzz-0.1.6/tests/test_basic.py +287 -0
- rustfuzz-0.1.6/tests/test_benchmarks.py +627 -0
- rustfuzz-0.1.6/tests/test_bktree.py +24 -0
- rustfuzz-0.1.6/tests/test_bm25_variants.py +51 -0
- rustfuzz-0.1.6/tests/test_gotoh.py +49 -0
- rustfuzz-0.1.6/tests/test_join.py +469 -0
- rustfuzz-0.1.6/tests/test_ngram.py +22 -0
- rustfuzz-0.1.6/tests/test_phonetic.py +15 -0
- rustfuzz-0.1.6/tests/test_search.py +65 -0
- rustfuzz-0.1.6/tests/test_spark.py +218 -0
- rustfuzz-0.1.6/uv.lock +3339 -0
- rustfuzz-0.1.6/zensical.toml +34 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: push to main, monitor GitHub Actions CI, and verify docs deployment on GitHub Pages
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Push to Main and Monitor CI
|
|
6
|
+
|
|
7
|
+
After pushing commits or tags to `main`, always verify that the GitHub Actions CI pipeline passes before considering the work done.
|
|
8
|
+
|
|
9
|
+
// turbo-all
|
|
10
|
+
|
|
11
|
+
1. Push the current branch / tag to GitHub:
|
|
12
|
+
```
|
|
13
|
+
git push origin main
|
|
14
|
+
```
|
|
15
|
+
If pushing a tag, also run:
|
|
16
|
+
```
|
|
17
|
+
git push origin --tags
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Wait a few seconds for GitHub to register the new run, then find the latest workflow run ID:
|
|
21
|
+
```
|
|
22
|
+
gh run list --branch main --workflow ci.yml --limit 5
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Watch the run live in the terminal (replace `<RUN_ID>` with the ID from the previous step — pick the most recent one):
|
|
26
|
+
```
|
|
27
|
+
gh run watch <RUN_ID> --exit-status
|
|
28
|
+
```
|
|
29
|
+
This streams real-time job/step status and returns a non-zero exit code if the run fails.
|
|
30
|
+
|
|
31
|
+
4. If the run fails, inspect the failing job logs:
|
|
32
|
+
```
|
|
33
|
+
gh run view <RUN_ID> --log-failed
|
|
34
|
+
```
|
|
35
|
+
Read the output carefully, identify the root cause, fix the code, commit, and repeat from step 1.
|
|
36
|
+
|
|
37
|
+
5. Once `gh run watch` exits successfully (exit code 0), the CI is green.
|
|
38
|
+
|
|
39
|
+
6. Verify the `docs` job succeeded specifically:
|
|
40
|
+
```
|
|
41
|
+
gh run view <RUN_ID> --json jobs --jq '.jobs[] | select(.name | startswith("Deploy docs")) | {name, status, conclusion}'
|
|
42
|
+
```
|
|
43
|
+
Conclusion must be `success`. If it is `failure`, dump its logs:
|
|
44
|
+
```
|
|
45
|
+
gh run view <RUN_ID> --log-failed
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
7. Confirm the GitHub Pages site is live and reflects the latest content by fetching the docs URL:
|
|
49
|
+
```
|
|
50
|
+
curl -sI https://bmsuisse.github.io/rustfuzz/ | head -5
|
|
51
|
+
```
|
|
52
|
+
Expect `HTTP/2 200`. If you get a non-200 or a stale cache, wait ~60 s and retry — Pages deployments can lag slightly behind the CI job completion.
|
|
53
|
+
|
|
54
|
+
## Key CI jobs to watch
|
|
55
|
+
|
|
56
|
+
| Job | Trigger | What it does |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| `test` | every push to `main` | cargo check, maturin build, pytest, pyright |
|
|
59
|
+
| `docs` | push to `main` or tag | builds & deploys MkDocs → https://bmsuisse.github.io/rustfuzz/ |
|
|
60
|
+
| `linux / musllinux / windows / macos` | tags only | builds release wheels |
|
|
61
|
+
| `sdist` | tags only | builds source distribution |
|
|
62
|
+
| `release` | tags only | publishes to PyPI |
|
|
63
|
+
|
|
64
|
+
> **Note:** For a plain `main` push (no tag) only `test` and `docs` run.
|
|
65
|
+
> For a tagged release all jobs including `release` (PyPI publish) run.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Research → Build → Test → Benchmark → Repeat — the core optimisation loop for beating RapidFuzz
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Research → Build → Test → Benchmark → Repeat
|
|
6
|
+
|
|
7
|
+
This is the core AI-driven optimisation loop for rustfuzz.
|
|
8
|
+
Each iteration identifies a bottleneck, implements a Rust fix, validates correctness, and measures the gain against RapidFuzz.
|
|
9
|
+
|
|
10
|
+
> **Rule:** never skip the Test step. A faster but broken library is worthless.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 🔍 Step 1 — Research
|
|
15
|
+
|
|
16
|
+
Profile the current hottest path and identify what to improve next.
|
|
17
|
+
|
|
18
|
+
Run a quick benchmark first to get a baseline and see where time is spent:
|
|
19
|
+
```
|
|
20
|
+
uv run pytest tests/benchmarks/ -v --benchmark-only --benchmark-sort=mean 2>&1 | head -60
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If you need function-level profiling, use `py-spy` on a benchmark call:
|
|
24
|
+
```
|
|
25
|
+
uv run py-spy record -o profile.svg -- python -c "
|
|
26
|
+
import rustfuzz.process as p
|
|
27
|
+
import rapidfuzz.process as rf
|
|
28
|
+
choices = ['New York','Newark','New Orleans','Los Angeles'] * 5000
|
|
29
|
+
p.extract('new york', choices, limit=5)
|
|
30
|
+
"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Identify the specific Rust function or Python↔Rust boundary causing overhead.
|
|
34
|
+
Document the hypothesis: _"the bottleneck is X because Y"_.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🦀 Step 2 — Build
|
|
39
|
+
|
|
40
|
+
Implement the fix in Rust and rebuild the extension module.
|
|
41
|
+
|
|
42
|
+
Make your Rust changes in `src/`, then build in dev mode:
|
|
43
|
+
// turbo
|
|
44
|
+
```
|
|
45
|
+
uv run maturin develop --release
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Check that the Rust code compiles cleanly with no warnings:
|
|
49
|
+
// turbo
|
|
50
|
+
```
|
|
51
|
+
cargo check 2>&1
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## ✅ Step 3 — Test
|
|
57
|
+
|
|
58
|
+
**All tests must pass before proceeding.** No exceptions.
|
|
59
|
+
|
|
60
|
+
// turbo
|
|
61
|
+
```
|
|
62
|
+
uv run pytest tests/ -x -q
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If any test fails, go back to Step 2 and fix the regression before moving on.
|
|
66
|
+
|
|
67
|
+
Also run pyright to catch any type errors introduced in Python stubs or wrappers:
|
|
68
|
+
// turbo
|
|
69
|
+
```
|
|
70
|
+
uv run pyright
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 📊 Step 4 — Benchmark
|
|
76
|
+
|
|
77
|
+
Run the full benchmark suite and compare against RapidFuzz.
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
uv run pytest tests/benchmarks/ -v --benchmark-only --benchmark-compare --benchmark-sort=mean
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Key metrics to record for each function (`ratio`, `partial_ratio`, `token_sort_ratio`, `process.extract`, `process.extractOne`):
|
|
84
|
+
|
|
85
|
+
| Metric | Target |
|
|
86
|
+
|--------|--------|
|
|
87
|
+
| Mean time | ≤ RapidFuzz mean |
|
|
88
|
+
| Min time | competitive |
|
|
89
|
+
| Throughput | ≥ RapidFuzz |
|
|
90
|
+
|
|
91
|
+
Save the results for comparison in the next iteration:
|
|
92
|
+
```
|
|
93
|
+
uv run pytest tests/benchmarks/ -v --benchmark-only --benchmark-save=iteration_N
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Interpret the results:
|
|
97
|
+
- **Better** → document the gain, pick the next bottleneck → Step 5.
|
|
98
|
+
- **Worse / no change** → revisit the approach in Step 1.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 🔁 Step 5 — Repeat
|
|
103
|
+
|
|
104
|
+
Pick the next biggest gap from the benchmark output and go back to Step 1.
|
|
105
|
+
|
|
106
|
+
Useful questions to guide the next Research phase:
|
|
107
|
+
- Which function is still slowest relative to RapidFuzz?
|
|
108
|
+
- Is the bottleneck in the algorithm itself, the Python↔Rust boundary, or string allocation?
|
|
109
|
+
- Can batch operations (`cdist`, `extract`) be parallelised with Rayon?
|
|
110
|
+
- Are we paying for UTF-8 re-encoding on every call?
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Quick-reference commands
|
|
115
|
+
|
|
116
|
+
| Command | Purpose |
|
|
117
|
+
|---------|---------|
|
|
118
|
+
| `uv run maturin develop --release` | Rebuild Rust extension (optimised) |
|
|
119
|
+
| `cargo check` | Fast compile check without linking |
|
|
120
|
+
| `uv run pytest tests/ -x -q` | Full test suite, stop on first failure |
|
|
121
|
+
| `uv run pyright` | Type-check Python stubs |
|
|
122
|
+
| `uv run pytest tests/benchmarks/ -v --benchmark-only` | Full benchmark run |
|
|
123
|
+
| `uv run pytest tests/benchmarks/ -k ratio --benchmark-only` | Benchmark a single function |
|
|
124
|
+
| `uv run pytest tests/benchmarks/ --benchmark-compare` | Compare vs saved baseline |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Keep GitHub Actions up to date with GitHub's Dependabot...
|
|
2
|
+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
|
|
3
|
+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
|
|
4
|
+
version: 2
|
|
5
|
+
updates:
|
|
6
|
+
- package-ecosystem: github-actions
|
|
7
|
+
directory: /
|
|
8
|
+
groups:
|
|
9
|
+
github-actions:
|
|
10
|
+
patterns:
|
|
11
|
+
- "*" # Group all Actions updates into a single larger pull request
|
|
12
|
+
schedule:
|
|
13
|
+
interval: weekly
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Based on httpxr reference CI
|
|
2
|
+
name: CI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- '*'
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
timeout-minutes: 25
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-python@v6
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
allow-prereleases: true
|
|
28
|
+
|
|
29
|
+
- name: Install Rust toolchain
|
|
30
|
+
uses: dtolnay/rust-toolchain@stable
|
|
31
|
+
|
|
32
|
+
- name: Rust cache
|
|
33
|
+
uses: Swatinem/rust-cache@v2
|
|
34
|
+
with:
|
|
35
|
+
key: py${{ matrix.python-version }}
|
|
36
|
+
|
|
37
|
+
- name: Cargo check
|
|
38
|
+
run: cargo check --all-targets
|
|
39
|
+
|
|
40
|
+
- name: Install uv
|
|
41
|
+
uses: astral-sh/setup-uv@v7
|
|
42
|
+
|
|
43
|
+
- name: Build & install (maturin develop)
|
|
44
|
+
run: uv run maturin develop --release
|
|
45
|
+
|
|
46
|
+
- name: Run pytest
|
|
47
|
+
run: uv run pytest tests/ -q -x
|
|
48
|
+
|
|
49
|
+
- name: Run basedpyright
|
|
50
|
+
run: uv run basedpyright rustfuzz/
|
|
51
|
+
|
|
52
|
+
- name: Run ruff
|
|
53
|
+
run: |
|
|
54
|
+
uv run ruff check
|
|
55
|
+
uv run ruff format --check
|
|
56
|
+
|
|
57
|
+
linux:
|
|
58
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
59
|
+
needs: [test]
|
|
60
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
61
|
+
strategy:
|
|
62
|
+
matrix:
|
|
63
|
+
platform:
|
|
64
|
+
- runner: ubuntu-24.04
|
|
65
|
+
target: x86_64
|
|
66
|
+
- runner: ubuntu-24.04-arm
|
|
67
|
+
target: aarch64
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v6
|
|
70
|
+
- uses: actions/setup-python@v6
|
|
71
|
+
with:
|
|
72
|
+
python-version: 3.x
|
|
73
|
+
- name: Build wheels
|
|
74
|
+
uses: PyO3/maturin-action@v1
|
|
75
|
+
with:
|
|
76
|
+
target: ${{ matrix.platform.target }}
|
|
77
|
+
args: --release --out dist --find-interpreter
|
|
78
|
+
sccache: true
|
|
79
|
+
manylinux: auto
|
|
80
|
+
- name: Upload wheels
|
|
81
|
+
uses: actions/upload-artifact@v6
|
|
82
|
+
with:
|
|
83
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
84
|
+
path: dist
|
|
85
|
+
|
|
86
|
+
musllinux:
|
|
87
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
88
|
+
needs: [test]
|
|
89
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
90
|
+
strategy:
|
|
91
|
+
matrix:
|
|
92
|
+
platform:
|
|
93
|
+
- runner: ubuntu-24.04
|
|
94
|
+
target: x86_64
|
|
95
|
+
- runner: ubuntu-24.04-arm
|
|
96
|
+
target: aarch64
|
|
97
|
+
steps:
|
|
98
|
+
- uses: actions/checkout@v6
|
|
99
|
+
- uses: actions/setup-python@v6
|
|
100
|
+
with:
|
|
101
|
+
python-version: 3.x
|
|
102
|
+
- name: Build wheels
|
|
103
|
+
uses: PyO3/maturin-action@v1
|
|
104
|
+
with:
|
|
105
|
+
target: ${{ matrix.platform.target }}
|
|
106
|
+
args: --release --out dist --find-interpreter
|
|
107
|
+
sccache: true
|
|
108
|
+
manylinux: musllinux_1_2
|
|
109
|
+
- name: Upload wheels
|
|
110
|
+
uses: actions/upload-artifact@v6
|
|
111
|
+
with:
|
|
112
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
113
|
+
path: dist
|
|
114
|
+
|
|
115
|
+
windows:
|
|
116
|
+
runs-on: windows-latest
|
|
117
|
+
needs: [test]
|
|
118
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
119
|
+
steps:
|
|
120
|
+
- uses: actions/checkout@v6
|
|
121
|
+
- uses: actions/setup-python@v6
|
|
122
|
+
with:
|
|
123
|
+
python-version: '3.13'
|
|
124
|
+
- name: Build wheels
|
|
125
|
+
uses: PyO3/maturin-action@v1
|
|
126
|
+
with:
|
|
127
|
+
target: x64
|
|
128
|
+
args: --release --out dist --find-interpreter
|
|
129
|
+
sccache: true
|
|
130
|
+
- name: Upload wheels
|
|
131
|
+
uses: actions/upload-artifact@v6
|
|
132
|
+
with:
|
|
133
|
+
name: wheels-windows-x64
|
|
134
|
+
path: dist
|
|
135
|
+
|
|
136
|
+
macos:
|
|
137
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
138
|
+
needs: [test]
|
|
139
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
140
|
+
strategy:
|
|
141
|
+
matrix:
|
|
142
|
+
platform:
|
|
143
|
+
- runner: macos-14
|
|
144
|
+
target: aarch64
|
|
145
|
+
- runner: macos-15-intel
|
|
146
|
+
target: x86_64
|
|
147
|
+
steps:
|
|
148
|
+
- uses: actions/checkout@v6
|
|
149
|
+
- uses: actions/setup-python@v6
|
|
150
|
+
with:
|
|
151
|
+
python-version: 3.x
|
|
152
|
+
- name: Build wheels
|
|
153
|
+
uses: PyO3/maturin-action@v1
|
|
154
|
+
with:
|
|
155
|
+
target: ${{ matrix.platform.target }}
|
|
156
|
+
args: --release --out dist --find-interpreter
|
|
157
|
+
sccache: true
|
|
158
|
+
- name: Upload wheels
|
|
159
|
+
uses: actions/upload-artifact@v6
|
|
160
|
+
with:
|
|
161
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
162
|
+
path: dist
|
|
163
|
+
|
|
164
|
+
sdist:
|
|
165
|
+
runs-on: ubuntu-latest
|
|
166
|
+
needs: [test]
|
|
167
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
168
|
+
steps:
|
|
169
|
+
- uses: actions/checkout@v6
|
|
170
|
+
- name: Build sdist
|
|
171
|
+
uses: PyO3/maturin-action@v1
|
|
172
|
+
with:
|
|
173
|
+
command: sdist
|
|
174
|
+
args: --out dist
|
|
175
|
+
- name: Upload sdist
|
|
176
|
+
uses: actions/upload-artifact@v6
|
|
177
|
+
with:
|
|
178
|
+
name: wheels-sdist
|
|
179
|
+
path: dist
|
|
180
|
+
|
|
181
|
+
release:
|
|
182
|
+
name: Release to PyPI
|
|
183
|
+
runs-on: ubuntu-latest
|
|
184
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
185
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
186
|
+
environment: pypi-release
|
|
187
|
+
permissions:
|
|
188
|
+
id-token: write
|
|
189
|
+
steps:
|
|
190
|
+
- uses: actions/download-artifact@v7
|
|
191
|
+
with:
|
|
192
|
+
path: dist
|
|
193
|
+
pattern: wheels-*
|
|
194
|
+
merge-multiple: true
|
|
195
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
196
|
+
|
|
197
|
+
docs:
|
|
198
|
+
name: Deploy docs
|
|
199
|
+
runs-on: ubuntu-latest
|
|
200
|
+
needs: [test]
|
|
201
|
+
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
|
|
202
|
+
environment:
|
|
203
|
+
name: github-pages
|
|
204
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
205
|
+
permissions:
|
|
206
|
+
contents: read
|
|
207
|
+
pages: write
|
|
208
|
+
id-token: write
|
|
209
|
+
steps:
|
|
210
|
+
- uses: actions/configure-pages@v5
|
|
211
|
+
- uses: actions/checkout@v6
|
|
212
|
+
|
|
213
|
+
- name: Install uv
|
|
214
|
+
uses: astral-sh/setup-uv@v7
|
|
215
|
+
|
|
216
|
+
- name: Install docs dependencies
|
|
217
|
+
run: uv sync --group docs
|
|
218
|
+
|
|
219
|
+
- name: Build docs
|
|
220
|
+
run: uv run mkdocs build --clean
|
|
221
|
+
|
|
222
|
+
- uses: actions/upload-pages-artifact@v4
|
|
223
|
+
with:
|
|
224
|
+
path: site
|
|
225
|
+
|
|
226
|
+
- uses: actions/deploy-pages@v4
|
|
227
|
+
id: deployment
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.vscode/
|
|
2
|
+
__pycache__/
|
|
3
|
+
.idea/
|
|
4
|
+
.venv/
|
|
5
|
+
build/
|
|
6
|
+
_skbuild/
|
|
7
|
+
rapidfuzz.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
*.data
|
|
10
|
+
*.so
|
|
11
|
+
*.o
|
|
12
|
+
*.out
|
|
13
|
+
test.py
|
|
14
|
+
src/*.html
|
|
15
|
+
.coverage
|
|
16
|
+
coverage.xml
|
|
17
|
+
sde/
|
|
18
|
+
|
|
19
|
+
# Sphinx documentation
|
|
20
|
+
site/
|
|
21
|
+
|
|
22
|
+
# benchmark results
|
|
23
|
+
bench_results/
|
|
24
|
+
|
|
25
|
+
# Hypothesis results
|
|
26
|
+
.hypothesis/
|
|
27
|
+
|
|
28
|
+
# Cython generated files
|
|
29
|
+
*.cxx
|
|
30
|
+
|
|
31
|
+
# temp files from benchmarks
|
|
32
|
+
bench/temp/
|
|
33
|
+
|
|
34
|
+
# Rust build artifacts
|
|
35
|
+
target/
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# To use:
|
|
2
|
+
#
|
|
3
|
+
# pre-commit run -a
|
|
4
|
+
#
|
|
5
|
+
# Or:
|
|
6
|
+
#
|
|
7
|
+
# pre-commit install # (runs every time you commit in git)
|
|
8
|
+
#
|
|
9
|
+
# To update this file:
|
|
10
|
+
#
|
|
11
|
+
# pre-commit autoupdate
|
|
12
|
+
#
|
|
13
|
+
# See https://github.com/pre-commit/pre-commit
|
|
14
|
+
|
|
15
|
+
repos:
|
|
16
|
+
# Standard hooks
|
|
17
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
18
|
+
rev: "v5.0.0"
|
|
19
|
+
hooks:
|
|
20
|
+
- id: check-added-large-files
|
|
21
|
+
- id: check-case-conflict
|
|
22
|
+
- id: check-docstring-first
|
|
23
|
+
- id: check-merge-conflict
|
|
24
|
+
- id: check-symlinks
|
|
25
|
+
- id: check-toml
|
|
26
|
+
- id: check-yaml
|
|
27
|
+
- id: debug-statements
|
|
28
|
+
- id: end-of-file-fixer
|
|
29
|
+
- id: mixed-line-ending
|
|
30
|
+
- id: requirements-txt-fixer
|
|
31
|
+
- id: trailing-whitespace
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Changes tabs to spaces
|
|
36
|
+
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
|
37
|
+
rev: "v1.5.5"
|
|
38
|
+
hooks:
|
|
39
|
+
- id: remove-tabs
|
|
40
|
+
|
|
41
|
+
- repo: https://github.com/sirosen/texthooks
|
|
42
|
+
rev: "0.6.8"
|
|
43
|
+
hooks:
|
|
44
|
+
- id: fix-ligatures
|
|
45
|
+
- id: fix-smartquotes
|
|
46
|
+
|
|
47
|
+
# Checking for common mistakes
|
|
48
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
49
|
+
rev: "v1.10.0"
|
|
50
|
+
hooks:
|
|
51
|
+
- id: rst-backticks
|
|
52
|
+
- id: rst-directive-colons
|
|
53
|
+
- id: rst-inline-touching-normal
|
|
54
|
+
|
|
55
|
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
56
|
+
rev: v0.11.5
|
|
57
|
+
hooks:
|
|
58
|
+
- id: ruff
|
|
59
|
+
args: ["--fix", "--show-fixes"]
|
|
60
|
+
- id: ruff-format
|
|
61
|
+
|
|
62
|
+
# Check for spelling
|
|
63
|
+
- repo: https://github.com/codespell-project/codespell
|
|
64
|
+
rev: "v2.4.1"
|
|
65
|
+
hooks:
|
|
66
|
+
- id: codespell
|
|
67
|
+
exclude: ".*/test_.*.py"
|
|
68
|
+
|
|
69
|
+
# Check for common shell mistakes
|
|
70
|
+
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
71
|
+
rev: "v0.10.0.1"
|
|
72
|
+
hooks:
|
|
73
|
+
- id: shellcheck
|
|
74
|
+
|
|
75
|
+
# Disallow some common capitalization mistakes
|
|
76
|
+
- repo: local
|
|
77
|
+
hooks:
|
|
78
|
+
- id: disallow-caps
|
|
79
|
+
name: Disallow improper capitalization
|
|
80
|
+
language: pygrep
|
|
81
|
+
entry: PyBind|Numpy|Cmake|CCache|PyTest
|
|
82
|
+
exclude: ^\.pre-commit-config.yaml$
|
rustfuzz-0.1.6/AGENTS.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# rustfuzz Agent Guidelines
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
|
|
5
|
+
rustfuzz is a high-performance fuzzy string matching library implemented entirely in Rust, published as `rustfuzz` on PyPI. It uses:
|
|
6
|
+
- **Rust** (via PyO3 + maturin) for all core fuzzy-matching algorithms
|
|
7
|
+
- **Python** (3.10+) for the public API surface — thin wrappers that re-export Rust symbols
|
|
8
|
+
- **uv** for Python package management
|
|
9
|
+
|
|
10
|
+
## Architecture
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
src/ ← Rust source (compiled as rustfuzz._rustfuzz)
|
|
14
|
+
lib.rs ← PyO3 module root — fn _rustfuzz
|
|
15
|
+
algorithms.rs ← Core algorithm implementations (Myers, LCS, Jaro, etc.)
|
|
16
|
+
fuzz.rs ← ratio, partial_ratio, token_*, WRatio, QRatio
|
|
17
|
+
utils.rs ← default_process
|
|
18
|
+
types.rs ← Seq type + Python object extraction helpers
|
|
19
|
+
distance/
|
|
20
|
+
mod.rs
|
|
21
|
+
initialize.rs ← Editop, Editops, Opcode, Opcodes, MatchingBlock, ScoreAlignment
|
|
22
|
+
metrics.rs ← All distance/similarity pyfunction wrappers
|
|
23
|
+
rustfuzz/ ← Python package (thin wrappers, imports from ._rustfuzz)
|
|
24
|
+
Cargo.toml ← lib name = "_rustfuzz"
|
|
25
|
+
pyproject.toml ← module-name = "rustfuzz._rustfuzz"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Public API Surface
|
|
29
|
+
|
|
30
|
+
### `rustfuzz.fuzz`
|
|
31
|
+
`ratio`, `partial_ratio`, `partial_ratio_alignment`, `token_sort_ratio`, `token_set_ratio`,
|
|
32
|
+
`token_ratio`, `partial_token_sort_ratio`, `partial_token_set_ratio`, `partial_token_ratio`,
|
|
33
|
+
`WRatio`, `QRatio`
|
|
34
|
+
|
|
35
|
+
### `rustfuzz.process`
|
|
36
|
+
`extract`, `extractOne`, `extract_iter`, `cdist`
|
|
37
|
+
|
|
38
|
+
### `rustfuzz.utils`
|
|
39
|
+
`default_process`
|
|
40
|
+
|
|
41
|
+
### `rustfuzz.distance`
|
|
42
|
+
**Data types:** `Editop`, `Editops`, `Opcode`, `Opcodes`, `MatchingBlock`, `ScoreAlignment`
|
|
43
|
+
|
|
44
|
+
**Per-metric (all modules):** `distance`, `similarity`, `normalized_distance`,
|
|
45
|
+
`normalized_similarity`, `editops` (where applicable), `opcodes` (where applicable)
|
|
46
|
+
|
|
47
|
+
**Modules:** `Levenshtein`, `Hamming`, `Indel`, `Jaro`, `JaroWinkler`, `LCSseq`,
|
|
48
|
+
`OSA`, `DamerauLevenshtein`, `Prefix`, `Postfix`
|
|
49
|
+
|
|
50
|
+
## Critical Rules
|
|
51
|
+
|
|
52
|
+
### Always Use `uv`
|
|
53
|
+
- **All Python commands MUST use `uv run`** — never use `.venv/bin/python` or bare `python`
|
|
54
|
+
- Tests: `uv run pytest tests/ -x -q`
|
|
55
|
+
- Benchmarks: `uv run pytest tests/test_benchmarks.py --benchmark-save=baseline`
|
|
56
|
+
- Benchmark regression: `uv run pytest tests/test_benchmarks.py --benchmark-compare=baseline --benchmark-compare-fail=mean:10%`
|
|
57
|
+
- Type checking: `uv run pyright`
|
|
58
|
+
- Smoke test: `uv run python -c "import rustfuzz; print(rustfuzz.__version__)"`
|
|
59
|
+
|
|
60
|
+
### Build Workflow
|
|
61
|
+
1. `cargo check` — fast compilation check
|
|
62
|
+
2. `uv run maturin develop --release` — build optimised `.so`
|
|
63
|
+
|
|
64
|
+
### Pre-Commit Checklist
|
|
65
|
+
1. `cargo check` — no Rust errors
|
|
66
|
+
2. `uv run maturin develop --release`
|
|
67
|
+
3. `uv run pytest tests/ -x -q` — all tests must pass
|
|
68
|
+
4. `uv run pytest tests/test_benchmarks.py --benchmark-compare=baseline --benchmark-compare-fail=mean:10%` — no regressions
|
|
69
|
+
5. `uv run pyright` — type checking passes
|
|
70
|
+
|
|
71
|
+
### File Size Limit
|
|
72
|
+
- No file should exceed 1000 lines of code
|
|
73
|
+
|
|
74
|
+
### Testing
|
|
75
|
+
- Always run the **full** original test suite before committing
|
|
76
|
+
- Run e2e tests after implementing new features
|
|
77
|
+
- Create a branch for each feature/algorithm group
|
|
78
|
+
|
|
79
|
+
### Implementation Strategy
|
|
80
|
+
- Each metric module (`Levenshtein`, `Hamming`, etc.) must agree with the reference algorithms
|
|
81
|
+
- `process.cdist` consumes any scorer callable accepting `(str, str, **kwargs) -> float`
|
|
82
|
+
- Benchmarks baseline is saved in `.benchmarks/` — commit it so CI can compare
|
|
83
|
+
|
|
84
|
+
## Releasing a New Version
|
|
85
|
+
|
|
86
|
+
The CI automatically builds wheels for all platforms, generates a changelog, and publishes
|
|
87
|
+
to PyPI when a **git tag** is pushed.
|
|
88
|
+
|
|
89
|
+
### Steps
|
|
90
|
+
1. **Bump version** in `Cargo.toml` (the `version` field under `[package]`)
|
|
91
|
+
2. **Commit** the version bump: `git commit -am "release: v0.X.Y"`
|
|
92
|
+
3. **Tag** the commit: `git tag v0.X.Y`
|
|
93
|
+
4. **Push** the tag: `git push origin main && git push origin v0.X.Y`
|
|
94
|
+
5. CI will:
|
|
95
|
+
- Run tests on all Python versions
|
|
96
|
+
- Build wheels (linux, musllinux, macos, windows)
|
|
97
|
+
- Generate changelog from conventional commits (via `git-cliff`)
|
|
98
|
+
- Publish to PyPI
|
|
99
|
+
- Create GitHub Release with changelog and wheel assets
|
|
100
|
+
|
|
101
|
+
### Commit Convention
|
|
102
|
+
Use [Conventional Commits](https://www.conventionalcommits.org/) for automatic changelog
|
|
103
|
+
categorization:
|
|
104
|
+
|
|
105
|
+
| Prefix | Category | Example |
|
|
106
|
+
|--------|----------|---------|
|
|
107
|
+
| `feat:` | 🚀 Features | `feat: implement Jaro-Winkler in Rust` |
|
|
108
|
+
| `fix:` | 🐛 Bug Fixes | `fix: handle empty string in partial_ratio` |
|
|
109
|
+
| `perf:` | ⚡ Performance | `perf: use SIMD in Levenshtein` |
|
|
110
|
+
| `refactor:` | 🔧 Refactoring | `refactor: split distance module` |
|
|
111
|
+
| `docs:` | 📖 Documentation | `docs: update README` |
|
|
112
|
+
| `ci:` | 🔄 CI/CD | `ci: add Python 3.13 to matrix` |
|
|
113
|
+
| `chore:` | 📦 Miscellaneous | `chore: update deps` |
|
|
114
|
+
| `release:` | _(skipped)_ | `release: v3.15.0` |
|
|
115
|
+
|
|
116
|
+
### Verify Before Releasing
|
|
117
|
+
```bash
|
|
118
|
+
cargo check
|
|
119
|
+
uv run maturin develop --release
|
|
120
|
+
uv run pytest tests/ -x -q
|
|
121
|
+
uv run pytest tests/test_benchmarks.py --benchmark-compare=baseline --benchmark-compare-fail=mean:10%
|
|
122
|
+
uv run pyright
|
|
123
|
+
```
|