From 8284f04c84c69c7eb67377f9c6afe80b10442124 Mon Sep 17 00:00:00 2001 From: Steve C Date: Thu, 17 Oct 2024 01:41:13 -0400 Subject: [PATCH] downsizing dependencies --- requirements.txt | 1 - requirements_dev.txt | 1 - tests/test_bets_bustproof.py | 4 +--- tests/test_modifiers.py | 3 +-- tests/test_neofoodclub.py | 9 ++++----- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/requirements.txt b/requirements.txt index ee983b0..f1d5fd5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -orjson python-dateutil setuptools-rust typing_extensions diff --git a/requirements_dev.txt b/requirements_dev.txt index 33c5305..b60bea5 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,4 @@ coverage -orjson pytest python-dateutil typing_extensions diff --git a/tests/test_bets_bustproof.py b/tests/test_bets_bustproof.py index 964b4d9..0ca632b 100644 --- a/tests/test_bets_bustproof.py +++ b/tests/test_bets_bustproof.py @@ -1,7 +1,5 @@ import json -import orjson - from neofoodclub import Bets, Modifier, NeoFoodClub @@ -59,7 +57,7 @@ def test_bustproof_equivalence(nfc_with_bet_amount: NeoFoodClub) -> None: def test_bustproof_generator_no_positives(nfc: NeoFoodClub) -> None: # modify our round object to have no positives (just need to change the last arena for this one) - round_data = orjson.loads(nfc.to_json()) + round_data = json.loads(nfc.to_json()) # will give the arena a -50% ratio round_data["currentOdds"][-1] = [1, 2, 2, 2, 2] no_positive_nfc = NeoFoodClub(json.dumps(round_data)) diff --git a/tests/test_modifiers.py b/tests/test_modifiers.py index 94c8cd4..bc1353d 100644 --- a/tests/test_modifiers.py +++ b/tests/test_modifiers.py @@ -1,7 +1,6 @@ import datetime import json -import orjson import pytest from neofoodclub import Modifier, NeoFoodClub @@ -79,7 +78,7 @@ def test_modifier_time_with_nfc(nfc: NeoFoodClub) -> None: def test_modifier_time_and_reset_no_start(nfc: NeoFoodClub) -> None: - new_data = orjson.loads(nfc.to_json()) + new_data = json.loads(nfc.to_json()) # remove the start time of the round so we can have an indeterminate start time new_data.pop("start") modifier = Modifier( diff --git a/tests/test_neofoodclub.py b/tests/test_neofoodclub.py index 0c8ce07..681f7c5 100644 --- a/tests/test_neofoodclub.py +++ b/tests/test_neofoodclub.py @@ -3,7 +3,6 @@ import datetime import json -import orjson import pytest from neofoodclub import Modifier, NeoFoodClub @@ -173,7 +172,7 @@ def test_changes_equivalence(nfc: NeoFoodClub) -> None: def test_removed_timestamp(nfc: NeoFoodClub) -> None: # timestamp isn't really needed, so if it doesn't exist, # we just return None - data = orjson.loads(nfc.to_json()) + data = json.loads(nfc.to_json()) data.pop("timestamp") @@ -195,14 +194,14 @@ def test_outdated_lock(nfc: NeoFoodClub) -> None: def test_outdated_lock_false(nfc: NeoFoodClub) -> None: now = datetime.datetime.now(datetime.timezone.utc) - data = orjson.loads(nfc.to_json()) + data = json.loads(nfc.to_json()) data["start"] = now.isoformat() new_nfc = NeoFoodClub(json.dumps(data)) assert new_nfc.is_outdated_lock is False def test_outdated_lock_none(nfc: NeoFoodClub) -> None: - data = orjson.loads(nfc.to_json()) + data = json.loads(nfc.to_json()) # if there's no start attribute, assume it's over data.pop("start") @@ -216,7 +215,7 @@ def test_winning_pirates(nfc: NeoFoodClub) -> None: def test_winning_pirates_empty(nfc: NeoFoodClub) -> None: - data = orjson.loads(nfc.to_json()) + data = json.loads(nfc.to_json()) # monkeypatching in no winners data["winners"] = (0, 0, 0, 0, 0)