Skip to content

Google Calendar integration - Initial commit - #1

Open
ViswajaNeenam wants to merge 1 commit into
mainfrom
google-calendar-integration
Open

Google Calendar integration - Initial commit#1
ViswajaNeenam wants to merge 1 commit into
mainfrom
google-calendar-integration

Conversation

@ViswajaNeenam

Copy link
Copy Markdown

This PR introduces the initial setup for Google Calendar integration using Flask.
Key features:

  • OAuth 2.0 integration
  • Event creation, editing, and listing
  • Dockerfile for containerization
  • Unit and route tests

Comment thread Dockerfile
FROM python:3.12-slim

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I know why this env variable is added?

Comment thread Dockerfile
# Expose Flask port
EXPOSE 5050

# Set environment variables for Flask

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has to be productionized. The below envs run in local.

Comment thread run.py
@@ -0,0 +1,6 @@
from app import create_app

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is helpful in running local env only, you can remove 5,6 lines.

Comment thread app/models/event.py
if end <= start:
raise ValueError("End time must be after start time.")

return {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make this into a json class?

@@ -0,0 +1,61 @@
<!DOCTYPE html>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to recheck how these html can be helpful in front end.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ViswajaNeenam please check with Sruthi on this.

Comment thread app/utils.py
import logging

def load_json_file_safe(path):
if not os.path.exists(path) or os.path.getsize(path) == 0:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you add if statement into try block?

Comment thread Dockerfile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you try testing this dockerfile? is it working fine in your local?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants