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 script for stat generation #157

Merged
merged 2 commits into from
Aug 11, 2023
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: 4 additions & 4 deletions content/15.development_procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ This particular bias, toward contributions measured in count, is one that affect
To mitigate this shortcoming, we present the number of pull requests merged into the code base, as a function of time, as well as the time between their creation and their merge, in the lower row of Figure @fig:commit-graph.
This demonstrates that in many cases, the number of discrete contributions to the codebase varies greatly depending on the developer, and we believe gives a more informed perception of the activity in the code base.

<div id="figure-commit-graph"></div>
<div id="figure-commit-graph" class="center"></div>

![
Commits and pull requests to the source code as a function of time.
](images/blank.svg){#fig:commit-graph width="1px"}

<script>
vegaEmbed('#figure-commit-graph', "images/yt_repo.vl");
vegaEmbed('#figure-commit-graph', "images/yt_repo.vl", {"actions": false});
</script>

In Figure @fig:pr-closing-time we have plotted distribution of pull requests based on the time between their creation and their merge.
The longest time between opening a pull request and merging it was nearly four years; this was the addition of the `cf_radial` frontend, which occurred in fits and starts over a very long period of time.
The next longest pull request durations are for splitting the code used for bitmap indexing (see @sec:point_indexing) and a per-field configuration system.
This includes only those pull requests that occurred on GitHub.

<div id="figure-pr-closing-time"></div>
<div id="figure-pr-closing-time" class="center"></div>

![
The distribution of pull requests as a function of how long it took to close them.
](images/blank.svg){#fig:pr-closing-time width="1px"}

<script>
vegaEmbed('#figure-pr-closing-time', "images/pr_times.vl");
vegaEmbed('#figure-pr-closing-time', "images/pr_times.vl", {"actions": false});
</script>


Expand Down
8 changes: 4 additions & 4 deletions scripts/generate_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
df_pr["duration"] = (df_pr["closedAt"] - df_pr["createdAt"]).dt.total_seconds()

df_pr["author"] = df_pr["author.name"]
df_pr["author"].fillna(df_pr["author.login"])
df_pr["author"].fillna(df_pr["author.id"])
df_pr["author"].fillna("Automated Bot")
df_pr["author"][df_pr["author"] == ""] = "Automated Bot"
df_pr["author"].fillna(df_pr["author.login"], inplace=True)
df_pr["author"].fillna(df_pr["author.id"], inplace=True)
df_pr["author"].fillna("Automated Bot", inplace=True)
df_pr[df_pr["author"] == ""]["author"] = "Automated Bot"
df_pr["type"] = "pull-request"
df_pr.rename(columns = {'closedAt': 'datetime'}, inplace=True)

Expand Down
Loading