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

Documentation: Add docs/contributors_graph.md #84

Merged
merged 13 commits into from
Dec 24, 2024
Merged

Documentation: Add docs/contributors_graph.md #84

merged 13 commits into from
Dec 24, 2024

Conversation

jnareb
Copy link
Member

@jnareb jnareb commented Dec 24, 2024

This new documentation file is referenced from README.md and added to the generated documentation at https://ncusi.github.io/PatchScope/

Also remove references to the local computer, which are of no interest
to other people.
Describes what you can find in `bokeh/` and `panel/` subdirectories,
and what you can find in `experiments/` subdirectory.

Because this addition uses footnotes, enable "footnotes" extension
for MkDocs:
  https://squidfunk.github.io/mkdocs-material/reference/footnotes/
For both apps, show how one can run them, and link to their demo
on Heroku.

While at it, remove Mermaid diagram - which got obsolete some time ago.
Currently only the general description, and subsection about "Commits
over time" plot is included in this newly added documentation.

This new documentation is available from MkDocs-generated documentation
at GitHub Pages (will be available at https://ncusi.github.io/PatchScope/);
there is also link to it in the project README.md.

NOTE: There are few more screeshots in `docs/assets/screenshots/` than
are curently used.
This subsection also explains how deletions and additions (of lines)
are computed, using a simple example diff from the python-unidiff
project.
This is the first type of plot that is not available in GitHub Insights.
The description is pretty short, and does not describe what happens
to the per-author plot, and the ordering in the authors grid.
Also add the section it is contained in, namely "Patch size and patch
spreading (lines) over time".

This metric comes from "Dissection of a Bug Dataset: Anatomy of 395
Patches from Defects4J" paper, as will the next one.
The defects4j_dissection.Listing_1.Closure-40.1x.png is the same as *.2x.*
one, but this one is from 100% zoom, and the earlier is from 200% zoom.
This is the second metric (or submetric) taken from "Dissection of
a Bug Dataset: Anatomy of 395 Patches from Defects4J" paper.

TODO?: add some better example of a patch, and its metrics.
Also adds placeholder for "Line types distribution \[%] (area plot)"
subsection.  Note that generic information about 'line types [%]'
plots should be moved to this sunsection, aftr it gets written.

GitHub shows heatmap plots, but they have slightly different purpose.
…ors_graph.md

This documents current state of Sankey diagram (Sankey plot) support in
diffinsights_web, as of version 0.4.1.  It is not complete, and not
finished.  Among other things, there is no support for selecting period
of time ("From"), nor for selecting author (for per-author plots on authors
grid).

Currently the Sankey diagram is plotted using HoloViews (low-level
plotting library) with the interative Bokeh backend.  There are however
other options, with their advantages and disadvantages:
- Plotly (interactive)
- Mermaid.js (with gradient, non-interactive), requires additional
  support: awesome-panel/panel-mermaid or oruelle/md_mermaid
- pySankey (mentioned in python-graph-gallery.com)
- from PyPI: Irene-Sankey, mpl_sankey, Sugikey (interactive via Bokeh),
  SankeyFlow, pSankey, pySankey2, Sankeyfy (for Plotly API, maybe as
  inpiration), floWeaver + ipysankeywidget
…ibutors_graph.md

Describe what Perspective pane is, and what it allows.  Show 4 examples:
- one of Datagrid plugin to display the tabular data
- two of X/Y Scatter plugin, to examine correlation and interdependence
- one of X Bar, with hierarchical groupby, and selection
This 'plot' type is here to make it easier to compare othe non-plot
information among different authors.

Back to showing split of contributions by line type.

This is the last plot type in PatchScope 0.4.1, in Contributors Graph
app left to be described.
@jnareb jnareb added the documentation Improvements or additions to documentation label Dec 24, 2024
@jnareb jnareb self-assigned this Dec 24, 2024
Copy link

dagshub bot commented Dec 24, 2024

Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/diffannotator
   __init__.py00100% 
   annotate.py82313483%52, 75–76, 85, 92, 101–104, 106–108, 110, 368–369, 373–374, 376, 413, 415–417, 419, 421–423, 425–426, 428–430, 528, 531, 534–535, 577, 727, 756, 799–801, 805, 836, 914, 1149, 1163–1166, 1168, 1172–1175, 1177, 1354, 1357, 1526, 1528, 1565, 1582–1583, 1669, 1672, 1784–1785, 1787, 1804, 1846–1847, 1863, 1878, 1893–1894, 1925, 1988, 1999, 2025, 2035, 2037, 2046–2050, 2054–2058, 2060, 2086, 2173, 2187, 2189–2190, 2192–2194, 2196, 2198–2200, 2202–2203, 2205, 2207, 2221, 2224, 2239–2241, 2247, 2260, 2269, 2277, 2280, 2350, 2356, 2358–2359, 2372, 2381–2386, 2500–2501, 2504–2505, 2509, 2554
   config.py50786%52–56, 58, 93
   gather_data.py3445384%61, 87, 91, 93, 101, 106, 108, 121, 129, 161, 228–229, 232–233, 236, 239, 248, 259–265, 288–289, 309–310, 325, 343, 365–366, 531, 535, 568, 696, 709, 711, 714, 718, 720, 758, 784–785, 838, 890, 1076, 1108–1112, 1116
   generate_patches.py38392%102, 104, 126
   languages.py1011684%170, 173, 176, 179, 182, 186, 217–218, 230, 249, 261, 263–264, 267, 273, 311
   lexer.py29293%87–88
src/diffannotator/utils
   __init__.py00100% 
   git.py4878582%107, 233, 316, 318, 321–322, 324, 326–329, 331–333, 335–337, 342–343, 347, 349–350, 354–356, 358–359, 361–362, 364–365, 367, 475–476, 479, 516, 526, 529–531, 537, 568, 572, 579, 603, 616, 671, 753, 800, 807, 837, 841, 845, 885, 887, 898, 903, 908, 999–1000, 1047–1049, 1052–1053, 1087, 1091, 1157, 1162, 1164, 1167–1168, 1170, 1229–1230, 1344, 1346, 1369–1370, 1382, 1384, 1396–1397, 1431, 1445
TOTAL187230083% 

Tests Skipped Failures Errors Time
79 5 💤 0 ❌ 0 🔥 12.222s ⏱️

@jnareb jnareb merged commit e184deb into main Dec 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant