Skip to content

Commit

Permalink
src/leaders.py: Fix progress from start in robotx reminder
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Sep 3, 2024
1 parent dd7da93 commit f02d4a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/leaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ async def robotx_reminder(self):
today = datetime.date.today()
if today < LEAVE_DATE:
days = (LEAVE_DATE - today).days
start_days = (FALL_START - today).days
progress_ratio = (start_days - days) / start_days
total_days = (LEAVE_DATE - FALL_START).days
progress_ratio = (total_days - days) / total_days
estimated_testings = days // (7 / 2) # assuming two testings per week
await self.bot.leaders_channel.send(
f"Good morning! There are **{days} days** (progress from start: {progress_ratio:.2f}%) until we leave for competition! (estimated testings remaining: **{estimated_testings:.0f}**)\n{self._schedule_generator(FALL_START, EVENT_SUBMISSION, DESIGN_SUBMISSION, ROBOTX_START, ROBOTX_END)}",
f"Good morning! There are **{days} days** (progress from start: {progress_ratio:.2%}) until we leave for competition! (estimated testings remaining: **{estimated_testings:.0f}**)\n{self._schedule_generator(FALL_START, EVENT_SUBMISSION, DESIGN_SUBMISSION, ROBOTX_START, ROBOTX_END)}",
)

@run_on_weekday(
Expand Down

0 comments on commit f02d4a2

Please sign in to comment.