Skip to content

Commit 41c8f4c

Browse files
authored
Fix CI error (#145)
* 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
1 parent ca336f7 commit 41c8f4c

File tree

3 files changed

+33
-32
lines changed

3 files changed

+33
-32
lines changed

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [3.7, 3.8, 3.9]
18+
python-version: ["3.9", "3.10", "3.11"]
1919

2020
steps:
2121
- uses: actions/checkout@v4

model/state_variables.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
Percentage,
2727
Stage,
2828
)
29+
from model.utils import default
2930
from data.historical_values import eth_price_mean, eth_price_min, eth_price_max
3031

3132

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

139140
# System metric state variables
140-
validator_eth_staked: np.ndarray = np.zeros(
141-
(number_of_validator_environments, 1), dtype=int
141+
validator_eth_staked: np.ndarray = default(
142+
np.zeros((number_of_validator_environments, 1), dtype=int)
142143
)
143144
"""The ETH staked per validator environment"""
144-
validator_revenue: np.ndarray = np.zeros(
145-
(number_of_validator_environments, 1), dtype=int
145+
validator_revenue: np.ndarray = default(
146+
np.zeros((number_of_validator_environments, 1), dtype=int)
146147
)
147148
"""The total revenue (income received) for performing PoS duties per validator environment"""
148-
validator_profit: np.ndarray = np.zeros(
149-
(number_of_validator_environments, 1), dtype=int
149+
validator_profit: np.ndarray = default(
150+
np.zeros((number_of_validator_environments, 1), dtype=int)
150151
)
151152
"""The total profit (income received - costs) per validator environment"""
152-
validator_revenue_yields: np.ndarray = np.zeros(
153-
(number_of_validator_environments, 1), dtype=int
153+
validator_revenue_yields: np.ndarray = default(
154+
np.zeros((number_of_validator_environments, 1), dtype=int)
154155
)
155156
"""The total annualized revenue (income received) yields (percentage of investment amount)
156157
per validator environment"""
157-
validator_profit_yields: np.ndarray = np.zeros(
158-
(number_of_validator_environments, 1), dtype=int
158+
validator_profit_yields: np.ndarray = default(
159+
np.zeros((number_of_validator_environments, 1), dtype=int)
159160
)
160161
"""The total annualized profit (income received - costs) yields (percentage of investment amount)
161162
per validator environment"""
162-
validator_count_distribution: np.ndarray = np.zeros(
163-
(number_of_validator_environments, 1), dtype=int
163+
validator_count_distribution: np.ndarray = default(
164+
np.zeros((number_of_validator_environments, 1), dtype=int)
164165
)
165166
"""The total number of validators per validator environment"""
166-
validator_hardware_costs: np.ndarray = np.zeros(
167-
(number_of_validator_environments, 1), dtype=USD
167+
validator_hardware_costs: np.ndarray = default(
168+
np.zeros((number_of_validator_environments, 1), dtype=USD)
168169
)
169170
"""The total validator hardware operation costs per validator environment"""
170-
validator_cloud_costs: np.ndarray = np.zeros(
171-
(number_of_validator_environments, 1), dtype=USD
171+
validator_cloud_costs: np.ndarray = default(
172+
np.zeros((number_of_validator_environments, 1), dtype=USD)
172173
)
173174
"""The total validator cloud operation costs per validator environment"""
174-
validator_third_party_costs: np.ndarray = np.zeros(
175-
(number_of_validator_environments, 1), dtype=USD
175+
validator_third_party_costs: np.ndarray = default(
176+
np.zeros((number_of_validator_environments, 1), dtype=USD)
176177
)
177178
"""The total validator third-party fee costs validator environment"""
178-
validator_costs: np.ndarray = np.zeros(
179-
(number_of_validator_environments, 1), dtype=USD
179+
validator_costs: np.ndarray = default(
180+
np.zeros((number_of_validator_environments, 1), dtype=USD)
180181
)
181182
"""The total validator costs validator environment"""
182183

requirements.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
radcad==0.8.4
2-
pytest==6.2.2
3-
ipykernel==5.5.3
4-
matplotlib==3.3.4
2+
pytest==8.3.2
3+
ipykernel==6.29.5
4+
matplotlib==3.5.0
55
plotly==4.14.3
66
stochastic==0.6.0
7-
typing_extensions==3.7.4.3
7+
typing_extensions==4.12.2
88
black==20.8b1
99
ipython-autotime==0.3.1
1010
jupyter-dash==0.4.0
11-
jupyter-client==6.1.12
12-
jupyterlab==3.0.17
13-
ipywidgets==7.6.3
14-
notebook==6.4.12
11+
# jupyter-client
12+
jupyterlab<4
13+
ipywidgets==8.1.3
14+
notebook<7
1515
pdoc3==0.9.2
16-
jupyter-book==0.13.2
16+
jupyter-book==1.0.2
1717
psutil==5.8.0
1818
kaleido==0.2.1
1919
jinja2==3.0.3
@@ -23,8 +23,8 @@ gunicorn==20.1.0
2323
cadCAD_tools==0.0.1.4
2424
tqdm==4.61.0
2525
diskcache==5.2.1
26-
pylint==2.8.3
26+
pylint==3.2.6
2727
python-dotenv==0.19.0
28-
jupyterlab-spellchecker==0.6.0
28+
jupyterlab-spellchecker<0.8
2929
Werkzeug==2.0.3
3030
click==8.0.4

0 commit comments

Comments
 (0)