Skip to content

Commit

Permalink
Fix CI error (#145)
Browse files Browse the repository at this point in the history
* Update README.md

* Update requirements to resolve dependency resolution issue

* Update requirements to resolve dependency resolution issue

* Remove support for Python 3.7, 3.8, add 3.10, 3.11

* Remove support for Python 3.7, 3.8, add 3.10, 3.11

* Remove support for Python 3.7, 3.8, add 3.10, 3.11

* Update typing_extensions version

* Update pytest version to fix type error

* Fix Jupyter Lab dependency errors

* Update pylint version to fix error

* Update Plotly version to fix error

* Fix state variables default error
  • Loading branch information
BenSchZA authored Aug 14, 2024
1 parent ca336f7 commit 41c8f4c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
Expand Down
41 changes: 21 additions & 20 deletions model/state_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
Percentage,
Stage,
)
from model.utils import default
from data.historical_values import eth_price_mean, eth_price_min, eth_price_max


Expand Down Expand Up @@ -137,46 +138,46 @@ class StateVariables:
"""The total realized MEV to validators post Proof-of-Stake"""

# System metric state variables
validator_eth_staked: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=int
validator_eth_staked: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=int)
)
"""The ETH staked per validator environment"""
validator_revenue: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=int
validator_revenue: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=int)
)
"""The total revenue (income received) for performing PoS duties per validator environment"""
validator_profit: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=int
validator_profit: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=int)
)
"""The total profit (income received - costs) per validator environment"""
validator_revenue_yields: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=int
validator_revenue_yields: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=int)
)
"""The total annualized revenue (income received) yields (percentage of investment amount)
per validator environment"""
validator_profit_yields: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=int
validator_profit_yields: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=int)
)
"""The total annualized profit (income received - costs) yields (percentage of investment amount)
per validator environment"""
validator_count_distribution: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=int
validator_count_distribution: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=int)
)
"""The total number of validators per validator environment"""
validator_hardware_costs: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=USD
validator_hardware_costs: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=USD)
)
"""The total validator hardware operation costs per validator environment"""
validator_cloud_costs: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=USD
validator_cloud_costs: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=USD)
)
"""The total validator cloud operation costs per validator environment"""
validator_third_party_costs: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=USD
validator_third_party_costs: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=USD)
)
"""The total validator third-party fee costs validator environment"""
validator_costs: np.ndarray = np.zeros(
(number_of_validator_environments, 1), dtype=USD
validator_costs: np.ndarray = default(
np.zeros((number_of_validator_environments, 1), dtype=USD)
)
"""The total validator costs validator environment"""

Expand Down
22 changes: 11 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
radcad==0.8.4
pytest==6.2.2
ipykernel==5.5.3
matplotlib==3.3.4
pytest==8.3.2
ipykernel==6.29.5
matplotlib==3.5.0
plotly==4.14.3
stochastic==0.6.0
typing_extensions==3.7.4.3
typing_extensions==4.12.2
black==20.8b1
ipython-autotime==0.3.1
jupyter-dash==0.4.0
jupyter-client==6.1.12
jupyterlab==3.0.17
ipywidgets==7.6.3
notebook==6.4.12
# jupyter-client
jupyterlab<4
ipywidgets==8.1.3
notebook<7
pdoc3==0.9.2
jupyter-book==0.13.2
jupyter-book==1.0.2
psutil==5.8.0
kaleido==0.2.1
jinja2==3.0.3
Expand All @@ -23,8 +23,8 @@ gunicorn==20.1.0
cadCAD_tools==0.0.1.4
tqdm==4.61.0
diskcache==5.2.1
pylint==2.8.3
pylint==3.2.6
python-dotenv==0.19.0
jupyterlab-spellchecker==0.6.0
jupyterlab-spellchecker<0.8
Werkzeug==2.0.3
click==8.0.4

0 comments on commit 41c8f4c

Please sign in to comment.