Wanted: An updated Sage contributors world map

221 views
Skip to first unread message

Matthias Koeppe

unread,
Jun 27, 2024, 7:11:01 PM6/27/24
to sage-devel
We made the last major update of https://www.sagemath.org/development-map.html in Fall 2022, to prepare the migration from Trac to GitHub (see https://groups.google.com/g/sage-devel/c/1T2dm4gV2Z0/m/tzfvEunWAAAJ).

The map uses the contributor information in https://github.com/sagemath/website/blob/master/conf/contributors.xml
the messages "Contributions to Sage 5.x, 6.x, 7.x" are automatically generated from the changelogs at https://www.sagemath.org/changelogs/

The problem: We no longer create changelogs in this format since version 10.0 (after the transition to GitHub; I announced this in https://groups.google.com/g/sage-release/c/BdHjadsnYUc/m/Zeg-UvnXAAAJ). Instead, the authoritative changelog information is available on GitHub Releases, such as https://github.com/sagemath/sage/releases/tag/10.3 (and can also be retrieved using the GitHub REST API); but in contrast to our old changelogs, this does not currently include Reviewer information (nor full Author information for coauthored PRs; see https://groups.google.com/g/sage-release/c/BdHjadsnYUc/m/zrOMHiERAQAJ, https://groups.google.com/g/sage-release/c/BdHjadsnYUc/m/Wu9repsRAQAJ, https://groups.google.com/g/sage-release/c/BdHjadsnYUc/m/Arw8IJAYAQAJ). 

Geolocation for GitHub users who put this info in their public profile would be available from https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-a-user

Any takers for this fun infrastructure improvement item? 

Soham Rane

unread,
Nov 12, 2024, 2:39:43 PM11/12/24
to sage-devel

I would like to take on this task.

I’m relatively new to the community and have spent some time exploring the SageMath repo. I believe I can tackle this issue. Here’s my plan:

We can write a script using the GitHub API to automate changelog creation in the same format as the ones at https://www.sagemath.org/changelogs .  The idea is to first retrieve the IDs of all merged PRs from GitHub releases (such as https://github.com/sagemath/sage/releases/tag/10.0), then use the API again to get detailed information about each PR.

Fetching Reviewer Info: We could use  "list reviews for a pull request" endpoint of the api (https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#list-reviews-for-a-pull-request).
Identifying Multiple Authors: In case a PR has multiple authors, we can extract all the commits from the PR and identify the authors for each commit using the "list commits on a pull request" endpoint (https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-commits-on-a-pull-request).

Once the changelogs are generated in old formats, they will automatically update the contributor messages (like "Contributions to Sage 5.x, 6.x, 7.x") on the development map.    

For contributors who don’t have location info in the contributors.xml, we can retrieve it from their public GitHub profiles (if available).

Let me know if this approach works or if adjustments are needed.

Kwankyu Lee

unread,
Nov 19, 2024, 7:10:16 AM11/19/24
to sage-devel
On Wednesday, November 13, 2024 at 4:39:43 AM UTC+9 sohamr...@gmail.com wrote:

We can write a script using the GitHub API to automate changelog creation in the same format as the ones at https://www.sagemath.org/changelogs .  The idea is to first retrieve the IDs of all merged PRs from GitHub releases (such as https://github.com/sagemath/sage/releases/tag/10.0), then use the API again to get detailed information about each PR.


Fetching Reviewer Info: We could use  "list reviews for a pull request" endpoint of the api (https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#list-reviews-for-a-pull-request).
Identifying Multiple Authors: In case a PR has multiple authors, we can extract all the commits from the PR and identify the authors for each commit using the "list commits on a pull request" endpoint (https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-commits-on-a-pull-request).

Once the changelogs are generated in old formats, they will automatically update the contributor messages (like "Contributions to Sage 5.x, 6.x, 7.x") on the development map.    

For contributors who don’t have location info in the contributors.xml, we can retrieve it from their public GitHub profiles (if available).

Let me know if this approach works or if adjustments are needed.

Sounds reasonable. I think your script should be a github workflow that runs for each stable release, collects information from all prereleases (betas and rcs), and create changelogs, and pushes the changelogs file to our sagemath/website repo: https://github.com/sagemath/website/tree/master/src/changelogs
The last step would need certain write permission (via PAT, Personal Access Token).

When your script is ready, open a PR. I may review then.

Kwankyu 

 
Reply all
Reply to author
Forward
0 new messages