Skip to content

Commit

Permalink
Swap out fuzzywuzzy for the newer rapidfuzz lib
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Sep 13, 2023
1 parent 4d274b1 commit 4a18001
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion piker/brokers/binance/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
now,
)
import asks
from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy
import numpy as np

from piker import config
Expand Down
2 changes: 1 addition & 1 deletion piker/brokers/deribit/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import pendulum
import trio
from trio_typing import TaskStatus
from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy
import numpy as np
from tractor.trionics import (
broadcast_receiver,
Expand Down
2 changes: 1 addition & 1 deletion piker/brokers/deribit/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import trio
from trio_typing import TaskStatus
import pendulum
from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy
import numpy as np
import tractor

Expand Down
2 changes: 1 addition & 1 deletion piker/brokers/ib/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
TYPE_CHECKING,
)

from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy
import ib_insync as ibis
import tractor
import trio
Expand Down
2 changes: 1 addition & 1 deletion piker/brokers/kraken/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import pendulum
import asks
from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy
import numpy as np
import urllib.parse
import hashlib
Expand Down
2 changes: 1 addition & 1 deletion piker/brokers/kraken/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from decimal import Decimal

import tractor
from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy

from piker._cacheables import (
async_lifo_cache,
Expand Down
2 changes: 1 addition & 1 deletion piker/brokers/kucoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import wsproto
from uuid import uuid4

from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy
from trio_typing import TaskStatus
import asks
from bidict import bidict
Expand Down
2 changes: 1 addition & 1 deletion piker/data/_symcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
)
from types import ModuleType

from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy
import tomli_w # for fast symbol cache writing
import tractor
import trio
Expand Down
4 changes: 2 additions & 2 deletions piker/ui/_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

"""
qompleterz: embeddable search and complete using trio, Qt and fuzzywuzzy.
qompleterz: embeddable search and complete using trio, Qt and rapidfuzz.
"""

Expand Down Expand Up @@ -45,7 +45,7 @@
import time
# from pprint import pformat

from fuzzywuzzy import process as fuzzy
from rapidfuzz import process as fuzzy
import trio
from trio_typing import TaskStatus
from PyQt5 import QtCore
Expand Down
11 changes: 4 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# piker: trading gear for hackers
# Copyright (C) 2018-present (in stewardship of pikers)
# Tyler Goodlet
# Tyler Goodlet and the pike pikes

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -102,9 +102,9 @@ develop = true
optional = true
[tool.poetry.group.uis.dependencies]
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
# TODO: outstanding pkging issues on nixos
fuzzywuzzy = {extras = ["speedup"], version = "^0.18.0"}
# fuzzywuzzy = "^0.18.0"
# TODO: make sure the levenshtein shit compiles on nix..
# rapidfuzz = {extras = ["speedup"], version = "^0.18.0"}
rapidfuzz = "^3.2.0"
qdarkstyle = ">=3.0.2"
pyqt5 = "^5.15.9"
pyqtgraph = { git = 'https://github.com/pikers/pyqtgraph.git' }
Expand Down Expand Up @@ -137,9 +137,6 @@ prompt-toolkit = "^3.0.39"
# [tool.poetry.group.daemon.dependencies]

[tool.poetry.scripts]
# poetry = "poetry.console.application:main"
piker = 'piker.cli:cli'
pikerd = 'piker.cli:pikerd'
ledger = 'piker.accounting.cli:ledger'

# ------ - ------

0 comments on commit 4a18001

Please sign in to comment.