Skip to content

Commit

Permalink
Pinning elfpy and fixing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
slundqui committed Jul 31, 2023
1 parent ab61b8d commit cc24df6
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 32 deletions.
13 changes: 6 additions & 7 deletions examples/borrowing_agents_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"""Simulation for the Hyperdrive Borrow market"""
from __future__ import annotations


# pylint: disable=line-too-long
# pylint: disable=too-many-lines
# pylint: disable=too-many-arguments
Expand Down Expand Up @@ -53,17 +52,16 @@
except: # pylint: disable=bare-except
print("running locally & trusting that you have the dependencies installed")

# %%
from dataclasses import dataclass, field
import logging

import numpy as np
import pandas as pd
from numpy.random._generator import Generator as NumpyGenerator
# %%
from dataclasses import dataclass, field

import elfpy.time as elf_time
import elfpy.types as types
import elfpy.utils.outputs as output_utils
import numpy as np
import pandas as pd
from elfpy.agents.agent import Agent
from elfpy.agents.policies.base import BasePolicy
from elfpy.markets.borrow import (
Expand All @@ -73,9 +71,10 @@
BorrowPricingModel,
MarketActionType,
)
from elfpy.math.fixed_point import FixedPoint
from elfpy.simulators.config import Config
from elfpy.wallet.wallet import Borrow, Wallet
from fixedpointmath import FixedPoint
from numpy.random._generator import Generator as NumpyGenerator

# pylint: disable=too-few-public-methods

Expand Down
15 changes: 8 additions & 7 deletions examples/hyperdrive_demo_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# %%
"""simulation for the Hyperdrive market"""
from __future__ import annotations

import logging

from matplotlib.axes import Axes
Expand Down Expand Up @@ -54,22 +55,22 @@
print("running locally & trusting that you have the dependencies installed")


# %%
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from numpy.random._generator import Generator as NumpyGenerator

import elfpy.markets.hyperdrive.hyperdrive_actions as hyperdrive_actions
import elfpy.utils.outputs as output_utils
import elfpy.utils.post_processing as post_processing
import matplotlib.pyplot as plt

# %%
import numpy as np
import pandas as pd
from elfpy.agents.agent import Agent
from elfpy.agents.policies import RandomAgent
from elfpy.math import FixedPoint
from elfpy.simulators.config import Config
from elfpy.utils import sim_utils
from elfpy.utils.outputs import get_gridspec_subplots
from elfpy.wallet.wallet import Wallet
from fixedpointmath import FixedPoint
from numpy.random._generator import Generator as NumpyGenerator

# %% [markdown]
# ### Setup experiment parameters
Expand Down
13 changes: 6 additions & 7 deletions examples/smart_short_long_agents_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@

import logging

import matplotlib.ticker as ticker

# %%
import numpy as np
from numpy.random._generator import Generator as NumpyGenerator

import elfpy.types as types
import elfpy.utils.outputs as output_utils
import elfpy.utils.post_processing as post_processing
import elfpy.utils.sim_utils as sim_utils
import matplotlib.ticker as ticker

# %%
import numpy as np
from elfpy.agents.agent import Agent
from elfpy.agents.policies import LongLouie, ShortSally
from elfpy.agents.policies.base import BasePolicy
from elfpy.markets.hyperdrive import HyperdriveMarket, hyperdrive_actions
from elfpy.math import FixedPoint
from elfpy.simulators.config import Config
from elfpy.wallet.wallet import Wallet
from fixedpointmath import FixedPoint
from numpy.random._generator import Generator as NumpyGenerator

# pylint: disable=line-too-long
# pylint: disable=too-many-lines
Expand Down
18 changes: 8 additions & 10 deletions examples/vault_tracker_notebook.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
"""Agent that tracks the vault apr"""
# %%
from __future__ import annotations
import logging

import logging
import os

import numpy as np
from numpy.random._generator import Generator as NumpyGenerator
import matplotlib.pyplot as plt
import pandas as pd
from scipy import special

import elfpy.markets.hyperdrive.hyperdrive_actions as hyperdrive_actions
import elfpy.types as types
import elfpy.utils.outputs as output_utils
import elfpy.utils.post_processing as post_processing

from elfpy import WEI, PRECISION_THRESHOLD
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from elfpy import PRECISION_THRESHOLD, WEI
from elfpy.agents.agent import Agent
from elfpy.agents.policies.base import BasePolicy
from elfpy.markets.hyperdrive import HyperdriveMarket
from elfpy.math import FixedPoint
from elfpy.simulators.config import Config
from elfpy.utils import sim_utils
from elfpy.wallet.wallet import Wallet
from fixedpointmath import FixedPoint
from numpy.random._generator import Generator as NumpyGenerator
from scipy import special

# pylint: disable=too-many-arguments
# pylint: disable=too-many-branches
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This checks out the latest commit on main with dependencies and doc dependencies.
elfpy[with-dependencies, docs] @ git+https://github.com/delvtech/elf-simulations
elfpy[with-dependencies, docs] @ git+https://github.com/delvtech/elf-simulations@v0.2.0
ipykernel

0 comments on commit cc24df6

Please sign in to comment.