Coverage for yaptide/utils/enums.py: 100%

37 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-01-04 00:31 +0000

1from enum import Enum 

2 

3 

4class PlatformType(Enum): 

5 """Platform specification""" 

6 

7 DIRECT = "DIRECT" 

8 """ 

9 Simulation run with Celery directly on the server. 

10 """ 

11 BATCH = "BATCH" 

12 """ 

13 Simulation run on the cluster with Slurm. 

14 """ 

15 

16 

17class EntityState(Enum): 

18 """Job and task state types""" 

19 

20 UNKNOWN = "UNKNOWN" 

21 """ 

22 This state is used only for jobs which are not yet submitted but was created in the database. 

23 Jobs in this state cannot be canceled. 

24 """ 

25 PENDING = "PENDING" 

26 """ 

27 Jobs and tasks in this state are waiting for execution. 

28 """ 

29 RUNNING = "RUNNING" 

30 """ 

31 Jobs and tasks in this state are currently running. 

32 """ 

33 MERGING_QUEUED = "MERGING_QUEUED" 

34 """ 

35 All the tasks completed they work. 

36 The process to merge their output is queued and waiting for execution. 

37 """ 

38 MERGING_RUNNING = "MERGING_RUNNING" 

39 """ 

40 Merging process started its execution and is aggregating the simulation results. 

41 """ 

42 CANCELED = "CANCELED" 

43 """ 

44 Jobs and tasks in this state are canceled. 

45 Jobs and tasks in this state cannot be canceled. 

46 """ 

47 COMPLETED = "COMPLETED" 

48 """ 

49 Jobs and tasks in this state are completed. 

50 Jobs and tasks in this state cannot be canceled. 

51 """ 

52 FAILED = "FAILED" 

53 """ 

54 Jobs and tasks in this state are failed. 

55 Jobs and tasks in this state cannot be canceled. 

56 """ 

57 

58 

59class InputType(Enum): 

60 """Input type specification""" 

61 

62 EDITOR = "EDITOR" 

63 """ 

64 Simulation was submitted with the usage of UI editor json. 

65 """ 

66 FILES = "FILES" 

67 """ 

68 Simulation was submitted with the usage of input files in the format expected by the simulator. 

69 """ 

70 

71 

72class SimulationType(Enum): 

73 """Simulation type specification""" 

74 

75 SHIELDHIT = "shieldhit" 

76 """ 

77 Simulation run with SHIELD-HIT12A. 

78 """ 

79 TOPAS = "topas" 

80 """ 

81 Simulation run with TOPAS. 

82 """ 

83 FLUKA = "fluka" 

84 """ 

85 Simulation run with FLUKA. 

86 """ 

87 DUMMY = "dummy" 

88 """ 

89 Simulation run with dummy simulator. 

90 """