Closed clstaudt closed 1 year ago
@clstaudt what is the flow for this usecase querying the data from a cloud calendar
?
@vlad-ed-git
Details to be designed, but:
tuttle.calendar.ICloudCalendar
ICloudPyService
object (representing the cloud connection, needs to be supplied with the iCloud account name) and a calendar nameICloudCalendar.to_data
is called, returning a pandas.DataFrame
with all the time tracking calendar entries @vlad-ed-git The screen for getting the time tracking data from the cloud calendar may be as simple as having a reload button (🔄) and possibly a field or dropdown menu to set the calendar name.
When the reload button is clicked, a popup dialog asks for the iCloud password ( #103 ), then we see a progress bar and then the DataTable with the time tracking entries updates.
@clstaudt If I understand correctly, we have two instances.
Is this correct?
@vlad-ed-git
Re 1.: we can require that the account is configured in the preferences. The option to configure it "just in time" is not needed for the MVP. If it's not configured the option to get the time tracking data from the cloud is not available.
Re 2: For the first iteration a text field to set the name will do. Nice to have: There's probably a way to list all available calendars for the cloud account. In that case login would have to come before calendar selection.
Basically what the screen should do is calling timetracking.import_from_calendar
and display the resulting DataFrame:
def import_from_calendar(cal: Calendar) -> DataFrame
The calendar may be a FileCalendar
that was just uploaded or a CloudCalendar
that can be queried.
To simplify you may ignore the spreadsheet upload option for now.
@clstaudt please check the latest implementation if the setup is correct.
**there is some sort of glitch now with dialogs, I need to check the refactoring you have done on app.py
for this.
@vlad-ed-git I think it's a good start, let's refine tomorrow.
Is it actually accessing the calendar yet?
As I said, I think it's fair to expect the user to configure the account in the settings first. Also whether it's an iCloud or Google Calendar or... whatever account (CalDAV?). The rest of the code should be generic, talk about "cloud calendar", and be named accordingly. In the Time tracking screen, it says that the option is available when a cloud account has been configured.
I am referring to the flow on the UI. Calendar access is backend integration. I mean is the flow correct or do you wish to change it? By flow I mean: User clicks new, they see 3 options, one of them is to use iCloud acc (can be renamed to a more generic name, that's fine), they click on that and provide a calendar name and password (this acc is saved or pulled from the preferences setup). Or does configuration require more information?
On Tue, Jan 10, 2023 at 3:14 AM Christian Staudt @.***> wrote:
@vlad-ed-git https://github.com/vlad-ed-git I think it's a good start, let's refine tomorrow.
[image: Screenshot 2023-01-09 at 20 10 19] https://user-images.githubusercontent.com/875194/211388603-3c9045f3-b0b7-4070-bea6-ff0ba7621c51.png
Is it actually accessing the calendar yet?
As I said, I think it's fair to expect the user to configure the account in the settings first. Also whether it's an iCloud or Google Calendar or... whatever account (CalDAV?). The rest of the code should be generic, talk about "cloud calendar", and be named accordingly. In the Time tracking screen, it says that the option is available when a cloud account has been configured.
— Reply to this email directly, view it on GitHub https://github.com/tuttle-dev/tuttle/issues/101#issuecomment-1376152671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJGBW64X7M7P4LD7P32V2I3WRRPP3ANCNFSM6AAAAAATURI4RU . You are receiving this because you were mentioned.Message ID: @.***>
@vlad-ed-git There's an additional step for the cloud access we have to consider. Have a look at tuttle.cloud.login_iCloud
. It usually asks for a 2FA code that is displayed on your Mac or iPhone. In the UI there needs to be a popup that requests this code.
There is also an UI bug when trying to access the cloud calendar:
@vlad-ed-git I have trouble moving forward here because it seems entirely broken from the UI side: For example, when I try to upload an .ics file I get "new progress is being recorded" and then the app reloads. No error message displayed or logged. Error hiding? 👎👎👎
*The app reloads if you run the app using flet ... -r -d, which listens to all changes in all directories. Since you just upload a file to the uploads directory , this command intepretes it as a change in the app and reloads the app. Instead run the app without those flags .
*The intent shall pass to you the path to this ics file for processing (I think I have that in place already) . Same for spreadsheet.
On Wednesday, January 11, 2023, Christian Staudt @.***> wrote:
Assigned #101 https://github.com/tuttle-dev/tuttle/issues/101 to @vlad-ed-git https://github.com/vlad-ed-git.
Reply to this email directly, view it on GitHub https://github.com/tuttle-dev/tuttle/issues/101#event-8201257757, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJGBW6YUTDYK52THP3H4JDDWR2SL3ANCNFSM6AAAAAATURI4RU . You are receiving this because you were assigned.Message ID: @.***>
Yes I just noticed that. That's annoying, why does the reload option monitor the upload folder...
@vlad-ed-git
class TimeTrackingDataSource(SQLModelDataSourceMixin):
def __init__(self):
super().__init__()
def process_timetracking_file(self, file_name) -> IntentResult:
"""process a recently uploaded time tracking file in .xlsx or .ics format
returns was_intent_successful = True if processing completed successfully
else was_intent_successful = False and err_msg are set
"""
return IntentResult(was_intent_successful=True, data=None)
This codes hides the fact that processing the file is not yet implemented. What would be a better way to show that the intent is yet to be implemented?
@vlad-ed-git My tendency here is to go back to the drawing board together and trying to rewrite this screen.
Just have process_timetracking_file return intent successful as False with an Unimplemented error message.
On Wednesday, January 11, 2023, Christian Staudt @.***> wrote:
@vlad-ed-git https://github.com/vlad-ed-git My tendency here is to go back to the drawing board together and trying to rewrite this screen.
— Reply to this email directly, view it on GitHub https://github.com/tuttle-dev/tuttle/issues/101#issuecomment-1378853384, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJGBW63HPFRKRX2XJ6A4T4TWR3BCBANCNFSM6AAAAAATURI4RU . You are receiving this because you were mentioned.Message ID: @.***>
@clstaudt uploading a calendar file (.ics) now works. Please review. *Flet's data table control does not work for some reason (DataTable) cannot be imported. So I created a bare bones tabular structure instead.
@clstaudt I found the issue with not being able to import DataTable , I was using an earlier version of flet. Upgraded and now I can call the data_frame_to_data_table
method you created.
@vlad-ed-git great, that was a weird error because I already tested DataTable
After upgrading, pip is telling me this:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. tuttle 0.2.1 requires flet<0.2.0,>=0.1.65, but you have flet 0.3.2 which is incompatible.
The app works though. I can't find where this specification flet<0.2.0,>=0.1.65, is set.
On Sun, Jan 15, 2023 at 7:34 PM Christian Staudt @.***> wrote:
@vlad-ed-git https://github.com/vlad-ed-git great, that was a weird error because I already tested DataTable
— Reply to this email directly, view it on GitHub https://github.com/tuttle-dev/tuttle/issues/101#issuecomment-1383126254, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJGBW62VBGMD77GQQ77EQ4TWSPOERANCNFSM6AAAAAATURI4RU . You are receiving this because you were mentioned.Message ID: @.***>
Will investigate. Do you still have a pyproject.toml or poetry.lock file there? They should be gone. Did you use poetry for setup of the environment?
@vlad-ed-git When doing a clean install, I can't reproduce your dependency error. When in doubt clone a new copy of the repo. If you still encounter a problem create a new ticket please.
@clstaudt clean install worked. I also needed to remove conda as it was not playing well with my homebrew's python.
There are three ways of entering time tracking data:
Design the UX/UI for this and add to a screen.
Display the result, i.e. the time tracking data (e.g. via DataTable).
Preferences management: