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

heatmap x axis time fix #682

Merged
merged 1 commit into from
Apr 4, 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
8 changes: 5 additions & 3 deletions 8Knot/pages/codebase/visualizations/cntrb_file_heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
classNames={"values": "dmc-multiselect-custom"},
searchable=True,
clearable=False,
value="Top Level Directory",
),
],
className="me-2",
Expand Down Expand Up @@ -215,7 +216,7 @@ def directory_dropdown(repo_id):

# add top level directory to the list of directories
directories.insert(0, "Top Level Directory")
logging.warning(f"DIRECTORY DROPDOWN - FINISHED")
logging.warning(f"CNTRB DIRECTORY DROPDOWN - FINISHED")

return directories, "Top Level Directory"

Expand Down Expand Up @@ -533,8 +534,9 @@ def file_cntrb_activity_by_month(df_dynamic_directory: pd.DataFrame, df_actions:
there will be a column for every month even if there is no "last contribution" date in it. This greatly
improves the heatmap ploting"""

# dates based on action so it represents the length of the project
min_date = df_actions.created_at.min()
# dates based on action so it represents the length of the project, min based on PR
# open date to avoid committer inputted dates
min_date = df_actions[df_actions["Action"] == "PR Opened"].created_at.min()
max_date = df_actions.created_at.max()
dates = pd.date_range(start=min_date, end=max_date, freq="M", inclusive="both")
df_fill = dates.to_frame(index=False, name="dates")
Expand Down
8 changes: 5 additions & 3 deletions 8Knot/pages/codebase/visualizations/reviewer_file_heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
classNames={"values": "dmc-multiselect-custom"},
searchable=True,
clearable=False,
value="Top Level Directory",
),
],
className="me-2",
Expand Down Expand Up @@ -215,7 +216,7 @@ def directory_dropdown(repo_id):

# add top level directory to the list of directories
directories.insert(0, "Top Level Directory")
logging.warning(f"DIRECTORY DROPDOWN - FINISHED")
logging.warning(f"REVIEWER DIRECTORY DROPDOWN - FINISHED")

return directories, "Top Level Directory"

Expand Down Expand Up @@ -532,8 +533,9 @@ def file_cntrb_activity_by_month(df_dynamic_directory: pd.DataFrame, df_actions:
there will be a column for every month even if there is no "last contribution" date in it. This greatly
improves the heatmap ploting"""

# dates based on action so it represents the length of the project
min_date = df_actions.created_at.min()
# dates based on action so it represents the length of the project, min based on PR
# open date to avoid committer inputted dates
min_date = df_actions[df_actions["Action"] == "PR Opened"].created_at.min()
max_date = df_actions.created_at.max()
dates = pd.date_range(start=min_date, end=max_date, freq="M", inclusive="both")
df_fill = dates.to_frame(index=False, name="dates")
Expand Down
Loading