Skip to content

Commit

Permalink
Fix #166
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed May 14, 2024
1 parent 66dab24 commit 9e3e613
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bw2data/backends/typos.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
from typing import Iterable
import warnings
from functools import partial
from ..string_distance import damerau_levenshtein

try:
from rapidfuzz.distance import DamerauLevenshtein
damerau_levenshtein = DamerauLevenshtein.distance
except ImportError:
# Can happen on Windows, see
# https://github.com/rapidfuzz/RapidFuzz/tree/main?tab=readme-ov-file#with-pip
from ..string_distance import damerau_levenshtein

VALID_ACTIVITY_TYPES = (
"process",
Expand Down
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ platformdirs
pytest
pytest-cov
python-coveralls
rapidfuzz
requests>=1.1.0
scipy
stats_arrays
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ numpy<2
peewee>=3.9.4
platformdirs
requests>=1.1.0
rapidfuzz
scipy
stats_arrays
tqdm
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"numpy<2",
"peewee>=3.9.4",
"platformdirs",
"rapidfuzz",
"scipy",
"stats_arrays",
"tqdm",
Expand Down

0 comments on commit 9e3e613

Please sign in to comment.