Skip to content

Commit

Permalink
Upgrade to version 1.2.0.post1 to fix a grid2op related issue (#75)
Browse files Browse the repository at this point in the history
* fixing bug on CI

* fixing bug on CI

* fixing the requirements to certain package versions for the tests

* fixing the requirements to certain package versions for the tests

* update to version 1.2.0.post1 [skip ci]
  • Loading branch information
BDonnot authored Jul 27, 2023
1 parent 337cbdf commit 9de298e
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
# pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements.
- run: sudo apt-get update
- run: sudo apt-get install -y coinor-cbc
- run: pip install .
- run: pip install -r requirements.txt
- run: pip install -r requirements_test.txt
- run: pip install -e .
- run: pip freeze
- run:
name: Run basic tests
Expand Down
2 changes: 1 addition & 1 deletion chronix2grid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# SPDX-License-Identifier: MPL-2.0
# This file is part of Chronix2Grid, A python package to generate "en-masse" chronics for loads and productions (thermal, renewable)

___version__ = "1.1.0.post1"
___version__ = "1.2.0.post1"
20 changes: 14 additions & 6 deletions chronix2grid/generation/dispatch/dispatch_loss_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,22 @@ def run_grid2op_simulation_donothing(grid_path, agent_result_path, nb_core = 1,
runner = Runner(**env.get_params_for_runner())
# do regular computation as you would with grid2op
path_save = None
if(write_results):
path_save=os.path.join(agent_results_path,'agent_results')
if write_results:
path_save = os.path.join(agent_results_path, 'agent_results')
os.makedirs(path_save, exist_ok=True)

name_chron, cum_reward, nb_time_step, episode_data =runner.run_one_episode(path_save=path_save,
indx=scen_id,
pbar=True,
detailed_output=True)
try:
# recent grid2op version: run_one_episode has the same signature as runner.run
*_, episode_data = runner.run_one_episode(path_save=path_save,
indx=scen_id,
pbar=True,
detailed_output=True)
except ValueError:
# old grid2op version
name_chron, cum_reward, nb_time_step, episode_data = runner.run_one_episode(path_save=path_save,
indx=scen_id,
pbar=True,
detailed_output=True)
#res = runner.run(nb_episode=nb_episode, nb_process=NB_CORE, pbar=True, add_detailed_output=True)
# #path_save=simulation_data_folder
#id_chron, name_chron, cum_reward, nb_timestep, max_ts, episode_data = res.pop()
Expand Down
175 changes: 175 additions & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
anyio==3.7.1
appdirs==1.4.4
argcomplete==3.1.1
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
asttokens==2.2.1
async-lru==2.0.3
attrs==23.1.0
Babel==2.12.1
backcall==0.2.0
beautifulsoup4==4.12.2
bleach==6.0.0
blosc2==2.0.0
Bottleneck==1.3.7
branca==0.6.0
certifi==2023.7.22
cffi==1.15.1
cftime==1.6.2
charset-normalizer==3.2.0
click==8.1.6
cloudpickle==2.2.1
colorlover==0.3.0
comm==0.1.3
contourpy==1.1.0
cufflinks==0.17.3
cvxpy==1.3.2
cycler==0.11.0
Cython==3.0.0
dask==2023.5.0
debugpy==1.6.7
decorator==5.1.1
deepdiff==6.3.1
defusedxml==0.7.1
deprecation==2.1.0
distlib==0.3.7
ecos==2.0.12
exceptiongroup==1.1.2
executing==1.2.0
fastjsonschema==2.18.0
filelock==3.12.2
folium==0.14.0
fonttools==4.41.1
fqdn==1.5.1
fsspec==2023.6.0
idna==3.4
importlib-metadata==6.8.0
importlib-resources==6.0.0
iniconfig==2.0.0
ipykernel==6.25.0
ipython==8.12.2
ipython-genutils==0.2.0
ipywidgets==8.0.7
isoduration==20.11.0
jedi==0.18.2
Jinja2==3.1.2
joblib==1.3.1
json5==0.9.14
jsonpointer==2.4
jsonschema==4.18.4
jsonschema-specifications==2023.7.1
jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.6.3
jupyter-lsp==2.2.0
jupyter_client==8.3.0
jupyter_core==5.3.1
jupyter_server==2.7.0
jupyter_server_terminals==0.4.4
jupyterlab==4.0.3
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.8
jupyterlab_server==2.24.0
kiwisolver==1.4.4
linopy==0.2.2
llvmlite==0.40.1
locket==1.0.0
MarkupSafe==2.1.3
matplotlib==3.7.2
matplotlib-inline==0.1.6
mistune==3.0.1
msgpack==1.0.5
nbclient==0.8.0
nbconvert==7.7.3
nbformat==5.9.1
nest-asyncio==1.5.6
netCDF4==1.6.4
networkx==3.1
nose==1.3.7
notebook==7.0.0
notebook_shim==0.2.3
numba==0.57.1
numexpr==2.8.4
numpy==1.24.4
ordered-set==4.1.0
osqp==0.6.3
overrides==7.3.1
packaging==23.1
pandapower==2.13.1
pandas==2.0.3
pandocfilters==1.5.0
parso==0.8.3
partd==1.4.0
pathlib==1.0.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==10.0.0
pipenv==2023.7.23
pipx==1.2.0
pkgutil_resolve_name==1.3.10
platformdirs==3.9.1
plotly==5.15.0
pluggy==1.2.0
ply==3.11
prometheus-client==0.17.1
prompt-toolkit==3.0.39
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
py-cpuinfo==9.0.0
pycparser==2.21
Pygments==2.15.1
Pyomo==6.6.1
pyparsing==3.0.9
pypsa==0.23.0
pytest==7.4.0
pytest-tornasync==0.6.0.post2
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2023.3
PyUtilib==6.0.0
PyYAML==6.0.1
pyzmq==25.1.0
qdldl==0.1.7.post0
qtconsole==5.4.3
QtPy==2.3.1
referencing==0.30.0
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.9.2
scikit-learn==1.3.0
scipy==1.10.1
scs==3.2.3
seaborn==0.12.2
Send2Trash==1.8.2
six==1.16.0
sniffio==1.3.0
soupsieve==2.4.1
stack-data==0.6.2
tables==3.8.0
tenacity==8.2.2
terminado==0.17.1
threadpoolctl==3.2.0
tinycss2==1.2.1
tomli==2.0.1
toolz==0.12.0
tornado==6.3.2
tqdm==4.65.0
traitlets==5.9.0
typing_extensions==4.7.1
tzdata==2023.3
uri-template==1.3.0
urllib3==2.0.4
userpath==1.9.0
validators==0.20.0
virtualenv==20.24.2
virtualenv-clone==0.5.7
wcwidth==0.2.6
webcolors==1.13
webencodings==0.5.1
websocket-client==1.6.1
widgetsnbextension==4.0.8
xarray==2023.1.0
zipp==3.16.2
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


setup(name='Chronix2Grid',
version='1.2.0',
version='1.2.0.post1',
description='A python package to generate "en-masse" chronics for loads and productions (thermal, renewable)',
long_description=long_description,
long_description_content_type='text/markdown',
Expand All @@ -25,6 +25,7 @@
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Intended Audience :: Developers",
"Intended Audience :: Education",
Expand Down

0 comments on commit 9de298e

Please sign in to comment.