Skip to content

Reorganize e2e/models tests #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#
# This file is part of the Antares project.

from libs.standard import BALANCE_PORT_TYPE, CONSTANT

from andromede.expression import literal, param, var
from andromede.expression.expression import port_field
from andromede.model import (
Expand All @@ -22,7 +24,6 @@
model,
)
from andromede.model.port import PortFieldDefinition, PortFieldId
from tests.e2e.models.libs.standard import BALANCE_PORT_TYPE, CONSTANT

"""
Simple Convertor model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from pathlib import Path

import pytest
from libs.standard import BALANCE_PORT_TYPE, DEMAND_MODEL, GENERATOR_MODEL

from andromede.model.library import Library, library
from andromede.model.parsing import parse_yaml_library
Expand All @@ -25,11 +26,6 @@
PortRef,
create_component,
)
from tests.e2e.models.libs.standard import (
BALANCE_PORT_TYPE,
DEMAND_MODEL,
GENERATOR_MODEL,
)


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#
# This file is part of the Antares project.

from libs.standard import CONSTANT, TIME_AND_SCENARIO_FREE

from andromede.expression import literal, param, var
from andromede.expression.expression import port_field
from andromede.model import (
Expand All @@ -31,7 +33,6 @@
PortRef,
create_component,
)
from tests.e2e.models.libs.standard import CONSTANT, TIME_AND_SCENARIO_FREE

ELECTRICAL_PORT = PortType(id="electrical_port", fields=[PortField("flow")])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@

import math

from libs.standard import DEMAND_MODEL, GENERATOR_MODEL, NODE_BALANCE_MODEL
from libs.standard_sc import (
CONVERTOR_MODEL,
CONVERTOR_RECEIVE_IN,
DECOMPOSE_1_FLOW_INTO_2_FLOW,
NODE_BALANCE_MODEL_MOD,
TWO_INPUTS_CONVERTOR_MODEL,
)

from andromede.simulation import OutputValues, TimeBlock, build_problem
from andromede.study import (
ConstantData,
Expand All @@ -21,18 +30,6 @@
PortRef,
create_component,
)
from tests.e2e.models.libs.standard import (
DEMAND_MODEL,
GENERATOR_MODEL,
NODE_BALANCE_MODEL,
)
from tests.e2e.models.libs.standard_sc import (
CONVERTOR_MODEL,
CONVERTOR_RECEIVE_IN,
DECOMPOSE_1_FLOW_INTO_2_FLOW,
NODE_BALANCE_MODEL_MOD,
TWO_INPUTS_CONVERTOR_MODEL,
)

"""
This file tests various modellings for an electrolyser with multiple inputs. The models are created in Python directly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

import math

from libs.standard import DEMAND_MODEL, LINK_MODEL, NODE_BALANCE_MODEL
from libs.standard_sc import C02_POWER_MODEL, QUOTA_CO2_MODEL

from andromede.simulation import OutputValues, TimeBlock, build_problem
from andromede.study import (
ConstantData,
Expand All @@ -25,8 +28,6 @@
PortRef,
create_component,
)
from tests.e2e.models.libs.standard import DEMAND_MODEL, LINK_MODEL, NODE_BALANCE_MODEL
from tests.e2e.models.libs.standard_sc import C02_POWER_MODEL, QUOTA_CO2_MODEL


def test_quota_co2() -> None:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import math

import pandas as pd
from libs.standard import (
DEMAND_MODEL,
NODE_BALANCE_MODEL,
SPILLAGE_MODEL,
UNSUPPLIED_ENERGY_MODEL,
)
from libs.standard_sc import SHORT_TERM_STORAGE_COMPLEX

from andromede.simulation import BlockBorderManagement, TimeBlock, build_problem
from andromede.study import (
Expand All @@ -12,13 +19,6 @@
TimeScenarioSeriesData,
create_component,
)
from tests.e2e.models.libs.standard import (
DEMAND_MODEL,
NODE_BALANCE_MODEL,
SPILLAGE_MODEL,
UNSUPPLIED_ENERGY_MODEL,
)
from tests.e2e.models.libs.standard_sc import SHORT_TERM_STORAGE_COMPLEX


def generate_data(
Expand Down
Loading