Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Analytics (major) #2022

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 156 additions & 48 deletions analytics/poetry.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions analytics/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ psycopg = ">=3.0.7"
pydantic-settings = "^2.3.4"

[tool.poetry.group.dev.dependencies]
black = "^23.7.0"
black = "^24.0.0"
mypy = "^1.4.1"
pylint = "^3.0.2"
pytest = "^7.4.0"
pytest-cov = "^4.1.0"
pytest = "^8.0.0"
pytest-cov = "^5.0.0"
ruff = "^0.0.278"
safety = "^2.3.5"
safety = "^3.0.0"

[build-system]
build-backend = "poetry.core.masonry.api"
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/datasets/deliverable_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
This is a sub-class of BaseDataset that groups 30k ft deliverables with the
tasks needed to complete those deliverable
"""

from typing import Self

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/datasets/sprint_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
This is a sub-class of BaseDataset that stores the tickets and metadata
set for each ticket in the Sprint Planning Board
"""

from __future__ import annotations

from typing import Self
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/datasets/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Stores utility functions for Dataset classes."""

import json

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/integrations/github.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integrate with GitHub to read and write data from projects and repos."""

import shlex
import subprocess
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/integrations/slack.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integrate with Slack to post messages and get channel information."""

import functools
from collections.abc import Callable
from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/metrics/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for all metrics."""

from dataclasses import dataclass
from enum import Enum
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/metrics/burndown.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
This is a subclass of the BaseMetric class that calculates the running total of
open issues for each day in a sprint
"""

from __future__ import annotations

from typing import TYPE_CHECKING, Literal
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/metrics/burnup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
This is a subclass of the BaseMetric class that calculates the running total of
open issues for each day in a sprint
"""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics/metrics/percent_complete.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Calculate and visualizes percent completion by deliverable."""

import datetime as dt

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions analytics/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Visit pytest docs for more info:
https://docs.pytest.org/en/7.1.x/reference/fixtures.html
"""

import json
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions analytics/tests/datasets/test_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the BaseDataset class."""

from pathlib import Path # noqa: I001

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions analytics/tests/datasets/test_deliverable_tasks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for analytics/datasets/deliverable_tasks.py."""

import numpy as np # noqa: I001

from analytics.datasets.deliverable_tasks import DeliverableTasks
Expand Down
1 change: 1 addition & 0 deletions analytics/tests/integrations/test_slack.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the code in analytics.integrations.slack."""

from pathlib import Path # noqa: I001

import pytest
Expand Down
1 change: 1 addition & 0 deletions analytics/tests/metrics/test_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the BaseMetric class."""

# pylint: disable=abstract-method
import pandas as pd # noqa: I001
import pytest
Expand Down
1 change: 1 addition & 0 deletions analytics/tests/metrics/test_burndown.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the analytics.metrics.burndown module."""

from pathlib import Path # noqa: I001

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions analytics/tests/metrics/test_burnup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the analytics.metrics.burnup module."""

from pathlib import Path

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions analytics/tests/metrics/test_percent_complete.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for analytics/datasets/percent_complete.py."""

from pathlib import Path # noqa: I001

import pytest
Expand Down
1 change: 1 addition & 0 deletions analytics/tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the cli entrypoints."""

from dataclasses import dataclass # noqa: I001
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions analytics/tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dummy test to make sure the package is installed correctly."""

import analytics


Expand Down
Loading