-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from ncusi/documentation - docs/contributors_g…
…raph.md Documentation: Add docs/contributors_graph.md, enhance README.md
- Loading branch information
Showing
26 changed files
with
487 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.5 KB
docs/assets/screenshots/github-qtile_qtile-graphs_contributors-all-additions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.7 KB
docs/assets/screenshots/github-qtile_qtile-graphs_contributors-all-commits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+68 KB
docs/assets/screenshots/github-qtile_qtile-graphs_contributors-all-deletions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+114 KB
...assets/screenshots/patchscope-contributors-hellogitworld-all-sankey_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.4 KB
docs/assets/screenshots/patchscope-contributors-qtile-all-additions_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.2 KB
docs/assets/screenshots/patchscope-contributors-qtile-all-commits_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+65.3 KB
docs/assets/screenshots/patchscope-contributors-qtile-all-deletions_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+65.9 KB
docs/assets/screenshots/patchscope-contributors-qtile-all-files_changed-export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.3 KB
docs/assets/screenshots/patchscope-contributors-qtile-all-files_changed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+50.7 KB
...ssets/screenshots/patchscope-contributors-qtile-all-line_types_perc_heatmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+70 KB
...ssets/screenshots/patchscope-contributors-qtile-all-no_plot-line_types_perc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+56.8 KB
docs/assets/screenshots/patchscope-contributors-qtile-all-patch_size.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+56.3 KB
docs/assets/screenshots/patchscope-contributors-qtile-all-patch_spreading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+61.8 KB
...-contributors-qtile-all-perspective-authors_info_df-x_bar-n_commits_groupby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+62.6 KB
...s/patchscope-contributors-qtile-all-perspective-data_df-xy_scatter-pm_count.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+57.4 KB
...enshots/patchscope-contributors-qtile-all-perspective-resampled_df-datagrid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+108 KB
...qtile-all-perspective-resampled_df-xy_scatter-patch_size_vs_patch_spreading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,47 @@ | ||
# DiffInsights - web interface for analyzing DiffAnnotator results | ||
|
||
This directory includes various web dashboards | ||
that demonstrate how one can use the **`diffanotator`** project. | ||
The `src/diffinsights_web/` subdirectory in PatchScope sources | ||
includes various web dashboards that demonstrate | ||
how one can use the **`PatchScope`** project. | ||
|
||
All web applications in this directory use | ||
the [HoloViz Panel][Panel] framework. | ||
|
||
In all cases, plots and diagrams shown in those web apps | ||
are created from files generated with PatchScope scripts | ||
from selected repository. | ||
|
||
## Contributors graph | ||
[Panel]: https://panel.holoviz.org/ "Panel: The Powerful Data Exploration & Web App Framework for Python" | ||
|
||
## Contributors Graph | ||
|
||
You can run this app with `panel serve src/diffinsights_web/apps/contributors.py` | ||
from the top directory of PatchScope sources. | ||
|
||
The demo of this app is also available at | ||
<https://patchscope-9d05e7f15fec.herokuapp.com/contributors>. | ||
|
||
This dashboard is meant to be | ||
enhanced version of the Contributors subpage | ||
in the Insights tab | ||
for the GitHub repository | ||
(example: <https://github.com/qtile/qtile/graphs/contributors>) | ||
|
||
Below there is a | ||
simplified graph of dependencies between | ||
- functions (rounded rectangle), | ||
- widgets (hexagons, in green), and | ||
- outputs ("subroutine" shape, in blue) | ||
in `02-contributors_graph.py`: | ||
```mermaid | ||
flowchart TD | ||
classDef widgetClass fill:#9f8; | ||
classDef finalClass fill:#cef; | ||
select_file_widget{{"input JSON file"}} | ||
select_repo_widget{{"repository"}} | ||
resample_frequency_widget{{"frequency"}} | ||
select_period_from_widget{{"Period:"}} | ||
select_contribution_type_widget{{"Contributions:"}} | ||
It provides plots (like weekly number of commits) for the whole selected repository, | ||
and individually for each of the top-N most active authors. | ||
|
||
class select_file_widget widgetClass | ||
class select_repo_widget widgetClass | ||
class resample_frequency_widget widgetClass | ||
class select_period_from_widget widgetClass | ||
class select_contribution_type_widget widgetClass | ||
## Author statistics | ||
|
||
find_dataset_dir("`find_dataset_dir()`") | ||
find_timeline_files("`find_timeline_files(dataset_dir)`") | ||
get_timeline_data("`get_timeline_data(json_path)`") | ||
find_repos("`find_repos(timeline_data)`") | ||
get_timeline_df("`get_timeline_df(timeline_data, repo)`") | ||
authors_info_df("`authors_info_df(timeline_df, column, from_date)`") | ||
resample_timeline("`resample_timeline(timeline_df, resample_rate, group_by)`") | ||
%% add_pm_count_perc("`add_pm_count_perc(resampled_df)`") | ||
%% filter_df_by_from_date("`filter_df_by_from_date(resampled_df, from_date, date_column)`") | ||
get_date_range("`get_date_range(timeline_df, from_date)`") | ||
get_value_range("`get_value_range(resampled_df, column)`") | ||
%% head_info(["`head_info(repo, resample_rate)`"]) | ||
%% sampling_info(["`sampling_info(resample_rate, column, date_range)`"]) | ||
%% author_info(["`author_info(authors_df, author)`"]) | ||
plot_commits[["`plot_commits(resampled_df, column, from_date)`"]] | ||
authors_cards[["`authors_cards(authors_df, resample_by_author_df, top_n)`"]] | ||
You can run this app with `panel serve src/diffinsights_web/apps/author.py` | ||
from the top directory of PatchScope sources. | ||
|
||
class sampling_info finalClass | ||
class head_info finalClass | ||
class plot_commits finalClass | ||
class authors_cards finalClass | ||
The demo of this app is also available at | ||
<https://patchscope-9d05e7f15fec.herokuapp.com/author>. | ||
|
||
resample_frequency_widget -.-> resample_timeline | ||
This dashboard currently is a cross between plots from GitHub Insights, | ||
but limited to selected user, with some extra plots that make sense | ||
only for individual author. | ||
|
||
find_dataset_dir --> find_timeline_files | ||
get_timeline_data --> find_repos | ||
get_timeline_data --> get_timeline_df | ||
get_timeline_df --> resample_timeline | ||
get_timeline_df --> authors_info_df | ||
%% get_timeline_df --> get_date_range | ||
%% resample_timeline --> add_pm_count_perc | ||
resample_timeline --> plot_commits | ||
%% resample_timeline --> filter_df_by_from_date | ||
resample_timeline --> get_date_range | ||
resample_timeline --> get_value_range | ||
resample_timeline --> authors_cards | ||
%% get_date_range --> plot_commits | ||
get_date_range --> authors_cards | ||
%% get_date_range --> sampling_info | ||
%% get_value_range --> plot_commits | ||
get_value_range --> authors_cards | ||
%% authors_info_df --> author_info | ||
authors_info_df --> authors_cards | ||
find_timeline_files ---> select_file_widget | ||
find_repos ---> select_repo_widget | ||
select_file_widget -.-> get_timeline_data | ||
%% select_repo_widget -.-> head_info | ||
select_repo_widget -.-> get_timeline_df | ||
%% resample_frequency_widget -.-> head_info | ||
%% resample_frequency_widget -.-> sampling_info | ||
select_period_from_widget -.-> authors_info_df | ||
select_period_from_widget -.-> get_date_range | ||
select_period_from_widget -.-> plot_commits | ||
select_contribution_type_widget -.-> authors_info_df | ||
select_contribution_type_widget -.-> get_value_range | ||
%% select_contribution_type_widget -.-> sampling_info | ||
select_contribution_type_widget -.-> plot_commits | ||
plot_commits ---o authors_cards | ||
linkStyle 23 stroke:#ff3,stroke-width:4px,color:red; | ||
``` | ||
|
||
[Panel]: https://panel.holoviz.org/ "Panel: The Powerful Data Exploration & Web App Framework for Python" | ||
Example of the latter is the heatmap plot that examines | ||
what days of the week and which hours of day dominate | ||
in given author contributions commit author date. |