lev-rs 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.
- lev_rs-0.1.0/.cargo/config.toml +5 -0
- lev_rs-0.1.0/.github/CODEOWNERS +1 -0
- lev_rs-0.1.0/.github/dependabot.yaml +21 -0
- lev_rs-0.1.0/.github/workflows/benchmark.yml +36 -0
- lev_rs-0.1.0/.github/workflows/docs.yml +50 -0
- lev_rs-0.1.0/.github/workflows/prek.yaml +13 -0
- lev_rs-0.1.0/.github/workflows/release.yml +153 -0
- lev_rs-0.1.0/.github/workflows/test.yml +41 -0
- lev_rs-0.1.0/.gitignore +198 -0
- lev_rs-0.1.0/.vscode/settings.json +26 -0
- lev_rs-0.1.0/CHANGELOG.md +18 -0
- lev_rs-0.1.0/Cargo.lock +134 -0
- lev_rs-0.1.0/Cargo.toml +23 -0
- lev_rs-0.1.0/LICENSE +21 -0
- lev_rs-0.1.0/PKG-INFO +108 -0
- lev_rs-0.1.0/README.md +66 -0
- lev_rs-0.1.0/build.rs +3 -0
- lev_rs-0.1.0/docs/api.md +7 -0
- lev_rs-0.1.0/docs/assets/benchmark_ascii_dark.svg +1084 -0
- lev_rs-0.1.0/docs/assets/benchmark_ascii_light.svg +1084 -0
- lev_rs-0.1.0/docs/assets/benchmark_cjk_dark.svg +1098 -0
- lev_rs-0.1.0/docs/assets/benchmark_cjk_light.svg +1098 -0
- lev_rs-0.1.0/docs/assets/benchmark_emoji_dark.svg +1084 -0
- lev_rs-0.1.0/docs/assets/benchmark_emoji_light.svg +1084 -0
- lev_rs-0.1.0/docs/assets/benchmark_latin_1_dark.svg +1061 -0
- lev_rs-0.1.0/docs/assets/benchmark_latin_1_light.svg +1061 -0
- lev_rs-0.1.0/docs/assets/benchmark_results_dark.svg +918 -0
- lev_rs-0.1.0/docs/assets/benchmark_results_light.svg +918 -0
- lev_rs-0.1.0/docs/index.md +72 -0
- lev_rs-0.1.0/lev.pyi +2 -0
- lev_rs-0.1.0/prek.toml +44 -0
- lev_rs-0.1.0/pyproject.toml +159 -0
- lev_rs-0.1.0/scripts/benchmark.py +146 -0
- lev_rs-0.1.0/scripts/benchmark_by_length.py +173 -0
- lev_rs-0.1.0/scripts/install_dev.sh +38 -0
- lev_rs-0.1.0/src/lib.rs +1106 -0
- lev_rs-0.1.0/tests/test_lev.py +106 -0
- lev_rs-0.1.0/uv.lock +2168 -0
- lev_rs-0.1.0/version +1 -0
- lev_rs-0.1.0/zensical.toml +72 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @karelze
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
# Maintain dependencies for pip
|
|
9
|
+
- package-ecosystem: "pip"
|
|
10
|
+
directory: "/" # Location of package manifests
|
|
11
|
+
schedule:
|
|
12
|
+
interval: "daily"
|
|
13
|
+
assignees:
|
|
14
|
+
- "KarelZe"
|
|
15
|
+
# Maintain dependencies for GitHub Actions
|
|
16
|
+
- package-ecosystem: "github-actions"
|
|
17
|
+
directory: "/"
|
|
18
|
+
schedule:
|
|
19
|
+
interval: "daily"
|
|
20
|
+
assignees:
|
|
21
|
+
- "KarelZe"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Benchmark
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- '**'
|
|
8
|
+
- '!docs/**'
|
|
9
|
+
pull_request:
|
|
10
|
+
paths:
|
|
11
|
+
- '**'
|
|
12
|
+
- '!docs/**'
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
benchmarks:
|
|
16
|
+
name: CodSpeed benchmarks
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.13"
|
|
24
|
+
|
|
25
|
+
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
26
|
+
|
|
27
|
+
- name: Build and install extension
|
|
28
|
+
run: pip install maturin && maturin build --release && pip install target/wheels/*.whl
|
|
29
|
+
|
|
30
|
+
- name: Install benchmark deps
|
|
31
|
+
run: pip install pytest pytest-codspeed pytest-cov
|
|
32
|
+
|
|
33
|
+
- uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3
|
|
34
|
+
with:
|
|
35
|
+
token: ${{ secrets.CODSPEED_TOKEN }}
|
|
36
|
+
run: pytest tests/test_lev.py --codspeed --no-cov
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.13"
|
|
26
|
+
|
|
27
|
+
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
28
|
+
|
|
29
|
+
- name: Build and install extension
|
|
30
|
+
run: pip install maturin && maturin build --release && pip install target/wheels/*.whl
|
|
31
|
+
|
|
32
|
+
- name: Install docs dependencies
|
|
33
|
+
run: pip install zensical "mkdocstrings[python]"
|
|
34
|
+
|
|
35
|
+
- name: Build docs
|
|
36
|
+
run: zensical build --strict
|
|
37
|
+
|
|
38
|
+
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
|
|
39
|
+
with:
|
|
40
|
+
path: site/
|
|
41
|
+
|
|
42
|
+
deploy:
|
|
43
|
+
needs: build
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
environment:
|
|
46
|
+
name: github-pages
|
|
47
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
48
|
+
steps:
|
|
49
|
+
- id: deployment
|
|
50
|
+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# see: https://prek.j178.dev/integrations/?h=ci+#verifying-images
|
|
2
|
+
name: prek checks
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
prek:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
10
|
+
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
11
|
+
with:
|
|
12
|
+
components: rustfmt
|
|
13
|
+
- uses: j178/prek-action@6ad80277337ad479fe43bd70701c3f7f8aa74db3 # v2
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "[0-9]+.[0-9]+.[0-9]+"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
linux:
|
|
13
|
+
name: Build — Linux (${{ matrix.target }})
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
include:
|
|
18
|
+
- target: x86_64
|
|
19
|
+
# x86_64: explicit CPython paths to skip PyPy in the manylinux container.
|
|
20
|
+
args: >-
|
|
21
|
+
--release --out dist
|
|
22
|
+
--interpreter
|
|
23
|
+
/opt/python/cp310-cp310/bin/python
|
|
24
|
+
/opt/python/cp311-cp311/bin/python
|
|
25
|
+
/opt/python/cp312-cp312/bin/python
|
|
26
|
+
/opt/python/cp313-cp313/bin/python
|
|
27
|
+
/opt/python/cp314-cp314/bin/python
|
|
28
|
+
# - target: aarch64
|
|
29
|
+
# # aarch64 cross-compiles; binaries can't run on the x86_64 host so
|
|
30
|
+
# # maturin reads sysconfig data files instead of executing interpreters.
|
|
31
|
+
# # Remove PyPy before the build — PyUnicode_DATA/KIND don't exist on
|
|
32
|
+
# # PyPy and --find-interpreter would otherwise pick it up.
|
|
33
|
+
# args: --release --out dist --find-interpreter
|
|
34
|
+
# before-script: rm -rf /opt/python/pp*
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
37
|
+
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
|
|
38
|
+
with:
|
|
39
|
+
target: ${{ matrix.target }}
|
|
40
|
+
manylinux: auto
|
|
41
|
+
# before-script-linux: ${{ matrix.before-script || '' }}
|
|
42
|
+
args: ${{ matrix.args }}
|
|
43
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
44
|
+
with:
|
|
45
|
+
name: wheels-linux-${{ matrix.target }}
|
|
46
|
+
path: dist/*.whl
|
|
47
|
+
|
|
48
|
+
windows:
|
|
49
|
+
name: Build — Windows (x64)
|
|
50
|
+
runs-on: windows-latest
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
53
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
54
|
+
with:
|
|
55
|
+
python-version: |
|
|
56
|
+
3.10
|
|
57
|
+
3.11
|
|
58
|
+
3.12
|
|
59
|
+
3.13
|
|
60
|
+
3.14
|
|
61
|
+
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
|
|
62
|
+
with:
|
|
63
|
+
target: x64
|
|
64
|
+
args: --release --out dist --find-interpreter
|
|
65
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
66
|
+
with:
|
|
67
|
+
name: wheels-windows-x64
|
|
68
|
+
path: dist/*.whl
|
|
69
|
+
|
|
70
|
+
macos:
|
|
71
|
+
name: Build — macOS (universal2)
|
|
72
|
+
runs-on: macos-latest
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
75
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
76
|
+
with:
|
|
77
|
+
python-version: |
|
|
78
|
+
3.10
|
|
79
|
+
3.11
|
|
80
|
+
3.12
|
|
81
|
+
3.13
|
|
82
|
+
3.14
|
|
83
|
+
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
|
|
84
|
+
with:
|
|
85
|
+
target: universal2-apple-darwin
|
|
86
|
+
args: --release --out dist --find-interpreter
|
|
87
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
88
|
+
with:
|
|
89
|
+
name: wheels-macos-universal2
|
|
90
|
+
path: dist/*.whl
|
|
91
|
+
|
|
92
|
+
sdist:
|
|
93
|
+
name: Build — sdist
|
|
94
|
+
runs-on: ubuntu-latest
|
|
95
|
+
steps:
|
|
96
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
97
|
+
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
|
|
98
|
+
with:
|
|
99
|
+
command: sdist
|
|
100
|
+
args: --out dist
|
|
101
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
102
|
+
with:
|
|
103
|
+
name: wheels-sdist
|
|
104
|
+
path: dist/*.tar.gz
|
|
105
|
+
|
|
106
|
+
publish-test-pypi:
|
|
107
|
+
name: Publish — Test PyPI
|
|
108
|
+
needs: [linux, windows, macos, sdist]
|
|
109
|
+
runs-on: ubuntu-latest
|
|
110
|
+
environment: test-pypi
|
|
111
|
+
permissions:
|
|
112
|
+
id-token: write
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
115
|
+
with:
|
|
116
|
+
pattern: wheels-*
|
|
117
|
+
merge-multiple: true
|
|
118
|
+
path: dist
|
|
119
|
+
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
|
|
120
|
+
with:
|
|
121
|
+
repository-url: https://test.pypi.org/legacy/
|
|
122
|
+
|
|
123
|
+
publish-pypi:
|
|
124
|
+
name: Publish — PyPI
|
|
125
|
+
needs: [linux, windows, macos, sdist]
|
|
126
|
+
runs-on: ubuntu-latest
|
|
127
|
+
environment: pypi
|
|
128
|
+
permissions:
|
|
129
|
+
id-token: write
|
|
130
|
+
steps:
|
|
131
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
132
|
+
with:
|
|
133
|
+
pattern: wheels-*
|
|
134
|
+
merge-multiple: true
|
|
135
|
+
path: dist
|
|
136
|
+
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
|
|
137
|
+
|
|
138
|
+
github-release:
|
|
139
|
+
name: GitHub Release
|
|
140
|
+
needs: [linux, windows, macos, sdist]
|
|
141
|
+
runs-on: ubuntu-latest
|
|
142
|
+
permissions:
|
|
143
|
+
contents: write
|
|
144
|
+
steps:
|
|
145
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
146
|
+
with:
|
|
147
|
+
pattern: wheels-*
|
|
148
|
+
merge-multiple: true
|
|
149
|
+
path: dist
|
|
150
|
+
- uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
|
|
151
|
+
with:
|
|
152
|
+
files: dist/*
|
|
153
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths:
|
|
6
|
+
- '**'
|
|
7
|
+
- '!docs/**'
|
|
8
|
+
pull_request:
|
|
9
|
+
paths:
|
|
10
|
+
- '**'
|
|
11
|
+
- '!docs/**'
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Test on Python ${{ matrix.python-version }}
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
23
|
+
|
|
24
|
+
- name: Set up Rust
|
|
25
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
26
|
+
|
|
27
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: |
|
|
34
|
+
python -m pip install --upgrade pip
|
|
35
|
+
pip install .[dev]
|
|
36
|
+
|
|
37
|
+
- name: Run cargo test
|
|
38
|
+
run: cargo test
|
|
39
|
+
|
|
40
|
+
- name: Run pytest
|
|
41
|
+
run: pytest
|
lev_rs-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/rust,python
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=rust,python
|
|
3
|
+
|
|
4
|
+
### Python ###
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
# .python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# poetry
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
103
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
104
|
+
# commonly ignored for libraries.
|
|
105
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
106
|
+
#poetry.lock
|
|
107
|
+
|
|
108
|
+
# pdm
|
|
109
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
110
|
+
#pdm.lock
|
|
111
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
112
|
+
# in version control.
|
|
113
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
114
|
+
.pdm.toml
|
|
115
|
+
|
|
116
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
117
|
+
__pypackages__/
|
|
118
|
+
|
|
119
|
+
# Celery stuff
|
|
120
|
+
celerybeat-schedule
|
|
121
|
+
celerybeat.pid
|
|
122
|
+
|
|
123
|
+
# SageMath parsed files
|
|
124
|
+
*.sage.py
|
|
125
|
+
|
|
126
|
+
# Environments
|
|
127
|
+
.env
|
|
128
|
+
.venv
|
|
129
|
+
env/
|
|
130
|
+
venv/
|
|
131
|
+
ENV/
|
|
132
|
+
env.bak/
|
|
133
|
+
venv.bak/
|
|
134
|
+
|
|
135
|
+
# Spyder project settings
|
|
136
|
+
.spyderproject
|
|
137
|
+
.spyproject
|
|
138
|
+
|
|
139
|
+
# Rope project settings
|
|
140
|
+
.ropeproject
|
|
141
|
+
|
|
142
|
+
# mkdocs documentation
|
|
143
|
+
/site
|
|
144
|
+
|
|
145
|
+
# mypy
|
|
146
|
+
.mypy_cache/
|
|
147
|
+
.dmypy.json
|
|
148
|
+
dmypy.json
|
|
149
|
+
|
|
150
|
+
# Pyre type checker
|
|
151
|
+
.pyre/
|
|
152
|
+
|
|
153
|
+
# pytype static type analyzer
|
|
154
|
+
.pytype/
|
|
155
|
+
|
|
156
|
+
# Cython debug symbols
|
|
157
|
+
cython_debug/
|
|
158
|
+
|
|
159
|
+
# PyCharm
|
|
160
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
161
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
162
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
163
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
164
|
+
#.idea/
|
|
165
|
+
|
|
166
|
+
### Python Patch ###
|
|
167
|
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
|
168
|
+
poetry.toml
|
|
169
|
+
|
|
170
|
+
# ruff
|
|
171
|
+
.ruff_cache/
|
|
172
|
+
|
|
173
|
+
# LSP config files
|
|
174
|
+
pyrightconfig.json
|
|
175
|
+
|
|
176
|
+
### Rust ###
|
|
177
|
+
# Generated by Cargo
|
|
178
|
+
# will have compiled files and executables
|
|
179
|
+
debug/
|
|
180
|
+
|
|
181
|
+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
|
182
|
+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
|
183
|
+
Cargo.lock
|
|
184
|
+
|
|
185
|
+
# These are backup files generated by rustfmt
|
|
186
|
+
**/*.rs.bk
|
|
187
|
+
|
|
188
|
+
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
189
|
+
*.pdb
|
|
190
|
+
|
|
191
|
+
# End of https://www.toptal.com/developers/gitignore/api/rust,python
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
## visualizations
|
|
195
|
+
*.png
|
|
196
|
+
|
|
197
|
+
## benchmarks
|
|
198
|
+
bench*.json
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cSpell.words": [
|
|
3
|
+
"Bilz",
|
|
4
|
+
"Damerau",
|
|
5
|
+
"duftify",
|
|
6
|
+
"geht",
|
|
7
|
+
"Hyyrö",
|
|
8
|
+
"Hyyrö's",
|
|
9
|
+
"labelrotation",
|
|
10
|
+
"manylinux",
|
|
11
|
+
"Mathers",
|
|
12
|
+
"matplotlib",
|
|
13
|
+
"matplotx",
|
|
14
|
+
"maturin",
|
|
15
|
+
"prek",
|
|
16
|
+
"pypi",
|
|
17
|
+
"rapidfuzz",
|
|
18
|
+
"woulda",
|
|
19
|
+
"xticklabels",
|
|
20
|
+
"xticks",
|
|
21
|
+
"ylabel",
|
|
22
|
+
"yscale"
|
|
23
|
+
"résumé",
|
|
24
|
+
"woulda"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## 0.1.0 (2026-05-03)
|
|
2
|
+
|
|
3
|
+
### Feat
|
|
4
|
+
|
|
5
|
+
- add initial rust implementation for levenshtein distance🦀
|
|
6
|
+
- add basic benchmarking + rust project
|
|
7
|
+
- add basic python setup 🐍
|
|
8
|
+
|
|
9
|
+
### Fix
|
|
10
|
+
|
|
11
|
+
- make arguments to distance and ratio positional only🐞
|
|
12
|
+
|
|
13
|
+
### Perf
|
|
14
|
+
|
|
15
|
+
- improve performance on very short strings🚀 (#69)
|
|
16
|
+
- improve performance for cjk and emoji strings🚀 (#65)
|
|
17
|
+
- improve performance on long strings🚀 (#61)
|
|
18
|
+
- improve performance of ascii and unicode strings🚀 (#54)
|
lev_rs-0.1.0/Cargo.lock
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "heck"
|
|
7
|
+
version = "0.5.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "lev"
|
|
13
|
+
version = "0.1.0"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"pyo3",
|
|
16
|
+
"pyo3-build-config",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[[package]]
|
|
20
|
+
name = "libc"
|
|
21
|
+
version = "0.2.186"
|
|
22
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
23
|
+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
24
|
+
|
|
25
|
+
[[package]]
|
|
26
|
+
name = "once_cell"
|
|
27
|
+
version = "1.21.4"
|
|
28
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
29
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
30
|
+
|
|
31
|
+
[[package]]
|
|
32
|
+
name = "portable-atomic"
|
|
33
|
+
version = "1.13.1"
|
|
34
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
35
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
36
|
+
|
|
37
|
+
[[package]]
|
|
38
|
+
name = "proc-macro2"
|
|
39
|
+
version = "1.0.106"
|
|
40
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
41
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
42
|
+
dependencies = [
|
|
43
|
+
"unicode-ident",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[[package]]
|
|
47
|
+
name = "pyo3"
|
|
48
|
+
version = "0.28.3"
|
|
49
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
50
|
+
checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
|
|
51
|
+
dependencies = [
|
|
52
|
+
"libc",
|
|
53
|
+
"once_cell",
|
|
54
|
+
"portable-atomic",
|
|
55
|
+
"pyo3-build-config",
|
|
56
|
+
"pyo3-ffi",
|
|
57
|
+
"pyo3-macros",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
[[package]]
|
|
61
|
+
name = "pyo3-build-config"
|
|
62
|
+
version = "0.28.3"
|
|
63
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
+
checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
|
|
65
|
+
dependencies = [
|
|
66
|
+
"target-lexicon",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[[package]]
|
|
70
|
+
name = "pyo3-ffi"
|
|
71
|
+
version = "0.28.3"
|
|
72
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
73
|
+
checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
|
|
74
|
+
dependencies = [
|
|
75
|
+
"libc",
|
|
76
|
+
"pyo3-build-config",
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
[[package]]
|
|
80
|
+
name = "pyo3-macros"
|
|
81
|
+
version = "0.28.3"
|
|
82
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
83
|
+
checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
|
|
84
|
+
dependencies = [
|
|
85
|
+
"proc-macro2",
|
|
86
|
+
"pyo3-macros-backend",
|
|
87
|
+
"quote",
|
|
88
|
+
"syn",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
[[package]]
|
|
92
|
+
name = "pyo3-macros-backend"
|
|
93
|
+
version = "0.28.3"
|
|
94
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
+
checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
|
|
96
|
+
dependencies = [
|
|
97
|
+
"heck",
|
|
98
|
+
"proc-macro2",
|
|
99
|
+
"pyo3-build-config",
|
|
100
|
+
"quote",
|
|
101
|
+
"syn",
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
[[package]]
|
|
105
|
+
name = "quote"
|
|
106
|
+
version = "1.0.45"
|
|
107
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
108
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
109
|
+
dependencies = [
|
|
110
|
+
"proc-macro2",
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
[[package]]
|
|
114
|
+
name = "syn"
|
|
115
|
+
version = "2.0.117"
|
|
116
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
118
|
+
dependencies = [
|
|
119
|
+
"proc-macro2",
|
|
120
|
+
"quote",
|
|
121
|
+
"unicode-ident",
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
[[package]]
|
|
125
|
+
name = "target-lexicon"
|
|
126
|
+
version = "0.13.5"
|
|
127
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
128
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
129
|
+
|
|
130
|
+
[[package]]
|
|
131
|
+
name = "unicode-ident"
|
|
132
|
+
version = "1.0.24"
|
|
133
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
134
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|