-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(outputs): build outputs tree based on filesystem (#2064)
Solves [ANT-1306]
- Loading branch information
1 parent
b195aa0
commit b6d778d
Showing
39 changed files
with
4,845 additions
and
619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
52 changes: 52 additions & 0 deletions
52
antarest/study/storage/rawstudy/model/filesystem/root/input/commons/prepro_series.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from antarest.study.storage.rawstudy.model.filesystem.common.area_matrix_list import AreaMatrixList | ||
from antarest.study.storage.rawstudy.model.filesystem.common.prepro import InputPrepro | ||
from antarest.study.storage.rawstudy.model.filesystem.config.model import FileStudyTreeConfig | ||
from antarest.study.storage.rawstudy.model.filesystem.context import ContextServer | ||
from antarest.study.storage.rawstudy.model.filesystem.folder_node import FolderNode | ||
from antarest.study.storage.rawstudy.model.filesystem.inode import TREE | ||
from antarest.study.storage.rawstudy.model.filesystem.matrix.constants import default_scenario_hourly | ||
|
||
|
||
class InputPreproSeries(FolderNode): | ||
def __init__(self, context: ContextServer, config: FileStudyTreeConfig, prefix: str): | ||
""" | ||
Represents a folder structure, which contains a "prepro" and a time series structure. | ||
Example of tree structure: | ||
.. code-block:: text | ||
input/load/ | ||
├── prepro | ||
│ ├── correlation.ini | ||
│ ├── store_in | ||
│ │ ├── conversion.txt | ||
│ │ ├── data.txt | ||
│ │ ├── k.txt | ||
│ │ ├── settings.ini | ||
│ │ └── translation.txt | ||
│ └── store_out | ||
│ ├── conversion.txt | ||
│ ├── data.txt | ||
│ ├── k.txt | ||
│ ├── settings.ini | ||
│ └── translation.txt | ||
└── series | ||
├── load_store_in.txt | ||
└── load_store_out.txt | ||
""" | ||
|
||
super().__init__(context, config) | ||
self.prefix = prefix | ||
|
||
def build(self) -> TREE: | ||
children: TREE = { | ||
"prepro": InputPrepro(self.context, self.config.next_file("prepro")), | ||
"series": AreaMatrixList( | ||
self.context, | ||
self.config.next_file("series"), | ||
prefix=self.prefix, | ||
additional_matrix_params={"default_empty": default_scenario_hourly}, | ||
), | ||
} | ||
return children |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
antarest/study/storage/rawstudy/model/filesystem/root/input/load/load.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
46 changes: 0 additions & 46 deletions
46
antarest/study/storage/rawstudy/model/filesystem/root/input/solar/solar.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
46 changes: 0 additions & 46 deletions
46
antarest/study/storage/rawstudy/model/filesystem/root/input/wind/wind.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.