AIdeaText commited on
Commit
09bd622
verified
1 Parent(s): 8ecaf5d

Update modules/__init__.py

Browse files
Files changed (1) hide show
  1. modules/__init__.py +112 -111
modules/__init__.py CHANGED
@@ -1,112 +1,113 @@
1
- # modules/__init__.py
2
-
3
- def load_auth_functions():
4
- from .auth.auth import authenticate_student, register_student, update_student_info, delete_student
5
- return {
6
- 'authenticate_student': authenticate_student,
7
- 'register_student': register_student,
8
- 'update_student_info': update_student_info,
9
- 'delete_student': delete_student
10
- }
11
-
12
- def load_database_functions():
13
-
14
- from .database.database_init import (
15
- initialize_database_connections
16
- )
17
-
18
- from .database.sql_db import (
19
- create_student_user,
20
- get_student_user,
21
- update_student_user,
22
- delete_student_user,
23
- store_application_request,
24
- store_student_feedback
25
- )
26
- from .database.mongo_db import (
27
- get_collection,
28
- insert_document,
29
- find_documents,
30
- update_document,
31
- delete_document,
32
- )
33
- from .database.morphosintax_mongo_db import (
34
- store_student_morphosyntax_result,
35
- get_student_morphosyntax_analysis,
36
- update_student_morphosyntax_analysis,
37
- delete_student_morphosyntax_analysis,
38
- get_student_morphosyntax_data
39
- )
40
- from .database.chat_db import store_chat_history, get_chat_history
41
-
42
- return {
43
- 'initialize_database_connections': initialize_database_connections,
44
- 'create_student_user': create_student_user,
45
- 'get_student_user': get_student_user,
46
- 'update_student_user': update_student_user,
47
- 'delete_student_user': delete_student_user,
48
- 'store_application_request': store_application_request,
49
- 'store_student_feedback': store_student_feedback,
50
- 'get_collection': get_collection,
51
- 'insert_document': insert_document,
52
- 'find_documents': find_documents,
53
- 'update_document': update_document,
54
- 'delete_document': delete_document,
55
- 'store_student_morphosyntax_result': store_student_morphosyntax_result,
56
- 'get_student_morphosyntax_analysis': get_student_morphosyntax_analysis,
57
- 'update_student_morphosyntax_analysis': update_student_morphosyntax_analysis,
58
- 'delete_student_morphosyntax_analysis': delete_student_morphosyntax_analysis,
59
- 'get_student_morphosyntax_data': get_student_morphosyntax_data,
60
- 'store_chat_history': store_chat_history,
61
- 'get_chat_history': get_chat_history
62
- }
63
-
64
- def load_ui_functions():
65
- # No importamos nada de ui.py aqu铆
66
- return {} # Retornamos un diccionario vac铆o
67
-
68
- def load_student_activities_functions():
69
- from .studentact.student_activities import display_student_progress
70
- return {
71
- 'display_student_progress': display_student_progress
72
- }
73
-
74
- def load_morphosyntax_functions():
75
- from .morphosyntax.morphosyntax_interface import display_morphosyntax_interface
76
- from .morphosyntax.morphosyntax_process import process_morphosyntactic_input
77
- return {
78
- 'display_morphosyntax_interface': display_morphosyntax_interface,
79
- 'process_morphosyntactic_input': process_morphosyntactic_input
80
- }
81
-
82
- def load_admin_functions():
83
- from .admin.admin_ui import admin_page
84
- return {
85
- 'admin_page': admin_page
86
- }
87
-
88
- def load_utils_functions():
89
- from .utils.spacy_utils import load_spacy_models
90
- return {
91
- 'load_spacy_models': load_spacy_models
92
- }
93
-
94
- def load_chatbot_functions():
95
- from .chatbot.chatbot import initialize_chatbot, process_chat_input
96
- return {
97
- 'initialize_chatbot': initialize_chatbot,
98
- 'process_chat_input': process_chat_input
99
- }
100
-
101
- # Funci贸n para cargar todas las funciones
102
- def load_all_functions():
103
- return {
104
- **load_auth_functions(),
105
- **load_database_functions(),
106
- # **load_ui_functions(),
107
- **load_admin_functions(),
108
- **load_morphosyntax_functions(),
109
- **load_utils_functions(),
110
- **load_chatbot_functions(),
111
- **load_student_activities_functions()
 
112
  }
 
1
+ # modules/__init__.py
2
+
3
+ def load_auth_functions():
4
+ from .auth.auth import authenticate_student, register_student, update_student_info, delete_student
5
+ return {
6
+ 'authenticate_student': authenticate_student,
7
+ 'register_student': register_student,
8
+ 'update_student_info': update_student_info,
9
+ 'delete_student': delete_student
10
+ }
11
+
12
+ def load_database_functions():
13
+
14
+ from .database.database_init import (
15
+ initialize_database_connections
16
+ )
17
+
18
+ from .database.sql_db import (
19
+ create_student_user,
20
+ get_student_user,
21
+ update_student_user,
22
+ delete_student_user,
23
+ store_application_request,
24
+ store_student_feedback
25
+ )
26
+ from .database.mongo_db import (
27
+ get_collection,
28
+ insert_document,
29
+ find_documents,
30
+ update_document,
31
+ delete_document,
32
+ )
33
+ from .database.morphosintax_mongo_db import (
34
+ store_student_morphosyntax_result,
35
+ get_student_morphosyntax_analysis,
36
+ update_student_morphosyntax_analysis,
37
+ delete_student_morphosyntax_analysis,
38
+ get_student_morphosyntax_data
39
+ )
40
+ from .database.chat_db import store_chat_history, get_chat_history
41
+
42
+ return {
43
+ 'initialize_database_connections': initialize_database_connections,
44
+ 'create_student_user': create_student_user,
45
+ 'get_student_user': get_student_user,
46
+ 'update_student_user': update_student_user,
47
+ 'delete_student_user': delete_student_user,
48
+ 'store_application_request': store_application_request,
49
+ 'store_student_feedback': store_student_feedback,
50
+ 'get_collection': get_collection,
51
+ 'insert_document': insert_document,
52
+ 'find_documents': find_documents,
53
+ 'update_document': update_document,
54
+ 'delete_document': delete_document,
55
+ 'store_student_morphosyntax_result': store_student_morphosyntax_result,
56
+ 'get_student_morphosyntax_analysis': get_student_morphosyntax_analysis,
57
+ 'update_student_morphosyntax_analysis': update_student_morphosyntax_analysis,
58
+ 'delete_student_morphosyntax_analysis': delete_student_morphosyntax_analysis,
59
+ 'get_student_morphosyntax_data': get_student_morphosyntax_data,
60
+ 'store_chat_history': store_chat_history,
61
+ 'get_chat_history': get_chat_history
62
+ }
63
+
64
+ def load_ui_functions():
65
+ # No importamos nada de ui.py aqu铆
66
+ return {} # Retornamos un diccionario vac铆o
67
+
68
+ def load_student_activities_functions():
69
+ from .studentact.student_activities import display_student_progress
70
+ return {
71
+ 'display_student_progress': display_student_progress
72
+ }
73
+
74
+ def load_morphosyntax_functions():
75
+ from .morphosyntax.morphosyntax_interface import display_morphosyntax_interface
76
+ from .morphosyntax.morphosyntax_process import process_morphosyntactic_input, format_analysis_results
77
+ return {
78
+ 'display_morphosyntax_interface': display_morphosyntax_interface,
79
+ 'process_morphosyntactic_input': process_morphosyntactic_input,
80
+ 'format_analysis_results': format_analysis_results
81
+ }
82
+
83
+ def load_admin_functions():
84
+ from .admin.admin_ui import admin_page
85
+ return {
86
+ 'admin_page': admin_page
87
+ }
88
+
89
+ def load_utils_functions():
90
+ from .utils.spacy_utils import load_spacy_models
91
+ return {
92
+ 'load_spacy_models': load_spacy_models
93
+ }
94
+
95
+ def load_chatbot_functions():
96
+ from .chatbot.chatbot import initialize_chatbot, process_chat_input
97
+ return {
98
+ 'initialize_chatbot': initialize_chatbot,
99
+ 'process_chat_input': process_chat_input
100
+ }
101
+
102
+ # Funci贸n para cargar todas las funciones
103
+ def load_all_functions():
104
+ return {
105
+ **load_auth_functions(),
106
+ **load_database_functions(),
107
+ # **load_ui_functions(),
108
+ **load_admin_functions(),
109
+ **load_morphosyntax_functions(),
110
+ **load_utils_functions(),
111
+ **load_chatbot_functions(),
112
+ **load_student_activities_functions()
113
  }