Skip to content

Commit

Permalink
fix requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
killian-scalian committed Dec 19, 2024
1 parent a6b678e commit 219ca85
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 28 deletions.
11 changes: 11 additions & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-r requirements.txt
pytest~=7.0.0
mypy~=1.7.1
black~=23.7.0
isort~=5.12.0
pytest-cov
pre-commit~=3.5.0
types-PyYAML~=6.0.12.12
antlr4-tools~=0.2.1
pandas
pandas-stubs
51 changes: 31 additions & 20 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
# pip-compile --output-file=requirements-dev.txt requirements-dev.in
#
absl-py==2.1.0
# via ortools
# via
# -r requirements.txt
# ortools
annotated-types==0.7.0
# via pydantic
antares==0.3.25.0
# via
# -r requirements-dev.in
# -r requirements.txt
# pydantic
antares-craft==0.1.2
# via -r requirements.txt
antlr4-python3-runtime==4.13.1
# via -r requirements.txt
antlr4-tools==0.2.1
Expand All @@ -26,16 +28,16 @@ click==8.1.7
# via black
coverage[toml]==7.6.9
# via pytest-cov
decorator==5.1.1
# via antares
distlib==0.3.9
# via virtualenv
filelock==3.16.1
# via virtualenv
identify==2.6.3
# via pre-commit
immutabledict==4.2.1
# via ortools
# via
# -r requirements.txt
# ortools
iniconfig==2.0.0
# via pytest
install-jdk==1.1.0
Expand All @@ -53,7 +55,6 @@ nodeenv==1.9.1
numpy==1.24.4
# via
# -r requirements.txt
# antares
# ortools
# pandas
# pandas-stubs
Expand All @@ -64,11 +65,12 @@ packaging==24.2
# via
# black
# pytest
pandas==2.0.3
pandas==2.2.3
# via
# -r requirements-dev.in
# -r requirements.txt
# ortools
pandas-stubs==2.0.2.230605
pandas-stubs==2.2.3.241126
# via -r requirements-dev.in
pathspec==0.12.1
# via black
Expand All @@ -81,47 +83,56 @@ pluggy==1.5.0
pre-commit==3.5.0
# via -r requirements-dev.in
protobuf==5.29.2
# via ortools
# via
# -r requirements.txt
# ortools
py==1.11.0
# via pytest
pydantic==2.6.4
# via -r requirements.txt
pydantic-core==2.16.3
# via pydantic
# via
# -r requirements.txt
# pydantic
pytest==7.0.1
# via
# -r requirements-dev.in
# pytest-cov
pytest-cov==6.0.0
# via -r requirements-dev.in
python-dateutil==2.9.0.post0
# via pandas
# via
# -r requirements.txt
# pandas
pytz==2024.2
# via pandas
# via
# -r requirements.txt
# pandas
pyyaml==6.0.2
# via
# -r requirements.txt
# pre-commit
scipy==1.10.1
# via -r requirements.txt
six==1.17.0
# via python-dateutil
# via
# -r requirements.txt
# python-dateutil
tomli==2.2.1
# via pytest
tornado==6.4.2
# via antares
types-pytz==2024.2.0.20241003
# via pandas-stubs
types-pyyaml==6.0.12.20240917
# via -r requirements-dev.in
typing-extensions==4.12.2
# via
# -r requirements.txt
# mypy
# pydantic
# pydantic-core
tzdata==2024.2
# via pandas
# via
# -r requirements.txt
# pandas
virtualenv==20.28.0
# via pre-commit
wheel==0.45.1
# via antares
8 changes: 8 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
numpy==1.24.4
ortools==9.9.3963
scipy==1.10.1
antlr4-python3-runtime==4.13.1
PyYAML~=6.0.1
pydantic~=2.6.1
antares_craft>0.1.1
requests
59 changes: 55 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,58 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements.txt requirements.in
#
absl-py==2.1.0
# via ortools
annotated-types==0.7.0
# via pydantic
antares-craft==0.1.2
# via -r requirements.in
antlr4-python3-runtime==4.13.1
# via -r requirements.in
certifi==2024.12.14
# via requests
charset-normalizer==3.4.0
# via requests
idna==3.10
# via requests
immutabledict==4.2.1
# via ortools
numpy==1.24.4
# via
# -r requirements.in
# ortools
# pandas
# scipy
ortools==9.9.3963
# via -r requirements.in
pandas==2.2.3
# via ortools
protobuf==5.29.2
# via ortools
pydantic==2.6.4
# via -r requirements.in
pydantic-core==2.16.3
# via pydantic
python-dateutil==2.9.0.post0
# via pandas
pytz==2024.2
# via pandas
pyyaml==6.0.2
# via -r requirements.in
requests==2.32.3
# via -r requirements.in
scipy==1.10.1
antlr4-python3-runtime==4.13.1
PyYAML~=6.0.1
pydantic~=2.6.1
antares>=0.3.25
# via -r requirements.in
six==1.17.0
# via python-dateutil
typing-extensions==4.12.2
# via
# pydantic
# pydantic-core
tzdata==2024.2
# via pandas
urllib3==2.2.3
# via requests
5 changes: 2 additions & 3 deletions src/andromede/input_converter/src/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
from pydantic import BaseModel

from andromede.input_converter.src.utils import (
convert_area_to_components,
convert_renewable_to_components,
convert_area_to_component_list,
resolve_path,
)
from andromede.study.parsing import InputComponents
Expand All @@ -34,7 +33,7 @@ def __init__(self, study_path: Optional[Path]):

def convert_study_to_input_components(self) -> InputComponents:
areas = self.study.read_areas()
area_components = convert_area_to_components(areas)
area_components = convert_area_to_component_list(areas)
return InputComponents(nodes=area_components)

def validate_with_pydantic(
Expand Down
2 changes: 1 addition & 1 deletion src/andromede/input_converter/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def resolve_path(path_str: Path) -> Path:
return absolute_path


def convert_area_to_components(areas: list[Area]) -> list[InputComponent]:
def convert_area_to_component_list(areas: list[Area]) -> list[InputComponent]:
return [InputComponent(id=area.id, model="area") for area in areas]


Expand Down

0 comments on commit 219ca85

Please sign in to comment.