Coverage for src/edwh/__init__.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-13 17:03 +0200

1""" 

2This file exposes some functions so this tool can be used as a library. 

3""" 

4 

5# SPDX-FileCopyrightText: 2023-present Remco Boerma <remco.b@educationwarehouse.nl> 

6# 

7# SPDX-License-Identifier: MIT 

8 

9from ewok import Task, task 

10from ewok.monkey import monkeypatch_invoke 

11 

12monkeypatch_invoke("edwh") 

13 

14from . import tasks # noqa E402 - must be below monkeypatch 

15from .constants import DOCKER_COMPOSE # noqa E402 - must be below monkeypatch 

16from .health import ( # noqa E402 - must be below monkeypatch 

17 HealthLevel, 

18 HealthStatus, 

19 docker_inspect, 

20 find_container_ids, 

21 find_containers_ids, 

22 get_healths, 

23) 

24from .helpers import ( # noqa E402 - must be below monkeypatch 

25 KEY_ARROWDOWN, 

26 KEY_ARROWUP, 

27 KEY_ENTER, 

28 AnyDict, 

29 Logger, 

30 NoopLogger, 

31 VerboseLogger, 

32 add_alias, 

33 arg_was_passed, 

34 confirm, 

35 dc_config, 

36 dump_set_as_list, 

37 executes_correctly, 

38 execution_fails, 

39 fabric_read, 

40 fabric_read_bytes, 

41 fabric_write, 

42 flatten, 

43 generate_password, 

44 interactive_selected_checkbox_values, 

45 interactive_selected_radio_value, 

46 kwargs_to_options, 

47 noop, 

48 print_aligned, 

49 print_box, 

50 shorten, 

51 yaml_loads, 

52) 

53from .meta import is_installed # noqa E402 - must be below monkeypatch 

54from .tasks import ( # noqa E402 - must be below monkeypatch 

55 TomlConfig, 

56 check_env, 

57 get_env_value, 

58 get_task, 

59 read_dotenv, 

60 set_env_value, 

61 task_for_namespace, 

62) 

63 

64ImprovedTask = Task 

65improved_task = task 

66 

67__all__ = [ 

68 "DOCKER_COMPOSE", 

69 "KEY_ARROWDOWN", 

70 "KEY_ARROWUP", 

71 "KEY_ENTER", 

72 "AnyDict", 

73 "HealthLevel", 

74 "HealthStatus", 

75 "ImprovedTask", 

76 "Logger", 

77 "NoopLogger", 

78 "Task", 

79 "TomlConfig", 

80 "VerboseLogger", 

81 "add_alias", 

82 "arg_was_passed", 

83 "check_env", 

84 "confirm", 

85 "dc_config", 

86 "docker_inspect", 

87 "dump_set_as_list", 

88 "executes_correctly", 

89 "execution_fails", 

90 "fabric_read", 

91 "fabric_read_bytes", 

92 "fabric_write", 

93 "find_container_ids", 

94 "find_containers_ids", 

95 "flatten", 

96 "generate_password", 

97 "get_env_value", 

98 "get_healths", 

99 "get_task", 

100 "improved_task", 

101 "interactive_selected_checkbox_values", 

102 "interactive_selected_radio_value", 

103 "is_installed", 

104 "kwargs_to_options", 

105 "noop", 

106 "print_aligned", 

107 "print_box", 

108 "read_dotenv", 

109 "set_env_value", 

110 "shorten", 

111 "task", 

112 "task_for_namespace", 

113 "tasks", 

114 "yaml_loads", 

115]