Skip to content

Commit

Permalink
github workflows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnovichek committed Jan 26, 2025
1 parent fb6dc2a commit 2f83034
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
working-directory: ./apps/shared
run: |
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
poetry lock --no-update
poetry lock
poetry install
- name: Run Tests for Shared
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard_app/tests/protocol_stats_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,4 @@ def test_get_utilization_stats_division_by_zero():

# Check if division by zero results in NaN or infinity
assert result["Total utilization"].iloc[0] == 1
assert pd.isna(result["ETH utilization"].iloc[0])
assert result["ETH utilization"].iloc[0] == 0.0
2 changes: 1 addition & 1 deletion apps/shared/loan_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def compute_collateral_usd(
for token, token_amount in self.collateral.items():
if (
underlying_address := collateral_token_parameters[token].underlying_address
) in prices.values:
) in prices:
total_sum += Decimal(
float(token_amount)
/ (10 ** collateral_token_parameters[token].decimals)
Expand Down
4 changes: 2 additions & 2 deletions apps/shared/tests/test_state_and_loan_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def send_message(self, message: str) -> None:
),
},
):
from shared.types.base import (
from shared.custom_types.base import (
Portfolio,
ExtraInfo,
TokenParameters,
Expand Down Expand Up @@ -216,7 +216,7 @@ def test_mock_loan_entity_compute_collateral_usd():
# Expected calculation:
# 1 token * 0.8 (collateral factor) * 1.1 (interest) * 1000 (price)
# = 1 * 0.8 * 1.1 * 1000 = 880.0
assert value == pytest.approx(880.0)
assert float(value) == pytest.approx(880.0)


def test_mock_state_invalid_event_method():
Expand Down
2 changes: 1 addition & 1 deletion apps/shared/tests/test_swap_amm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# insert root directory into python module search path
sys.path.insert(1, os.getcwd())
from shared.amms import MySwapPool, Pool, SwapAmm
from shared.types import TokenSettings, TokenValues
from shared.custom_types import TokenSettings, TokenValues


class MockPool(Pool):
Expand Down

0 comments on commit 2f83034

Please sign in to comment.