move-fast-and-break-things / minerva

GPT-powered Telegram bot built to help community members learn software development
MIT License
13 stars 1 forks source link

bug: Minerva doesn't update the calendar info until it is restarted #19

Open yurijmikhalevich opened 1 week ago

yurijmikhalevich commented 1 week ago

Minerva should update the calendar info periodically to reflect the latest changes.

mohitahlawat2001 commented 1 week ago

can you assign me this issue , i will try my best to solve this issue , if possible can you tell which file i need to make change to solve this or where i should more focus...

yurijmikhalevich commented 1 week ago

@mohitahlawat2001, thank you for reaching out. Of course, assigned! 😄

In the calendar tool we have code that fetches the calendar, here:

https://github.com/move-fast-and-break-things/minerva/blob/35346631b43169afc08ff8af682e5185b5471e8f/minerva/tools/calendar.py#L58-L62

We need to update it to refetch the calendar data every 15 minutes – it would be perfect to make the interval configurable via the env variable.

You can test that it works by adding a unit test here: https://github.com/move-fast-and-break-things/minerva/blob/main/tests/tools/calendar_test.py. I would start by adding a test. Check out how some other tests are done.

In this test, I would:

Let me know if I can help with anything.

mohitahlawat2001 commented 1 week ago

image after docker command it stick here then have to force stop can you tell me how i can run normal install giving this image

or should i make pr , i already make changes calendar.py and calendar_test.py

yurijmikhalevich commented 1 week ago

@mohitahlawat2001, thank you for the update!

should i make pr , i already make changes calendar.py and calendar_test.py

Yes, please, do make the PR.

Regarding poetry and docker:

  1. You may ignore warnings you see from docker compose up, it's fine for now.
  2. Currently, you need python 3.12.5 or higher to setup Minerva. a. Actually, can you open a separate PR in which change this line to say ~3.12.0 instead of ~3.12.5. It will resolve your issue. https://github.com/move-fast-and-break-things/minerva/blob/35346631b43169afc08ff8af682e5185b5471e8f/pyproject.toml#L10