Coverage for python/gsfit/database_writers/imas/__init__.py: 0%
9 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-14 15:25 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-14 15:25 +0000
1from typing import TYPE_CHECKING
3from ..interface import DatabaseWriterProtocol
4from .map_results_to_database import map_results_to_database
6if TYPE_CHECKING:
7 from imas.ids_toplevel import IDSToplevel
9 from ...gsfit import Gsfit
11__all__ = ["DatabaseWriterIMAS"]
14class DatabaseWriterIMAS(DatabaseWriterProtocol):
15 """
16 Builds an IMAS `equilibrium` IDS from the GSFit results, using the official `imas-python`
17 package. Nothing is written to a database: the IDS is handed back, and
18 `Gsfit.write_results_to_database` keeps it on `gsfit_controller.equilibrium_ids`.
19 """
21 def map_results_to_database(self, gsfit_controller: "Gsfit") -> "IDSToplevel":
22 return map_results_to_database(self, gsfit_controller)
24 def get_workflow_names(self, gsfit_controller: "Gsfit") -> list[str]:
25 """This writer stores no `INPUT.WORKFLOW`, so there are no workflow nodes to create"""
27 return []