fuzzbite 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ # GitHub provides this image; actionlint's built-in runner list has not caught up.
2
+ self-hosted-runner:
3
+ labels:
4
+ - ubuntu-26.04-arm
@@ -0,0 +1,32 @@
1
+ name: Benchmarks
2
+ on:
3
+ workflow_dispatch:
4
+
5
+ permissions:
6
+ contents: read
7
+
8
+ concurrency:
9
+ group: benchmark-${{ github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ benchmark:
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 30
16
+ steps:
17
+ - uses: actions/checkout@main
18
+ with:
19
+ persist-credentials: false
20
+ - uses: astral-sh/setup-uv@main
21
+ with:
22
+ version: latest
23
+ python-version: '3'
24
+ enable-cache: true
25
+ - uses: dtolnay/rust-toolchain@stable
26
+ - run: uv sync --locked
27
+ - run: uv run --locked python -m benchmarks.run --output benchmark-results.json
28
+ - uses: actions/upload-artifact@main
29
+ with:
30
+ name: benchmark-results
31
+ path: benchmark-results.json
32
+ if-no-files-found: error
@@ -0,0 +1,90 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches: [main, master]
5
+ pull_request:
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: ci-${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ env:
16
+ CARGO_TERM_COLOR: always
17
+
18
+ jobs:
19
+ checks:
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python: ['3.10', '3.11', '3.12', '3.13', '3.14', '3']
25
+ steps:
26
+ - uses: actions/checkout@main
27
+ with:
28
+ persist-credentials: false
29
+ - uses: astral-sh/setup-uv@main
30
+ with:
31
+ version: latest
32
+ python-version: ${{ matrix.python }}
33
+ enable-cache: true
34
+ - uses: dtolnay/rust-toolchain@stable
35
+ with:
36
+ components: rustfmt, clippy
37
+ - uses: actions/cache@main
38
+ with:
39
+ path: |
40
+ ~/.cargo/registry
41
+ ~/.cargo/git
42
+ key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Cargo.lock') }}
43
+ - run: uv sync --locked
44
+ - name: Rust checks
45
+ if: matrix.python == '3'
46
+ run: |
47
+ export PYO3_PYTHON="$GITHUB_WORKSPACE/.venv/bin/python"
48
+ cargo fmt --check
49
+ cargo clippy --locked --all-targets -- -D warnings
50
+ cargo test --locked
51
+ - run: uv run --locked ruff check .
52
+ - run: uv run --locked ruff format --check .
53
+ - run: uv run --locked python -m pytest -q
54
+
55
+ distributions:
56
+ strategy:
57
+ fail-fast: false
58
+ matrix:
59
+ runner: [ubuntu-latest, ubuntu-26.04-arm, macos-latest]
60
+ runs-on: ${{ matrix.runner }}
61
+ steps:
62
+ - uses: actions/checkout@main
63
+ with:
64
+ persist-credentials: false
65
+ - uses: astral-sh/setup-uv@main
66
+ with:
67
+ version: latest
68
+ python-version: '3'
69
+ enable-cache: true
70
+ - uses: dtolnay/rust-toolchain@stable
71
+ - uses: actions/cache@main
72
+ with:
73
+ path: |
74
+ ~/.cargo/registry
75
+ ~/.cargo/git
76
+ key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Cargo.lock') }}
77
+ - name: Use honest native Linux tags
78
+ if: runner.os == 'Linux'
79
+ run: echo 'MATURIN_PEP517_ARGS=--compatibility linux' >> "$GITHUB_ENV"
80
+ - run: uv sync --locked
81
+ - run: uv run --locked python -m pytest -q
82
+ - name: Build sdist and wheel through PEP 517
83
+ run: uv build
84
+ - name: Rebuild sdist and smoke clean wheel installations on every supported Python
85
+ run: uv run --locked python scripts/validate_artifacts.py
86
+ - uses: actions/upload-artifact@main
87
+ with:
88
+ name: distributions-${{ matrix.runner }}
89
+ path: dist/*
90
+ if-no-files-found: error
@@ -0,0 +1,78 @@
1
+ name: Publish to PyPI
2
+ on:
3
+ release:
4
+ types: [published]
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ concurrency:
10
+ group: pypi-release
11
+ cancel-in-progress: false
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: macos-latest
16
+ timeout-minutes: 30
17
+ steps:
18
+ - uses: actions/checkout@main
19
+ with:
20
+ persist-credentials: false
21
+ - uses: astral-sh/setup-uv@main
22
+ with:
23
+ version: latest
24
+ python-version: '3'
25
+ enable-cache: true
26
+ - uses: dtolnay/rust-toolchain@stable
27
+ with:
28
+ components: rustfmt, clippy
29
+ - name: Check release version
30
+ env:
31
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
32
+ run: |
33
+ uv run --no-project python - <<'PY'
34
+ import os
35
+ import tomllib
36
+ from pathlib import Path
37
+
38
+ project = tomllib.loads(Path("pyproject.toml").read_text())["project"]
39
+ crate = tomllib.loads(Path("Cargo.toml").read_text())["package"]
40
+ assert project["version"] == crate["version"], "Package versions differ"
41
+ assert os.environ["RELEASE_TAG"] == f"v{project['version']}", "Release tag differs from package version"
42
+ PY
43
+ - run: uv sync --locked
44
+ - name: Check Rust
45
+ run: |
46
+ export PYO3_PYTHON="$GITHUB_WORKSPACE/.venv/bin/python"
47
+ cargo fmt --check
48
+ cargo clippy --locked --all-targets -- -D warnings
49
+ cargo test --locked
50
+ - run: uv run --locked ruff check .
51
+ - run: uv run --locked ruff format --check .
52
+ - run: uv run --locked python -m pytest -q
53
+ - run: uv build
54
+ - run: uv run --locked python scripts/validate_artifacts.py
55
+ - uses: actions/upload-artifact@main
56
+ with:
57
+ name: pypi-distributions
58
+ path: |
59
+ dist/*.tar.gz
60
+ dist/*.whl
61
+ if-no-files-found: error
62
+
63
+ publish:
64
+ needs: build
65
+ runs-on: ubuntu-latest
66
+ timeout-minutes: 10
67
+ environment:
68
+ name: pypi
69
+ url: https://pypi.org/p/fuzzbite
70
+ permissions:
71
+ id-token: write
72
+ steps:
73
+ - uses: actions/download-artifact@main
74
+ with:
75
+ name: pypi-distributions
76
+ path: dist
77
+ - name: Publish distributions
78
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,10 @@
1
+ .venv*/
2
+ /target/
3
+ /dist/
4
+ __pycache__/
5
+ *.py[cod]
6
+ *.so
7
+ *.dylib
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ /benchmark-results.json
@@ -0,0 +1,162 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "cfg-if"
7
+ version = "1.0.4"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
10
+
11
+ [[package]]
12
+ name = "ffuzzy"
13
+ version = "0.3.16"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "ce4602f12666608260e6b31f021f3699cacbdeaf80519860d79512458d94485f"
16
+ dependencies = [
17
+ "cfg-if",
18
+ "static_assertions",
19
+ "version_check",
20
+ ]
21
+
22
+ [[package]]
23
+ name = "fuzzbite"
24
+ version = "0.1.0"
25
+ dependencies = [
26
+ "ffuzzy",
27
+ "pyo3",
28
+ ]
29
+
30
+ [[package]]
31
+ name = "heck"
32
+ version = "0.5.0"
33
+ source = "registry+https://github.com/rust-lang/crates.io-index"
34
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
35
+
36
+ [[package]]
37
+ name = "libc"
38
+ version = "0.2.189"
39
+ source = "registry+https://github.com/rust-lang/crates.io-index"
40
+ checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
41
+
42
+ [[package]]
43
+ name = "once_cell"
44
+ version = "1.21.4"
45
+ source = "registry+https://github.com/rust-lang/crates.io-index"
46
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
47
+
48
+ [[package]]
49
+ name = "portable-atomic"
50
+ version = "1.15.0"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
53
+
54
+ [[package]]
55
+ name = "proc-macro2"
56
+ version = "1.0.107"
57
+ source = "registry+https://github.com/rust-lang/crates.io-index"
58
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
59
+ dependencies = [
60
+ "unicode-ident",
61
+ ]
62
+
63
+ [[package]]
64
+ name = "pyo3"
65
+ version = "0.29.2"
66
+ source = "registry+https://github.com/rust-lang/crates.io-index"
67
+ checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
68
+ dependencies = [
69
+ "libc",
70
+ "once_cell",
71
+ "portable-atomic",
72
+ "pyo3-build-config",
73
+ "pyo3-ffi",
74
+ "pyo3-macros",
75
+ ]
76
+
77
+ [[package]]
78
+ name = "pyo3-build-config"
79
+ version = "0.29.2"
80
+ source = "registry+https://github.com/rust-lang/crates.io-index"
81
+ checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
82
+ dependencies = [
83
+ "target-lexicon",
84
+ ]
85
+
86
+ [[package]]
87
+ name = "pyo3-ffi"
88
+ version = "0.29.2"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
91
+ dependencies = [
92
+ "libc",
93
+ "pyo3-build-config",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "pyo3-macros"
98
+ version = "0.29.2"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
101
+ dependencies = [
102
+ "proc-macro2",
103
+ "pyo3-macros-backend",
104
+ "quote",
105
+ "syn",
106
+ ]
107
+
108
+ [[package]]
109
+ name = "pyo3-macros-backend"
110
+ version = "0.29.2"
111
+ source = "registry+https://github.com/rust-lang/crates.io-index"
112
+ checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
113
+ dependencies = [
114
+ "heck",
115
+ "proc-macro2",
116
+ "quote",
117
+ "syn",
118
+ ]
119
+
120
+ [[package]]
121
+ name = "quote"
122
+ version = "1.0.47"
123
+ source = "registry+https://github.com/rust-lang/crates.io-index"
124
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
125
+ dependencies = [
126
+ "proc-macro2",
127
+ ]
128
+
129
+ [[package]]
130
+ name = "static_assertions"
131
+ version = "1.1.0"
132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
133
+ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
134
+
135
+ [[package]]
136
+ name = "syn"
137
+ version = "2.0.119"
138
+ source = "registry+https://github.com/rust-lang/crates.io-index"
139
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
140
+ dependencies = [
141
+ "proc-macro2",
142
+ "quote",
143
+ "unicode-ident",
144
+ ]
145
+
146
+ [[package]]
147
+ name = "target-lexicon"
148
+ version = "0.13.5"
149
+ source = "registry+https://github.com/rust-lang/crates.io-index"
150
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
151
+
152
+ [[package]]
153
+ name = "unicode-ident"
154
+ version = "1.0.24"
155
+ source = "registry+https://github.com/rust-lang/crates.io-index"
156
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
157
+
158
+ [[package]]
159
+ name = "version_check"
160
+ version = "0.9.5"
161
+ source = "registry+https://github.com/rust-lang/crates.io-index"
162
+ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
@@ -0,0 +1,17 @@
1
+ [package]
2
+ name = "fuzzbite"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ rust-version = "1.83"
6
+ license = "GPL-2.0-or-later"
7
+ description = "Fast batched ssdeep comparisons for Python"
8
+ repository = "https://github.com/taranis-ai/fuzzbite"
9
+ readme = "README.md"
10
+
11
+ [lib]
12
+ name = "_native"
13
+ crate-type = ["cdylib", "rlib"]
14
+
15
+ [dependencies]
16
+ ffuzzy = { version = "=0.3.16", features = ["strict-parser"] }
17
+ pyo3 = { version = "=0.29.2", features = ["abi3-py310"] }