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

1from typing import TYPE_CHECKING 

2 

3from ..interface import DatabaseWriterProtocol 

4from .map_results_to_database import map_results_to_database 

5 

6if TYPE_CHECKING: 

7 from imas.ids_toplevel import IDSToplevel 

8 

9 from ...gsfit import Gsfit 

10 

11__all__ = ["DatabaseWriterIMAS"] 

12 

13 

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 """ 

20 

21 def map_results_to_database(self, gsfit_controller: "Gsfit") -> "IDSToplevel": 

22 return map_results_to_database(self, gsfit_controller) 

23 

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""" 

26 

27 return []