diff --git a/routes/supplementary_data.py b/routes/supplementary_data.py index 1f2c74e..854a6df 100644 --- a/routes/supplementary_data.py +++ b/routes/supplementary_data.py @@ -32,7 +32,7 @@ def load(self, users: pd.Series) -> None: if self.working_hours.empty: logging.info("Notion working hours table does not exist") else: - print(users) + logging.info(f"Users\n{users}") for index, row in self.working_hours.iterrows(): not_matches = (users == row["User"]).value_counts().loc[False] if not_matches == users.count(): diff --git a/routes/tempo_data.py b/routes/tempo_data.py index 21d6fac..481eaeb 100644 --- a/routes/tempo_data.py +++ b/routes/tempo_data.py @@ -38,7 +38,8 @@ def load(self, from_date: str = "1970-01-01", to_date: str = str(date.today())) self.data = self.raw[["issue.key", "timeSpentSeconds", "billableSeconds", "startDate", "author.displayName"]] self.data.columns = ["Key", "Time", "Billable", "Date", "User"] df = pd.DataFrame(self.data.loc[:, ("Key")].str.split("-", n=1).tolist(), columns=["Group", "Number"]) - self.data.loc[:, ("Group")] = df["Group"] + self.data = self.data.join(df) + self.data = self.data.drop(["Number"], axis="columns") self.data.loc[:, ("Date")] = pd.to_datetime(self.data.loc[:, ("Date")], format="%Y-%m-%d") self.data.loc[:, ("Time")] = self.data.loc[:, ("Time")] / 3600 self.data.loc[:, ("Billable")] = self.data.loc[:, ("Billable")] / 3600