Skip to content

Commit

Permalink
antares.craft
Browse files Browse the repository at this point in the history
  • Loading branch information
killian-scalian committed Dec 20, 2024
1 parent b86ad2d commit 0798f13
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ pytz==2024.2
pyyaml==6.0.2
# via -r requirements.in
requests==2.32.3
# via
# -r requirements.in
# antares-craft
# via antares-craft
scipy==1.10.1
# via -r requirements.in
six==1.17.0
Expand Down
2 changes: 1 addition & 1 deletion src/andromede/input_converter/src/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from typing import Optional

import yaml
from antares.model.study import Study # type: ignore
from antares.craft.model.study import Study
from pydantic import BaseModel

from andromede.input_converter.src.utils import (
Expand Down
16 changes: 8 additions & 8 deletions tests/input_converter/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@
# This file is part of the Antares project.
import pandas as pd
import pytest
from antares.model.area import Area # type: ignore
from antares.model.binding_constraint import ( # type: ignore
from antares.craft.model.area import Area
from antares.craft.model.binding_constraint import (
BindingConstraint,
BindingConstraintFrequency,
BindingConstraintOperator,
BindingConstraintProperties,
)
from antares.model.hydro import HydroProperties
from antares.model.renewable import (
from antares.craft.model.hydro import HydroProperties
from antares.craft.model.renewable import (
RenewableClusterGroup,
RenewableClusterProperties,
TimeSeriesInterpretation,
)
from antares.model.st_storage import STStorageGroup, STStorageProperties
from antares.model.study import Study, create_study_local
from antares.model.thermal import (
from antares.craft.model.st_storage import STStorageGroup, STStorageProperties
from antares.craft.model.study import Study, create_study_local
from antares.craft.model.thermal import (
LawOption,
LocalTSGenerationBehavior,
ThermalClusterGroup,
ThermalClusterProperties,
ThermalCostGeneration,
)
from antares.tools.ini_tool import IniFile, IniFileTypes
from antares.craft.tools.ini_tool import IniFile, IniFileTypes


@pytest.fixture
Expand Down
3 changes: 3 additions & 0 deletions tests/input_converter/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def test_convert_area_to_input_components(self, local_study_w_areas):
components=[],
connections=[],
)
# We add a sort because we want to check only presence and validity of area_components node.
# Not position
area_components.nodes.sort(key=lambda x: x.id)
expected_area_components.nodes.sort(key=lambda x: x.id)

assert area_components == expected_area_components

0 comments on commit 0798f13

Please sign in to comment.