metrics package
Submodules
metrics.date_utils module
Various date utility functions
- metrics.date_utils.lastMonthDay(month: str) str [source]
expects YYYY-MM as input returns YYYY-MM-XX where XX is the last day for month MM
- metrics.date_utils.lookAhead(offset: int, from_date: str = Timestamp('2024-11-11 21:41:03.883862'))[source]
- metrics.date_utils.lookBack(offset: int, from_date: str = Timestamp('2024-11-11 21:41:03.883908'))[source]
- metrics.date_utils.monthBegin(from_date: str = Timestamp('2024-11-11 21:41:03.883912'))[source]
Return with the first for the date
metrics.index module
metrics.notion module
Notion related functions and classes
- class metrics.notion.Allocations(token: str | None = None, database_id: str = '')[source]
Bases:
Notion
The class for allocations
- data: DataFrame
- class metrics.notion.Crew(token: str | None = None, database_id: str = '')[source]
Bases:
Notion
The class for crew data
- data: DataFrame
- class metrics.notion.Financials(token: str | None = None, database_id: str = '')[source]
Bases:
Notion
The class for finance data
- data: DataFrame
metrics.supplementary_data module
Tempo related functions and classes
metrics.tempo_config module
Config module
metrics.tempo_data module
Tempo related functions and classes
- class metrics.tempo_data.TempoData(config_path: str, tempo_base_url: str = 'https://api.tempo.io/4', tempo_key: str | None = None, jira_base_url: str = 'https://verifa.atlassian.net', jira_user: str | None = None, jira_api_token: str | None = None)[source]
Bases:
object
Tempo data class.
- allJiraIssues() DataFrame [source]
Fetches all the JIRA issues with IssueId and Key columns as DataFrame
- allJiraUsers() DataFrame [source]
Fetches all the JIRA users with UserId and User coloums as DataFrame
- byDay() DataFrame [source]
returns aggregated time and billable time grouped by date, user and issue key
- byEggBaskets() DataFrame [source]
returns aggregated billable income grouped by issue key group, user and time box (30, 60, 90)
- byGroup() DataFrame [source]
returns aggregated time and billable time grouped by date, user and group
- byTimeType() DataFrame [source]
returns aggregated time and time type grouped by date, user and group
- byTotalGroup(days_back) DataFrame [source]
returns aggregated billable time grouped by issue key group and user
- byUser(working_hours: DataFrame) DataFrame [source]
returns aggregated time and billable time grouped by user
- client: Tempo
- data: DataFrame
- jira_client: JIRA
- last_year: int
- load(from_date: str = '1970-01-01', to_date: str = '2024-11-11', crew=Empty DataFrame Columns: [] Index: []) None [source]
Fetch and populate data from Tempo for the given date range
- missingRatesTable(fnTableHeight=None, color_head='paleturquoise', color_cells='lavender') Figure [source]
- padTheData(working_hours: DataFrame) None [source]
creates the self.padded_data padded with zero data for each User, an entry for the ZP group will be added for each date >= min(Date) && <= max(Date) Key: ZP-1, Time: 0, Billable: 0, Group: ZP, Internal: 0, Currency: EUR, Rate: 0, Income: 0
- padded_data: DataFrame
- raw: DataFrame
- tableByUser(working_hours, fnTableHeight=None, color_head='paleturquoise', color_cells='lavender') Figure [source]
- teamRolling7(to_sum) DataFrame [source]
returns rolling 7 day sums for Billable and non Billable time grouped by user
- teamRolling7Relative(costs: Series) DataFrame [source]
returns rolling 7 day sums for Billable and non Billable time grouped by user, relative to the costs
- this_year: int
metrics.tempo_figures module
The figures module