bizy-ai 1.1.0__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent/cli.py +18 -5
- agent/core.py +4 -4
- agent/models.py +2 -2
- agent/tasks.py +26 -13
- {bizy_ai-1.1.0.dist-info → bizy_ai-1.1.1.dist-info}/METADATA +1 -1
- {bizy_ai-1.1.0.dist-info → bizy_ai-1.1.1.dist-info}/RECORD +10 -10
- {bizy_ai-1.1.0.dist-info → bizy_ai-1.1.1.dist-info}/WHEEL +0 -0
- {bizy_ai-1.1.0.dist-info → bizy_ai-1.1.1.dist-info}/entry_points.txt +0 -0
- {bizy_ai-1.1.0.dist-info → bizy_ai-1.1.1.dist-info}/licenses/LICENSE +0 -0
- {bizy_ai-1.1.0.dist-info → bizy_ai-1.1.1.dist-info}/top_level.txt +0 -0
agent/cli.py
CHANGED
@@ -362,23 +362,36 @@ def stats():
|
|
362
362
|
"""Show statistics"""
|
363
363
|
task_mgr = TaskManager()
|
364
364
|
weekly_stats = task_mgr.get_weekly_task_stats()
|
365
|
-
|
365
|
+
today_summary = task_mgr.get_daily_summary()
|
366
|
+
yesterday_summary = task_mgr.get_yesterday_summary()
|
367
|
+
velocity = task_mgr.get_task_velocity(days=7) # Use 7-day velocity to match weekly context
|
366
368
|
today_tasks = task_mgr.get_tasks_for_today()
|
367
369
|
|
368
370
|
console.print("\n[bold cyan]📊 Your Statistics[/bold cyan]\n")
|
369
|
-
|
371
|
+
|
372
|
+
# Today's stats
|
373
|
+
console.print("[bold]Today:[/bold]")
|
374
|
+
console.print(f" • Tasks Completed: {today_summary['tasks_completed']}")
|
375
|
+
console.print(f" • Tasks Scheduled: {len(today_tasks)}")
|
376
|
+
|
377
|
+
# Yesterday's stats
|
378
|
+
console.print(f"\n[bold]Yesterday:[/bold]")
|
379
|
+
console.print(f" • Tasks Completed: {yesterday_summary['tasks_completed']}")
|
380
|
+
|
381
|
+
# Weekly stats
|
382
|
+
console.print(f"\n[bold]This Week:[/bold]")
|
370
383
|
console.print(f" • Tasks Completed: {weekly_stats['tasks_completed_this_week']}")
|
371
384
|
console.print(f" • Tasks Created: {weekly_stats['tasks_created_this_week']}")
|
372
385
|
console.print(f" • Completion Rate: {weekly_stats['completion_rate']:.1f}%")
|
373
386
|
console.print(f" • Total Hours (Estimated): {weekly_stats['total_estimated_hours']:.1f}h")
|
374
387
|
if weekly_stats['total_actual_hours'] > 0:
|
375
388
|
console.print(f" • Total Hours (Actual): {weekly_stats['total_actual_hours']:.1f}h")
|
376
|
-
|
377
|
-
console.print(f"\n[bold]
|
389
|
+
|
390
|
+
console.print(f"\n[bold]Velocity:[/bold] {velocity:.1f} tasks/day\n")
|
378
391
|
|
379
392
|
# Show breakdown by category if available
|
380
393
|
if weekly_stats['categories']:
|
381
|
-
console.print("[bold]By Category:[/bold]")
|
394
|
+
console.print("[bold]By Category (This Week):[/bold]")
|
382
395
|
for category, count in sorted(weekly_stats['categories'].items(), key=lambda x: x[1], reverse=True):
|
383
396
|
console.print(f" • {category}: {count} task(s)")
|
384
397
|
console.print()
|
agent/core.py
CHANGED
@@ -127,10 +127,10 @@ Be supportive but honest. Keep it concise."""
|
|
127
127
|
WEEK ENDING: {datetime.now().strftime('%B %d, %Y')}
|
128
128
|
|
129
129
|
STATS:
|
130
|
-
- Total Tasks Completed: {weekly_stats.get('
|
131
|
-
- Total Tasks
|
132
|
-
-
|
133
|
-
-
|
130
|
+
- Total Tasks Completed: {weekly_stats.get('tasks_completed_this_week', 0)}
|
131
|
+
- Total Tasks Created: {weekly_stats.get('tasks_created_this_week', 0)}
|
132
|
+
- Completion Rate: {weekly_stats.get('completion_rate', 0):.1f}%
|
133
|
+
- Total Hours (Estimated): {weekly_stats.get('total_estimated_hours', 0):.1f}h
|
134
134
|
|
135
135
|
GOAL PROGRESS:
|
136
136
|
{goals_progress}
|
agent/models.py
CHANGED
@@ -18,8 +18,8 @@ class Task(Base):
|
|
18
18
|
estimated_hours = Column(Float)
|
19
19
|
actual_hours = Column(Float)
|
20
20
|
due_date = Column(DateTime)
|
21
|
-
created_at = Column(DateTime, default=datetime.
|
22
|
-
completed_at = Column(DateTime)
|
21
|
+
created_at = Column(DateTime, default=datetime.now) # LOCAL time for consistency
|
22
|
+
completed_at = Column(DateTime) # LOCAL time, set by complete_task()
|
23
23
|
parent_goal_id = Column(Integer) # Links to goals
|
24
24
|
dependencies = Column(JSON) # List of task IDs this depends on
|
25
25
|
notes = Column(Text)
|
agent/tasks.py
CHANGED
@@ -118,16 +118,21 @@ class TaskManager:
|
|
118
118
|
).order_by(Task.due_date, Task.priority).all()
|
119
119
|
|
120
120
|
def get_daily_summary(self, date_obj=None):
|
121
|
-
"""
|
121
|
+
"""
|
122
|
+
Get summary of tasks for a specific day.
|
123
|
+
Shows tasks completed on this day regardless of due date.
|
124
|
+
All timestamps are in LOCAL time.
|
125
|
+
"""
|
122
126
|
if date_obj is None:
|
123
127
|
date_obj = datetime.now()
|
124
|
-
|
128
|
+
|
125
129
|
if isinstance(date_obj, date) and not isinstance(date_obj, datetime):
|
126
130
|
date_obj = datetime.combine(date_obj, datetime.min.time())
|
127
|
-
|
131
|
+
|
132
|
+
# Use LOCAL time boundaries (midnight to midnight)
|
128
133
|
day_start = date_obj.replace(hour=0, minute=0, second=0, microsecond=0)
|
129
134
|
day_end = day_start + timedelta(days=1)
|
130
|
-
|
135
|
+
|
131
136
|
# Get tasks due on this day
|
132
137
|
tasks_due = self.session.query(Task).filter(
|
133
138
|
and_(
|
@@ -135,20 +140,28 @@ class TaskManager:
|
|
135
140
|
Task.due_date < day_end
|
136
141
|
)
|
137
142
|
).all()
|
138
|
-
|
139
|
-
# Get tasks completed on this day
|
143
|
+
|
144
|
+
# Get tasks completed on this day (using LOCAL time)
|
140
145
|
tasks_completed = self.session.query(Task).filter(
|
141
146
|
and_(
|
142
147
|
Task.completed_at >= day_start,
|
143
148
|
Task.completed_at < day_end
|
144
149
|
)
|
145
150
|
).all()
|
146
|
-
|
151
|
+
|
152
|
+
# Calculate completion rate based on tasks that were due
|
153
|
+
# If no tasks were due, show N/A but still show completed count
|
154
|
+
if tasks_due:
|
155
|
+
completed_count = len([t for t in tasks_due if t.status == 'completed'])
|
156
|
+
completion_rate = completed_count / len(tasks_due)
|
157
|
+
else:
|
158
|
+
completion_rate = 0
|
159
|
+
|
147
160
|
return {
|
148
161
|
'date': date_obj.strftime('%Y-%m-%d'),
|
149
162
|
'tasks_due': len(tasks_due),
|
150
|
-
'tasks_completed': len(tasks_completed),
|
151
|
-
'completion_rate':
|
163
|
+
'tasks_completed': len(tasks_completed), # All tasks completed today
|
164
|
+
'completion_rate': completion_rate, # Based on tasks that were due
|
152
165
|
'completed_tasks': [t.to_dict() for t in tasks_completed],
|
153
166
|
'pending_tasks': [t.to_dict() for t in tasks_due if t.status != 'completed']
|
154
167
|
}
|
@@ -249,8 +262,8 @@ class TaskManager:
|
|
249
262
|
|
250
263
|
def get_completed_tasks_this_week(self, days=7):
|
251
264
|
"""Get tasks completed in the last N days based on completed_at timestamp"""
|
252
|
-
# Use
|
253
|
-
now = datetime.
|
265
|
+
# Use LOCAL time to match database timestamps
|
266
|
+
now = datetime.now()
|
254
267
|
start_date = now - timedelta(days=days)
|
255
268
|
|
256
269
|
completed_tasks = self.session.query(Task).filter(
|
@@ -265,8 +278,8 @@ class TaskManager:
|
|
265
278
|
|
266
279
|
def get_created_tasks_this_week(self, days=7):
|
267
280
|
"""Get tasks created in the last N days based on created_at timestamp"""
|
268
|
-
# Use
|
269
|
-
now = datetime.
|
281
|
+
# Use LOCAL time to match database timestamps
|
282
|
+
now = datetime.now()
|
270
283
|
start_date = now - timedelta(days=days)
|
271
284
|
|
272
285
|
created_tasks = self.session.query(Task).filter(
|
@@ -1,21 +1,21 @@
|
|
1
1
|
agent/__init__.py,sha256=pHeIDi-ibuwZqaNqxdIDRvzedWtPywssbaYIDawMcvQ,88
|
2
|
-
agent/cli.py,sha256=
|
3
|
-
agent/core.py,sha256=
|
2
|
+
agent/cli.py,sha256=AmYJ1zOxupVM99zcEUdyTZ6s1sYihAmCzj-MsS_XMyg,15664
|
3
|
+
agent/core.py,sha256=SOOTfIukpf4FWJ7EESQDae71tDM33pwx6dtrMNgYb3U,6581
|
4
4
|
agent/evening_review.py,sha256=Y4d-t62zfaufM8mnSvkhBBZ0wMw1R8jtj4cN8r30t4E,4929
|
5
|
-
agent/models.py,sha256=
|
5
|
+
agent/models.py,sha256=Uqj-1ahCjcjqMN8hcwCcHVSQ8ywHjrwf9klz3I_XCEE,8792
|
6
6
|
agent/morning_brief.py,sha256=zcu4nUOnIQtoZTiK1XlEjuudiUAABrps3PvAwt2Avmk,4732
|
7
7
|
agent/plan_manager.py,sha256=7ipJBW-QS308dSpULjJGcDPjsXKA-yVh1mljFejCv_U,12225
|
8
8
|
agent/planner.py,sha256=-KlyZ-2jMQTUy0QVZCH_NuubENU-UrPXVhat3ju54ew,13114
|
9
9
|
agent/research.py,sha256=HvqGHENQ0v1lJadGYNuf3eb6fZoR6qzzIPzqcsnhFSE,6429
|
10
|
-
agent/tasks.py,sha256=
|
10
|
+
agent/tasks.py,sha256=uB-VRpkizCw4JMP0s8c4-zk8m8uJDo8ccl8OaL1sLuc,12691
|
11
11
|
agent/weekly_review.py,sha256=83fYwe3hKEhqAQfMlj7WmvvMhTNHtUnqr1PFXCHRGWo,2394
|
12
|
-
bizy_ai-1.1.
|
12
|
+
bizy_ai-1.1.1.dist-info/licenses/LICENSE,sha256=__BSNgmbeWQ1IA57XKyGhQajUNcF-pZjvBAY268fCWM,1069
|
13
13
|
scripts/init_db.py,sha256=lF1rJAuaeOX19dYQKURzePYWmjkjLPH_4L0D2OiRgQA,3376
|
14
14
|
scripts/load_business_plan.py,sha256=gb4_NPL39PX5yie7zENYgViPBoTqHaLYbTGXPdZU9wM,3560
|
15
15
|
scripts/migrate_db.py,sha256=b51nlLn62nThDGRNqPbxT3jNM2Zdg56hKyymYFTcrUk,1220
|
16
16
|
scripts/scheduler.py,sha256=4LDL7Mb8ZWeOFpy6i8LuMff4HWjFwm10XrcMpLkZmUY,3459
|
17
|
-
bizy_ai-1.1.
|
18
|
-
bizy_ai-1.1.
|
19
|
-
bizy_ai-1.1.
|
20
|
-
bizy_ai-1.1.
|
21
|
-
bizy_ai-1.1.
|
17
|
+
bizy_ai-1.1.1.dist-info/METADATA,sha256=BvXrex7fVli39Rq-bRjZ3yuKrKALb-un-WDN96PnucU,13726
|
18
|
+
bizy_ai-1.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
+
bizy_ai-1.1.1.dist-info/entry_points.txt,sha256=yDZc2xFUlCOPuHtAaNissB16AZFzOnOL8xeStkDujAg,39
|
20
|
+
bizy_ai-1.1.1.dist-info/top_level.txt,sha256=k5ce4bNe_tK9tse1lxY4b8nPSipbtgoA28GHmM2ojwk,14
|
21
|
+
bizy_ai-1.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|