From 9563eac635d158b15695b3280d44969137a1ce99 Mon Sep 17 00:00:00 2001 From: Benjamin Himes Date: Mon, 2 Jun 2025 19:35:22 +0200 Subject: [PATCH 1/2] Removes fuzzywuzzy and Levenshtein as dependencies --- bittensor_cli/src/commands/wallets.py | 8 +------- pyproject.toml | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/bittensor_cli/src/commands/wallets.py b/bittensor_cli/src/commands/wallets.py index 6b4a6f50b..40ea61218 100644 --- a/bittensor_cli/src/commands/wallets.py +++ b/bittensor_cli/src/commands/wallets.py @@ -9,7 +9,6 @@ from bittensor_wallet import Wallet, Keypair from bittensor_wallet.errors import KeyFileError from bittensor_wallet.keyfile import Keyfile -from fuzzywuzzy import fuzz from rich import box from rich.align import Align from rich.table import Column, Table @@ -1227,16 +1226,11 @@ async def overview( if sort_by: column_to_sort_by: int = 0 - highest_matching_ratio: int = 0 sort_descending: bool = False # Default sort_order to ascending for index, column in zip(range(len(table.columns)), table.columns): - # Fuzzy match the column name. Default to the first column. column_name = column.header.lower().replace("[white]", "") - match_ratio = fuzz.ratio(sort_by.lower(), column_name) - # Finds the best matching column - if match_ratio > highest_matching_ratio: - highest_matching_ratio = match_ratio + if column_name == sort_by.lower().strip(): column_to_sort_by = index if sort_order.lower() in {"desc", "descending", "reverse"}: diff --git a/pyproject.toml b/pyproject.toml index 4b0e6b773..e82a8702c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,14 +20,12 @@ dependencies = [ "backoff~=2.2.1", "click<8.2.0", # typer.testing.CliRunner(mix_stderr=) is broken in click 8.2.0+ "GitPython>=3.0.0", - "fuzzywuzzy~=0.18.0", "netaddr~=1.3.0", "numpy>=2.0.1,<3.0.0", "Jinja2", "pycryptodome>=3.0.0,<4.0.0", "PyYAML~=6.0.1", "pytest", - "python-Levenshtein", "rich>=13.7,<15.0", "scalecodec==1.2.11", "typer>=0.12,<0.16", From b83d939cc90ead0c11580752891e9486449b2452 Mon Sep 17 00:00:00 2001 From: Benjamin Himes Date: Mon, 2 Jun 2025 19:43:19 +0200 Subject: [PATCH 2/2] Update requirements. --- .github/workflows/e2e-subtensor-tests.yml | 1 - pyproject.toml | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-subtensor-tests.yml b/.github/workflows/e2e-subtensor-tests.yml index 241abdc7c..6b0db3f26 100644 --- a/.github/workflows/e2e-subtensor-tests.yml +++ b/.github/workflows/e2e-subtensor-tests.yml @@ -88,7 +88,6 @@ jobs: uv venv .venv source .venv/bin/activate uv pip install .[dev] - uv pip install pytest - name: Download Cached Docker Image uses: actions/download-artifact@v4 diff --git a/pyproject.toml b/pyproject.toml index e82a8702c..7385a1396 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,6 @@ dependencies = [ "Jinja2", "pycryptodome>=3.0.0,<4.0.0", "PyYAML~=6.0.1", - "pytest", "rich>=13.7,<15.0", "scalecodec==1.2.11", "typer>=0.12,<0.16", @@ -38,6 +37,10 @@ dependencies = [ cuda = [ "torch>=1.13.1,<3.0", ] +dev = [ + "pytest", + "pytest-asyncio", +] [project.urls] # more details can be found here