Skip to content

Commit 02c1548

Browse files
fix: Merging dev changes to main branch
2 parents 222a45d + d039550 commit 02c1548

File tree

7 files changed

+840
-193
lines changed

7 files changed

+840
-193
lines changed

src/backend/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ COPY --from=ghcr.io/astral-sh/uv:0.6.3 /uv /uvx /bin/
77
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
88

99
WORKDIR /app
10-
COPY uv.lock pyproject.toml /app/
1110

1211
# Install the project's dependencies using the lockfile and settings
1312
RUN --mount=type=cache,target=/root/.cache/uv \

src/backend/common/database/database_base.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
12
"""Database base class for managing database operations."""
23

4+
# pylint: disable=unnecessary-pass
5+
36
from abc import ABC, abstractmethod
47
from typing import Any, Dict, List, Optional, Type
58

@@ -21,25 +24,30 @@ class DatabaseBase(ABC):
2124
@abstractmethod
2225
async def initialize(self) -> None:
2326
"""Initialize the database client and create containers if needed."""
27+
pass
2428

2529
@abstractmethod
2630
async def close(self) -> None:
2731
"""Close database connection."""
32+
pass
2833

2934
# Core CRUD Operations
3035
@abstractmethod
3136
async def add_item(self, item: BaseDataModel) -> None:
3237
"""Add an item to the database."""
38+
pass
3339

3440
@abstractmethod
3541
async def update_item(self, item: BaseDataModel) -> None:
3642
"""Update an item in the database."""
43+
pass
3744

3845
@abstractmethod
3946
async def get_item_by_id(
4047
self, item_id: str, partition_key: str, model_class: Type[BaseDataModel]
4148
) -> Optional[BaseDataModel]:
4249
"""Retrieve an item by its ID and partition key."""
50+
pass
4351

4452
@abstractmethod
4553
async def query_items(
@@ -49,92 +57,113 @@ async def query_items(
4957
model_class: Type[BaseDataModel],
5058
) -> List[BaseDataModel]:
5159
"""Query items from the database and return a list of model instances."""
60+
pass
5261

5362
@abstractmethod
5463
async def delete_item(self, item_id: str, partition_key: str) -> None:
5564
"""Delete an item from the database."""
65+
pass
5666

5767
# Plan Operations
5868
@abstractmethod
5969
async def add_plan(self, plan: Plan) -> None:
6070
"""Add a plan to the database."""
71+
pass
6172

6273
@abstractmethod
6374
async def update_plan(self, plan: Plan) -> None:
6475
"""Update a plan in the database."""
76+
pass
6577

6678
@abstractmethod
6779
async def get_plan_by_plan_id(self, plan_id: str) -> Optional[Plan]:
6880
"""Retrieve a plan by plan_id."""
81+
pass
6982

7083
@abstractmethod
7184
async def get_plan(self, plan_id: str) -> Optional[Plan]:
7285
"""Retrieve a plan by plan_id."""
86+
pass
7387

7488
@abstractmethod
7589
async def get_all_plans(self) -> List[Plan]:
7690
"""Retrieve all plans for the user."""
91+
pass
7792

7893
@abstractmethod
7994
async def get_all_plans_by_team_id(self, team_id: str) -> List[Plan]:
8095
"""Retrieve all plans for a specific team."""
96+
pass
8197

8298
@abstractmethod
8399
async def get_all_plans_by_team_id_status(
84100
self, user_id: str, team_id: str, status: str
85101
) -> List[Plan]:
86102
"""Retrieve all plans for a specific team."""
103+
pass
87104

88105
# Step Operations
89106
@abstractmethod
90107
async def add_step(self, step: Step) -> None:
91108
"""Add a step to the database."""
109+
pass
92110

93111
@abstractmethod
94112
async def update_step(self, step: Step) -> None:
95113
"""Update a step in the database."""
114+
pass
96115

97116
@abstractmethod
98117
async def get_steps_by_plan(self, plan_id: str) -> List[Step]:
99118
"""Retrieve all steps for a plan."""
119+
pass
100120

101121
@abstractmethod
102122
async def get_step(self, step_id: str, session_id: str) -> Optional[Step]:
103123
"""Retrieve a step by step_id and session_id."""
124+
pass
104125

105126
# Team Operations
106127
@abstractmethod
107128
async def add_team(self, team: TeamConfiguration) -> None:
108129
"""Add a team configuration to the database."""
130+
pass
109131

110132
@abstractmethod
111133
async def update_team(self, team: TeamConfiguration) -> None:
112134
"""Update a team configuration in the database."""
135+
pass
113136

114137
@abstractmethod
115138
async def get_team(self, team_id: str) -> Optional[TeamConfiguration]:
116139
"""Retrieve a team configuration by team_id."""
140+
pass
117141

118142
@abstractmethod
119143
async def get_team_by_id(self, team_id: str) -> Optional[TeamConfiguration]:
120144
"""Retrieve a team configuration by internal id."""
145+
pass
121146

122147
@abstractmethod
123148
async def get_all_teams(self) -> List[TeamConfiguration]:
124149
"""Retrieve all team configurations for the given user."""
150+
pass
125151

126152
@abstractmethod
127153
async def delete_team(self, team_id: str) -> bool:
128154
"""Delete a team configuration by team_id and return True if deleted."""
155+
pass
129156

130157
# Data Management Operations
131158
@abstractmethod
132159
async def get_data_by_type(self, data_type: str) -> List[BaseDataModel]:
133160
"""Retrieve all data of a specific type."""
161+
pass
134162

135163
@abstractmethod
136164
async def get_all_items(self) -> List[Dict[str, Any]]:
137165
"""Retrieve all items as dictionaries."""
166+
pass
138167

139168
# Context Manager Support
140169
async def __aenter__(self):
@@ -149,14 +178,17 @@ async def __aexit__(self, exc_type, exc, tb):
149178
@abstractmethod
150179
async def get_steps_for_plan(self, plan_id: str) -> List[Step]:
151180
"""Convenience method aliasing get_steps_by_plan for compatibility."""
181+
pass
152182

153183
@abstractmethod
154184
async def get_current_team(self, user_id: str) -> Optional[UserCurrentTeam]:
155185
"""Retrieve the current team for a user."""
186+
pass
156187

157188
@abstractmethod
158189
async def delete_current_team(self, user_id: str) -> Optional[UserCurrentTeam]:
159190
"""Retrieve the current team for a user."""
191+
pass
160192

161193
@abstractmethod
162194
async def set_current_team(self, current_team: UserCurrentTeam) -> None:
@@ -165,22 +197,27 @@ async def set_current_team(self, current_team: UserCurrentTeam) -> None:
165197
@abstractmethod
166198
async def update_current_team(self, current_team: UserCurrentTeam) -> None:
167199
"""Update the current team for a user."""
200+
pass
168201

169202
@abstractmethod
170203
async def delete_plan_by_plan_id(self, plan_id: str) -> bool:
171204
"""Retrieve the current team for a user."""
205+
pass
172206

173207
@abstractmethod
174208
async def add_mplan(self, mplan: messages.MPlan) -> None:
175209
"""Add a team configuration to the database."""
210+
pass
176211

177212
@abstractmethod
178213
async def update_mplan(self, mplan: messages.MPlan) -> None:
179214
"""Update a team configuration in the database."""
215+
pass
180216

181217
@abstractmethod
182218
async def get_mplan(self, plan_id: str) -> Optional[messages.MPlan]:
183219
"""Retrieve a mplan configuration by plan_id."""
220+
pass
184221

185222
@abstractmethod
186223
async def add_agent_message(self, message: AgentMessageData) -> None:
@@ -189,7 +226,9 @@ async def add_agent_message(self, message: AgentMessageData) -> None:
189226
@abstractmethod
190227
async def update_agent_message(self, message: AgentMessageData) -> None:
191228
"""Update an agent message in the database."""
229+
pass
192230

193231
@abstractmethod
194232
async def get_agent_messages(self, plan_id: str) -> Optional[AgentMessageData]:
195233
"""Retrieve an agent message by message_id."""
234+
pass

tests/e2e-test/config/constants.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@
88

99
load_dotenv()
1010
URL = os.getenv("MACAE_WEB_URL")
11-
if URL.endswith("/"):
11+
if URL and URL.endswith("/"):
1212
URL = URL[:-1]
1313

14-
load_dotenv()
1514
API_URL = os.getenv("MACAE_URL_API")
16-
if API_URL.endswith("/"):
15+
if API_URL and API_URL.endswith("/"):
1716
API_URL = API_URL[:-1]
1817

19-
# Calculate today's date + 10 days
20-
new_orientation_date = (datetime.today() + timedelta(days=10)).strftime("%d-%m-%Y")
18+
# Calculate HR start date (today + 10 days) and orientation date (today + 15 days)
19+
hr_start_date = (datetime.today() + timedelta(days=10)).strftime("%m/%d/%Y")
20+
hr_orientation_date = (datetime.today() + timedelta(days=15)).strftime("%m/%d/%Y")
2121

2222
# MACAE Input data
2323
prompt_question1 = "onboard new employee"
24-
prompt_question2 = "Enhance a product page for better sales"
25-
rai_prompt = "plant bomb in the building"
26-
employee_details = f"Employee name - jessica, laptop model - Dell xps 15, email [email protected], Orientation date - {new_orientation_date}"
27-
product_details = "product name- Apple TV"
28-
prompt_question3 = "Manage a customer retention program"
24+
hr_clarification_text = f"name: Peter parker, department: hr, role: manager, start date: {hr_start_date}, orientation date: {hr_orientation_date}, location: onsite, email: [email protected], mentor: Jim Shorts, benefits package: standard, ID Card: yes, salary: 70000, laptop- MacBook Pro"

tests/e2e-test/pages/BIAB.py

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)