Skip to content

Commit

Permalink
reviewer file heatmap
Browse files Browse the repository at this point in the history
  • Loading branch information
cdolfi committed Feb 2, 2024
1 parent 0dc26d9 commit a7b3ce9
Show file tree
Hide file tree
Showing 6 changed files with 474 additions and 6 deletions.
5 changes: 3 additions & 2 deletions 8Knot/cache_manager/db_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ def _create_application_tables() -> None:
cur.execute(
"""
CREATE UNLOGGED TABLE IF NOT EXISTS cntrb_per_file_query(
file_path text,
repo_id int,
cntrb_ids text
file_path text,
cntrb_ids text,
reviewer_ids text
)
"""
)
Expand Down
8 changes: 8 additions & 0 deletions 8Knot/pages/codebase/codebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# import visualization cards
from .visualizations.cntrb_file_heatmap import gc_cntrb_file_heatmap
from .visualizations.contribution_file_heatmap import gc_contribution_file_heatmap
from .visualizations.reviewer_file_heatmap import gc_reviewer_file_heatmap

warnings.filterwarnings("ignore")

Expand All @@ -27,6 +28,13 @@
align="center",
style={"marginBottom": ".5%"},
),
dbc.Row(
[
dbc.Col(gc_reviewer_file_heatmap, width=12),
],
align="center",
style={"marginBottom": ".5%"},
),
],
fluid=True,
)
2 changes: 1 addition & 1 deletion 8Knot/pages/codebase/visualizations/cntrb_file_heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def process_data(

# drop unnecessary columns
df_file.drop(["repo_id"], axis=1, inplace=True)
df_file_cntbs.drop(["repo_id"], axis=1, inplace=True)
df_file_cntbs.drop(["repo_id", "reviewer_ids"], axis=1, inplace=True)

# Left join on df_files to only get the files that are currently in the repository
# and the contributors that have ever opened a pr that included edits on the file
Expand Down
Loading

0 comments on commit a7b3ce9

Please sign in to comment.