All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- Updated
requestsand its dependencies.
- Updated
urllib3.
- Updated
urllib3.
- Updated
google-api-python-clientto 2.0.2 and its dependencies. Although this is a breaking change from the module's end, no changes were needed for the project. - The project has been linted with
Flake8andmypy.
- Updated
pyyamlandrsafor dependabot alerts.
- The project has been renamed to Caltab for brevity: a tab (spreadsheet) with calendar entries' durations.
- Renamed
process.pyto main.py. - Moved all module-level code in main.py into separate function
main(). - Moved all Google API related modules into new directory google.
- Changed return value of
api_handler.authorize()to the credentials. - Improved README; rewrote to clarify vocabulary and detailed steps for setup.
- Configuration has been simplified; to maintain separation, neither calendars nor sheets/tabs are nested in the other. Now, it's possible for two calendars to have the same event/sheet to track.
- In the API handler,
ExpiredCredentialsErroris nowExpiredCredentialsand subclassesRuntimeErrorinstead of an extraneous customError. - In google.calendar:
Calendar.get_entries()had its arguments reversed to match the dictionary's structure ({calendar name: calendar id}).get_tab()no longer needs the second argument asconfig.TABSnow contains the names and aliases. Furthermore, instead of returningNone, the function either returns a string (matched tab name) or raisesTabNotFound- handled with a try-except inCalendar.get_entries().
- In google.sheets:
col_to_day()andday_to_col()combined to formget_yesterday_cell().Sheets.get_ids()was removed, as it wasn't used.- Moved some functionality of
Sheets.input_hours()intoSheets.get_tab_cells()to refactor.Sheets.input_hours()calls the new function to make up for lost functionality.
- Use
RotatingFileHandlerfor logs
- Changed
len(update)to more sensibleupdate['updatedCells']ingsheets.py
- Fixed issue with missing
YESTERDAYreference ingsheets.py
- Change stream logger error level to
INFO
- Use
nameinstead ofentrywhen checking aliases ingcalendar.py
- config.py. handles configuration shared between all the modules.
api_handler.pyhandles the Google API credentials and directly callsgcalendar.py&gsheets.pygcalendar.py&gsheets.pyhandle their respective Google API modules.
process.pywas broken into the three new modules, for modularity.- Furthermore, the Apache License Google LLC-licensed code was moved to config.py.
- Instead of calling
sys.exit, a new exceptionapi_handler.ExpiredCredentialsErroris raised. - Several functions were simplified in name, because
gsheets.Sheets.get_sheet_idsis redundant compared togsheets.Sheets.get_ids.
- Initial version