The objective of the Google Suite Tasks Dashboard is to provide Google users with a centralized platform to efficiently manage tasks across the Google Task and Google Docs applications. By creating this solution, users can easily access and track their tasks in one location.
Demo video:
- View-only dashboard for user's tasks.
- Crawling tasks directly from Google Tasks API.
- Extract tasks from Google Docs with App Scripts and store in Google Sheets.
- [Work In Progess] Store extracted tasks from Google Sheets into Postgresql (AWS RDS) database and display on dashboard.
*Steps 5, 6 are not needed for components displayed in the demo.
-
Clone the repository glaceon-google-suite-tasks.
-
Install PDM as package and dependency manager if it has not been installed.
pip install pdm
-
Install dependencies:
pdm install --dev
-
To update dependencies, run the following:
pdm update
-
To connect AWS RDS through SSH, run the command with postgresql database installed
psql -h opensource-db.chwy4eqkclzc.us-east-1.rds.amazonaws.com -p 5432 -U postgres -d task-db
-
To create the table in the database (please connect Fan([email protected]) for database password)
create_databse.sql
Change directory to src/open_source_python_template
folder:
cd src/open_source_python_template
Run Flask app via PDM:
pdm run python __init__.py
Open browser and authenticate with Google. Please contact Yifei Zhuang (@yz9865) for developer permission.
Go to the following host address:
http:https://127.0.0.1:5000
- Open a Google Docs document, click on Extensions -> Apps Script. A new Apps Script will be created.
- From the left panel, select
Services
and addDrive API
. - Copy and paste the code in
extractTasks.js
intoCode.gs
file in the Apps Script editor. - Authenticate with Google account when prompted.
- Run the script by clicking "Run".
- When the script finishes execution, the comments with tasks assigned to the current use will be stored in a newly created Google Sheet.
The below is an overview of how the project is structured. We recommend going through this section to have a basic understanding of where feature-related code files are located before making a contribution.
Entry point of the Flask application is src/open_source_python_template/__init__.py
.
Methods for crawling tasks from Google Sheet API is defined in src/open_source_python_template/crawlTasks.py
.
App Script for extracting tasks from Google Docs is src/open_source_python_template/extractTasks.js
.
Frontend HTML templates can be found in templates/
folder, such as index.html
.
Static elements, scripts, and styles can be found in static/
folder, such as style.css
.
Before running frontend tests, ensure you have Chrome Driver installed and updated to latest version. Then run the following command:
pdm run pytest tests/test_index.py
Notes: Since Seleium is not able to automate Google authentication, the CI/CD unit test with Pytest is expected to fail.
Run the following command to run backend tests:
pdm run pytest tests/test_crawl_tasks.py
Notes: Issues might occur due to conflicts between template and Flask project project structures, especially with __init__.py
files. More investigations needed to run mock test locally and pipelines.
- Create an Issue: Before you make significant changes or improvements, please check if an existing issue already addresses your concern. If not, submit a new issue providing as much relevant information as possible.
- Discuss: Participation in issue discussion is highly encouraged. Share your thoughts, suggestions, and ways to resolve issues.
- Create a Branch: Always create a new branch for your work. It should be named appropriately based on the nature of the change (e.g., feature-add-login, bugfix-address-crash).
- Make Your Changes: Perform your changes or additions in your branch, adhering to the coding standards and documentation style of the project.
- Write Tests: Ensure that your changes are covered by tests, which help in maintaining code quality and robustness.
- Document Your Changes: Update
README.md
with details of changes to the interface, this includes new dependencies, useful file locations, and connected components. - Pull Request: Push your changes to your fork and submit a pull request (PR) to the original repository. It should describe the changes, reference the issues they affect, and note any specific areas where you would like feedback. Please use our PR template for documentation.
- Code Review: Wait for the project maintainers to review your PR. Be open to making changes based on feedback.
Please follow the coding style and conventions that are used in the project. We have setup a CI/CD pipeline to check for coding styles, please refrain from raising a PR if the formatter returns an error and make fixes accordingly to comply.