Coverage for src \ nuremics \ core \ application.py: 100%

33 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-02-13 18:48 +0100

1from __future__ import annotations 

2 

3from pathlib import Path 

4 

5from platformdirs import user_config_path 

6 

7from .workflow import WorkFlow 

8 

9CONFIG_PATH = user_config_path( 

10 appname="nuRemics", 

11 appauthor=False, 

12) 

13 

14 

15class Application: 

16 

17 def __init__( 

18 self, 

19 app_name: str, 

20 config_path: Path = CONFIG_PATH, 

21 workflow: list = [], 

22 silent: bool = False, 

23 ) -> None: 

24 

25 self.workflow = WorkFlow( 

26 app_name=app_name, 

27 config_path=config_path, 

28 workflow=workflow, 

29 silent=silent, 

30 ) 

31 

32 self.workflow.print_logo() 

33 self.workflow.print_application() 

34 

35 self.workflow.get_inputs() 

36 self.workflow.get_outputs() 

37 

38 self.workflow.init_config() 

39 

40 self.workflow.print_processes() 

41 

42 self.workflow.set_user_params_types() 

43 

44 self.workflow.print_io() 

45 

46 def configure(self) -> None: 

47 

48 self.workflow.set_working_directory() 

49 

50 self.workflow.define_studies() 

51 self.workflow.init_studies() 

52 self.workflow.test_studies_modification() 

53 self.workflow.test_studies_settings() 

54 self.workflow.print_studies() 

55 

56 self.workflow.configure_inputs() 

57 self.workflow.init_data_tree() 

58 

59 self.workflow.init_process_settings() 

60 

61 def settings(self) -> None: 

62 

63 self.workflow.set_inputs() 

64 self.workflow.test_inputs_settings() 

65 self.workflow.print_inputs_settings() 

66 

67 self.workflow.init_paths() 

68 

69 def __call__(self) -> None: 

70 

71 self.workflow()