Skip to content

Commit

Permalink
feat(analytics): Adding LinkedIn, TwitterX, and Reddit to analytics r…
Browse files Browse the repository at this point in the history
…eport and refactoring pivot gen as a builder (#127)

* Pivot builder library WIP

* Refactoring all of the pivot table logic to use a builder implementation. Helpful for preventing me from sticking forks in my eyes.

* No munch

* Fixing table

* Fixing column indices

* Providing some default behaviour for missing values

* Documenting and CR comments
  • Loading branch information
nathan-moore-97 authored Jan 22, 2024
1 parent d2cac94 commit 08b6dc7
Show file tree
Hide file tree
Showing 6 changed files with 966 additions and 625 deletions.
7 changes: 4 additions & 3 deletions gdrive/analytics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import fastapi
from pydantic import BaseModel
from fastapi import responses
from gdrive import analytics_client, idva_flow_analytics, error
from gdrive import analytics_client, error
from gdrive.idva import flow_analytics

log = logging.getLogger(__name__)
router = fastapi.APIRouter()
Expand Down Expand Up @@ -63,9 +64,9 @@ async def list_accounts():

def run_analytics(start_date: datetime, end_date: datetime):
try:
idva_flow_analytics.create_report(start_date, end_date)
flow_analytics.create_report(start_date, end_date)
except Exception as e:
log.error(e)
log.exception(e)
raise error("Report generation failed")


Expand Down
Loading

0 comments on commit 08b6dc7

Please sign in to comment.