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

33 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-07-01 12:55 +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 CANCELED = "CANCELED" 

34 """ 

35 Jobs and tasks in this state are canceled. 

36 Jobs and tasks in this state cannot be canceled. 

37 """ 

38 COMPLETED = "COMPLETED" 

39 """ 

40 Jobs and tasks in this state are completed. 

41 Jobs and tasks in this state cannot be canceled. 

42 """ 

43 FAILED = "FAILED" 

44 """ 

45 Jobs and tasks in this state are failed. 

46 Jobs and tasks in this state cannot be canceled. 

47 """ 

48 

49 

50class InputType(Enum): 

51 """Input type specification""" 

52 

53 EDITOR = "EDITOR" 

54 """ 

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

56 """ 

57 FILES = "FILES" 

58 """ 

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

60 """ 

61 

62 

63class SimulationType(Enum): 

64 """Simulation type specification""" 

65 

66 SHIELDHIT = "shieldhit" 

67 """ 

68 Simulation run with SHIELD-HIT12A. 

69 """ 

70 TOPAS = "topas" 

71 """ 

72 Simulation run with TOPAS. 

73 """ 

74 FLUKA = "fluka" 

75 """ 

76 Simulation run with FLUKA. 

77 """ 

78 DUMMY = "dummy" 

79 """ 

80 Simulation run with dummy simulator. 

81 """