Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f91267c
tests: add links input files (.csv format)
berthetclement Apr 30, 2026
4d50042
feat(tests+core): add support for "PEAK_PARAMS" sheet in main params …
berthetclement May 4, 2026
f12db9f
tests: update MAIN_PARAMS_2025.xlsx resource file, sheet "PEAK_PARAMS"
berthetclement May 4, 2026
32f88f9
tests: add unit tests for main params getters (peak hours and months)
berthetclement May 4, 2026
4c83224
feat: introduce links parsing and filtering with tests and input files
berthetclement May 5, 2026
fccc56b
feat(draft): enhance LinksParser with NTC median computation and inde…
berthetclement May 6, 2026
b3b7465
feat(draft): expand HVDC link types and enhance links parsing/filteri…
berthetclement May 7, 2026
fda749d
feat(draft): extend LinksParser with aggregated values computation an…
berthetclement May 12, 2026
0054782
refactor:
berthetclement May 13, 2026
8ddba72
refactor:
berthetclement May 15, 2026
32f902d
Add missing links expected excel file for test
berthetclement May 15, 2026
358d6e9
feat: add `has_curve` property and prioritize link selection logic
berthetclement May 21, 2026
6e9d528
refactor(constants): update HVDC link constants for better naming con…
berthetclement May 21, 2026
018a131
feat: add `mean_strict_positive` utility and improve HVDC aggregation…
berthetclement May 21, 2026
c5b81e4
feat: improve LinksParser logic and standardize constants usage
berthetclement May 26, 2026
e505d00
chore: remove deprecated tools and links processing modules
berthetclement May 27, 2026
8e80ac8
feat(mkdocs): expose `parse_main_params` in `__all__` for referential…
berthetclement May 27, 2026
0948723
feat(mkdocs): expose `parse_main_params` in `__all__` for referential…
berthetclement May 27, 2026
b1bfb2f
Merge remote-tracking branch 'origin/links/refacto' into links/refacto
berthetclement May 27, 2026
81a1082
refactor(parsing): simplify links handling and remove unused logic
berthetclement May 27, 2026
6ac14dd
chore(main_params): add missing comma and remove redundant newline (l…
berthetclement May 27, 2026
1ce8433
feat(parsing): enhance HVDC aggregation and prioritize link selection…
berthetclement May 28, 2026
b645af4
refactor(parsing): remove unused `discrim_profil` logic and cleanup c…
berthetclement May 29, 2026
37b5e03
chore(dependencies): remove optional parquet dependencies (`pyarrow`)…
berthetclement Jun 1, 2026
e9b174e
Merge branch 'main' into links/refacto
berthetclement Jun 2, 2026
a2c3f1b
chore(links): Merge main with main params updated
berthetclement Jun 2, 2026
c150622
refactor(tests/parsing): improve validation logic and cleanup redunda…
berthetclement Jun 3, 2026
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
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,3 @@ dev = [
"click~=8.1.7",
"types-openpyxl>=3.1.5.20250919",
]

[project.optional-dependencies]
parquet = ["pyarrow"]
11 changes: 2 additions & 9 deletions src/antares/data_collection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
#
# This file is part of the Antares project.

from antares.data_collection.links.links import create_links_outputs
from antares.data_collection.tools.conf import LocalConfiguration
from antares.data_collection.tools.tools import create_xlsx_workbook, edit_xlsx_workbook
from antares.data_collection.referential_data.main_params import parse_main_params

__all__ = [
"LocalConfiguration",
"create_links_outputs",
"create_xlsx_workbook",
"edit_xlsx_workbook",
]
__all__ = ["parse_main_params"]
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,37 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.
from enum import StrEnum

from enum import Enum, StrEnum
from typing import Any
LINKS_NTC_INDEX_NAME = "NTCs Index.csv"
LINKS_NTC_TS_NAME = "NTCs.csv"
LINKS_TRANSFER_LINKS_NAME = "Transfer Links.csv"

NTC_FILTER_STR_VALUE = "NTC"
CURVE_UID_SPLIT_SYMBOL = ":"
HVDC_NAME_TECHNOLOGY = "HVDC"

class LinksFileConfig:
def __init__(self) -> None:
self.NTC_INDEX = "NTCs Index.csv"
self.NTC_TS = "NTCs.csv"
self.TRANSFER_LINKS = "Transfer Links.csv"
LINKS_CLUSTER_FOLDER = "link"
LINKS_OUTPUT_NAME_FILE = "PEMMDB_LINK.xlsx"

def all_names(self) -> list[str]:
return [self.NTC_INDEX, self.NTC_TS, self.TRANSFER_LINKS]
HURDLE_COSTS_NAME = "Hurdle Costs"
HURDLE_COSTS_VALUE = 0.5

FIRST_SHEET_NAME = "parameters"

WINTER_SEASON = "winter"
SUMMER_SEASON = "summer"
HOUR_PEAK = "HP"
HOUR_OFFPEAK = "HC"


class Direction(StrEnum):
DIRECT = "Direct"
INDIRECT = "Indirect"


# data "Transfer Links.csv"
class TransferLinks(StrEnum):
class InputTransferLinksColumns(StrEnum):
ZONE = "ZONE"
MARKET_ZONE_SOURCE = "MARKET_ZONE_SOURCE"
MARKET_ZONE_DESTINATION = "MARKET_ZONE_DESTINATION"
Expand All @@ -41,16 +55,14 @@ class TransferLinks(StrEnum):


# "NTCs Index.csv"
class NTCsIndex(StrEnum):
class InputNTCsIndexColumns(StrEnum):
CURVE_UID = "CURVE_UID"
ZONE = "ZONE"
ID = "ID"
LABEL = "LABEL"
COUNT = "COUNT"


# "NTCs.csv"
class NTCS(StrEnum):
class InputNTCsColumns(StrEnum):
MONTH = "MONTH"
DAY = "DAY"
HOUR = "HOUR"
Expand All @@ -72,16 +84,9 @@ class ExportLinksColumnsNames(StrEnum):

FLOWBASED_PERIMETER = "Flowbased_perimeter"

HVDC = "HVDC"

SPECIFIC_TS = "Specific_TS"
FORCED_OUTAGE_HVAC = "Forced_Outage_HVAC"


# list of parameters for exports
class LinksExportParameters(Enum):
HURDLE_COSTS = ("Hurdle Costs", 0.5)

def __init__(self, label: str, default: Any):
self.label = label
self.default = default
HVDC_DIRECT = "HVDC_MW_direct"
HVDC_INDIRECT = "HVDC_MW_Indirect"
HVDC_NB_DIRECT = "HVDC_Nb_Direct"
HVDC_NB_INDIRECT = "HVDC_Nb_Indirect"
HVDC_FOR_DIRECT = "HVDC_FO_Rate_direct"
HVDC_FOR_INDIRECT = "HVDC_FO_Rate_indirect"
Loading
Loading