# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# %cd ..
# %pwd

# ## Load data

# +
from dashboard.load import load
import dashboard.config as config 
from dashboard.gheets import ManualFlow

import json
# -

flow = ManualFlow()
url = flow.get_url()
with open('notebooks/url.json', 'w') as wf:
    json.dump(url, wf)

creds = flow.get_google_token()

from dashboard.load import load_pomodoros, load_catalog
pomodoros = load_pomodoros(
        credentials=creds,
        spreadsheet_id=config.POMODOROS_SPREADSHEET_ID,
        range_name=config.POMODOROS_RANGE,
    )
catalog = load_catalog(
    credentials=creds,
    spreadsheet_id=config.ACTIVITIES_SPREADSHEET_ID,
    range_name=config.ACTIVITIES_RANGE
)

# +
from dashboard.load import fill_all_activities

res = fill_all_activities(pomodoros, catalog)
# -

res.df.tail(50)


pomodoros.df.loc[(pomodoros.df.Week == 6) & (~pomodoros.df.Planned.isnull()), :]

StarcoderdataJupyterScriptsDedupFiltered