apache / openwhisk-website

Apache OpenWhisk website (openwhisk.apache.org) content; built using Jekyll
https://openwhisk.apache.org/
Apache License 2.0
21 stars 50 forks source link

feat: add contributor over time graph to website #482

Closed Yiyiyimu closed 3 years ago

Yiyiyimu commented 3 years ago

Hi community!

We're the maintainers of Apache APISIX. To better present how our community grows, we develop a tool to show contributors growing history on https://github.com/api7/contributor-graph. Since we found it helpful, we think maybe if it could help some other community.

WHAT IT IS

Basically, it just shows the contributors growth over time. We would update the graph each day, so the link would always present the real-time data. There is some other stuff to play around if you would like to give it a try~

image

HOW IT WORKS

We use Github API to get all commits, try to find the “Github way” to filter commits so the result data would be similar to Github, and then get the first commit time of each user.

Don't hesitate to tell us if there is a better place to present this graph other than this, or there are some other worries or other features you would like to have~🍻

rabbah commented 3 years ago

Thank you for this contribution! 🎉 Is it possible to aggregate contributors across all our repos? We have more than one repo for the project.

rabbah commented 3 years ago

I have some code I used in the past to aggregate all the stats across our repos. This is an outdated list - we've added some repos since and we exited incubation so all the repos were renamed. I can make a new list if it's possible to do this.

const repos = [ 
  'incubator-openwhisk',
  'incubator-openwhisk-apigateway',
  'incubator-openwhisk-catalog',
  'incubator-openwhisk-cli',
  'incubator-openwhisk-wskdeploy',
  'incubator-openwhisk-client-go',
  'incubator-openwhisk-client-go',
  'incubator-openwhisk-client-js',
  'incubator-openwhisk-client-python',
  'incubator-openwhisk-client-swift',
  'incubator-openwhisk-runtime-ballerina',
  'incubator-openwhisk-runtime-docker',
  'incubator-openwhisk-runtime-go',
  'incubator-openwhisk-runtime-java',
  'incubator-openwhisk-runtime-nodejs',
  'incubator-openwhisk-runtime-php',
  'incubator-openwhisk-runtime-python',
  'incubator-openwhisk-runtime-ruby',
  'incubator-openwhisk-runtime-swift',
  'incubator-openwhisk-runtime-dotnet',
  'incubator-openwhisk-runtime-rust',
  'incubator-openwhisk-deploy-kube',
  'incubator-openwhisk-deploy-mesos',
  'incubator-openwhisk-devtools',
  'incubator-openwhisk-utilities',
  'incubator-openwhisk-package-alarms',
  'incubator-openwhisk-package-cloudant',
  'incubator-openwhisk-package-deploy',
  'incubator-openwhisk-package-jira',
  'incubator-openwhisk-package-kafka',
  'incubator-openwhisk-package-pushnotifications',
  'incubator-openwhisk-package-rss',
  'incubator-openwhisk-package-template'  
]
Yiyiyimu commented 3 years ago

Hi @rabbah yes we do support that! We've already supported this feature for apache/apisix and apache/skywalking. You could find a example with https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=apache/apisix&merge=true

I got a list from apache repo list, do you mind telling me if it contains all related repos?

openwhisk
openwhisk-website
openwhisk-release
openwhisk-deploy-kube
openwhisk-runtime-swift
openwhisk-catalog
openwhisk-slackinvite
openwhisk-package-kafka
openwhisk-client-js
openwhisk-package-alarms
openwhisk-runtime-nodejs
openwhisk-runtime-dotnet
openwhisk-runtime-python
openwhisk-runtime-java
openwhisk-runtime-go
openwhisk-devtools
openwhisk-wskdeploy
openwhisk-cli
openwhisk-composer
openwhisk-client-go
openwhisk-runtime-docker
openwhisk-runtime-php
openwhisk-package-cloudant
openwhisk-apigateway
openwhisk-package-deploy
openwhisk-package-pushnotifications
openwhisk-external-resources
openwhisk-deploy-openshift
openwhisk-workshop
openwhisk-tutorial
openwhisk-intellij-plugin
openwhisk-runtime-ruby
openwhisk-runtime-rust
openwhisk-utilities
openwhisk-composer-python
openwhisk-runtime-deno
openwhisk-wskdebug
openwhisk-runtime-ballerina
openwhisk-pluggable-provider
openwhisk-vscode-extension
openwhisk-test
openwhisk-client-swift
openwhisk-deploy-mesos
openwhisk-vscode
openwhisk-package-rss
openwhisk-xcode
openwhisk-package-template
openwhisk-debugger
openwhisk-sample-matos
openwhisk-playground
openwhisk-podspecs
openwhisk-client-python
openwhisk-package-jira
openwhisk-selfserve-test
openwhisk-GitHubSlackBot
openwhisk-sample-slackbot
rabbah commented 3 years ago

Very cool @Yiyiyimu - your list looks good to me.

mrutkows commented 3 years ago

@Yiyiyimu Great stuff! Thanks!

mrutkows commented 3 years ago

@Yiyiyimu If Rodric is providing a list of active projects, that would be perfect... IMO, we do not want to list projects we consciously deprecated/retired. Although there may be merit in including all projects which have historically been part of the project as they, at one time, clearly were valid contributions that helped evolve, grow and harden the project to what it is today.

dgrove-oss commented 3 years ago

This listing is fairly accurate: https://github.com/apache/openwhisk/blob/master/docs/dev/modules.md

rabbah commented 3 years ago

Contributors are contributors :) I expect repos we've archived didn't have a lot of contributors anyway once de-duped.

Yiyiyimu commented 3 years ago

@dgrove-oss Got some repo missing from that list:

    - apache/openwhisk-intellij-plugin
    - apache/openwhisk-runtime-deno
    - apache/openwhisk-vscode-extension
    - apache/openwhisk-wskdebug
Yiyiyimu commented 3 years ago

Updated 😁 And after removing the archived repo, the list looks like this right now:

    - apache/openwhisk
    - apache/openwhisk-apigateway
    - apache/openwhisk-catalog
    - apache/openwhisk-cli
    - apache/openwhisk-client-go
    - apache/openwhisk-client-js
    - apache/openwhisk-composer
    - apache/openwhisk-composer-python
    - apache/openwhisk-deploy-kube
    - apache/openwhisk-deploy-mesos
    - apache/openwhisk-devtools
    - apache/openwhisk-external-resources
    - apache/openwhisk-intellij-plugin
    - apache/openwhisk-package-alarms
    - apache/openwhisk-package-cloudant
    - apache/openwhisk-package-deploy
    - apache/openwhisk-package-kafka
    - apache/openwhisk-package-pushnotifications
    - apache/openwhisk-pluggable-provider
    - apache/openwhisk-release
    - apache/openwhisk-runtime-ballerina
    - apache/openwhisk-runtime-deno
    - apache/openwhisk-runtime-docker
    - apache/openwhisk-runtime-dotnet
    - apache/openwhisk-runtime-go
    - apache/openwhisk-runtime-java
    - apache/openwhisk-runtime-nodejs
    - apache/openwhisk-runtime-php
    - apache/openwhisk-runtime-python
    - apache/openwhisk-runtime-ruby
    - apache/openwhisk-runtime-rust
    - apache/openwhisk-runtime-swift
    - apache/openwhisk-slackinvite
    - apache/openwhisk-test
    - apache/openwhisk-utilities
    - apache/openwhisk-vscode-extension
    - apache/openwhisk-website
    - apache/openwhisk-wskdebug
    - apache/openwhisk-wskdeploy
mrutkows commented 3 years ago

@Yiyiyimu Love the graph, but installing and running the change locally (after pulling this branch) I would ask for a few layout-related changes and solve why we got only a partial render...

  1. The first time I loaded the community page, I saw only an external link (widget did not appear after some long load time). Clicking the link, I saw the graph displayed in the external site. Upon returning, the graph did appear, but only rendered a graph line for 2016 (timed out?). Screen Shot 2021-05-24 at 11 19 43 AM
  2. The widget takes up the entire width of the page and messes up our 3-column layout causing the 3rd column "supporters" to be rendered above all other content. Can we constrain the width of the graph to just the middle column and assure 3-column layout is preserved? Screen Shot 2021-05-24 at 11 15 50 AM
  3. If we do add this, it should be moved into its own section "Contributions" above "Events" (which is pretty much static) section and added to the left navigation index.
mrutkows commented 3 years ago

I attempted to push a commit to your repo. (using ssh) but could not... if you want the layout changes/fixes I advised... here is the file...

Place this above the "events" section:

    <main class="doc">
      <div class="content">
        <a class="indexable" id="contributions"></a>
        <h3>Contributions</h3>
        <p>
          The following graphic shows project contributions over time across all active OpenWhisk repositories.
        </p>
        <a href="https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=apache/openwhisk&merge=true"><img
            src="https://contributor-graph-api.apiseven.com/contributors-svg?chart=contributorOverTime&repo=apache/openwhisk&merge=true"
            alt="Contributor over time"
            style="max-width: 600px"/></a>
      </div>
    </main>

add this to the "contrubtions" ID to the left index:

      <!-- Project Wiki -->
      <li><a href="#wiki">Project Wiki</a></li>

      <!-- Contributions -->
      <li><a href="#contributions">Contributions</a></li>

      <!-- Events -->
      <li><a href="#events">Events</a></li>

HOWEVER the image sent/rendered only has a graph for 2016 even requesting again after flushing the image cache... perhaps a rendering error on the service and they are caching the bad image?

mrutkows commented 3 years ago

@Yiyiyimu OK, so i used https protocol with a personal access token and was able to push my suggested commit... All that remains is to figure out why the embedded image does not render the entire 2016-2021 graph, but still only renders 2016.

Yiyiyimu commented 3 years ago

@Yiyiyimu OK, so i used https protocol with a personal access token and was able to push my suggested commit... All that remains is to figure out why the embedded image does not render the entire 2016-2021 graph, but still only renders 2016.

There are situations that the graph was captured and stored before it got fully rendered, and I just fixed this issue yesterday. It seems CDN cached the wrong image and I'll do the forced flush right now.

mrutkows commented 3 years ago

@Yiyiyimu OK, so i used https protocol with a personal access token and was able to push my suggested commit... All that remains is to figure out why the embedded image does not render the entire 2016-2021 graph, but still only renders 2016.

There are situations that the graph was captured and stored before it got fully rendered, and I just fixed this issue yesterday. It seems CDN cached the wrong image and I'll do the forced flush right now.

Just flushed the local image cache again (Chrome and Mozilla both same behavior) and appears the page timed out watiing for the image so it displayed a URL (link):

Clicking the link the website shows a blank graph:

forced a reload of that page (https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=apache/apisix) and the full graph appeared:

Returned to the OW website page and it now shows the full graph! Yay!

Screen Shot 2021-05-24 at 1 35 02 PM

Is there a way to solve that timeout and the manual refresh steps?

mrutkows commented 3 years ago

I believe that I will merge and see the behavior on the Apache hosting site...

Yiyiyimu commented 3 years ago

@mrutkows Actually I think the reason it got timeout and appeared again is due to the CDN flush 🤣

Yiyiyimu commented 3 years ago

Is there a way to solve that timeout and the manual refresh steps?

Right now we didn't provide manual refresh steps for users, since it might result in large pressure on the server if got abused. But if it happens again (although I believe it won't) or any other places went wrong, you could directly ping me here in this PR or raise an issue in the contributor-graph repo.

mrutkows commented 3 years ago

@Yiyiyimu Thanks again; love it! Works great in Mozilla on Apache site...

Screen Shot 2021-05-24 at 1 53 24 PM