-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Contributions] Add reviewers statistics (#204)
(cherry picked from commit 5e1f1d6) # Conflicts: # .github/workflows/sphinx-check-warnings-humble.yml # .github/workflows/sphinx-check-warnings-iron.yml # .github/workflows/sphinx-make-page.yml
- Loading branch information
1 parent
5600398
commit 667650a
Showing
18 changed files
with
898 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,15 @@ jobs: | |
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Restore stats | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: reviewer-stats-${{ github.run_id }} | ||
restore-keys: | | ||
reviewer-stats | ||
path: ~/reviews | ||
- name: Copy stats | ||
run: ./make_help_scripts/add_review_stats | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --hook-stage manual |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "Create Reviewer Stats" | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: # run if the file changed on a PR to master | ||
branches: | ||
- master | ||
paths: | ||
- 'make_help_scripts/create_reviewer_stats.py' | ||
push: # run if the file changed by pushes to master | ||
branches: | ||
- master | ||
paths: | ||
- 'make_help_scripts/create_reviewer_stats.py' | ||
schedule: | ||
# Run every morning to ensure component documentation is up to date on deployment | ||
- cron: '23 3 * * *' | ||
|
||
jobs: | ||
create-reviewer-stats: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade --requirement requirements.txt | ||
shell: bash | ||
- name: Get stats | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
python make_help_scripts/create_reviewer_stats.py | ||
shell: bash | ||
- name: Cache stats | ||
uses: actions/cache/save@v3 | ||
with: | ||
key: reviewer-stats-${{ github.run_id }} | ||
path: ~/reviews |
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 |
---|---|---|
|
@@ -34,6 +34,13 @@ jobs: | |
shell: bash | ||
- name: Install doxygen and graphviz | ||
run: sudo apt-get install -y doxygen graphviz | ||
- name: Restore stats | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: reviewer-stats-${{ github.run_id }} | ||
restore-keys: | | ||
reviewer-stats | ||
path: ~/reviews | ||
- name: Build page with API and run linkchecker | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Check Page for Warnings Humble" | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- humble | ||
schedule: | ||
# Run every morning to ensure component documentation is up to date on deployment | ||
- cron: '23 5 * * *' | ||
|
||
jobs: | ||
build-halt-on-warnings: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: humble | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade --requirement requirements.txt | ||
shell: bash | ||
- name: Install generate_parameter_library | ||
run: | | ||
cd | ||
git clone https://github.com/PickNikRobotics/generate_parameter_library.git | ||
cd generate_parameter_library/generate_parameter_library_py/ | ||
python -m pip install . | ||
shell: bash | ||
- name: Restore stats | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: reviewer-stats-${{ github.run_id }} | ||
restore-keys: | | ||
reviewer-stats | ||
path: ~/reviews | ||
- name: Build single version considering warnings as errors | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
make html-all-subrepos-with-errors |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Check Page for Warnings Iron" | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- iron | ||
schedule: | ||
# Run every morning to ensure component documentation is up to date on deployment | ||
- cron: '23 5 * * *' | ||
|
||
jobs: | ||
build-halt-on-warnings: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: iron | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade --requirement requirements.txt | ||
shell: bash | ||
- name: Install generate_parameter_library | ||
run: | | ||
cd | ||
git clone https://github.com/PickNikRobotics/generate_parameter_library.git | ||
cd generate_parameter_library/generate_parameter_library_py/ | ||
python -m pip install . | ||
shell: bash | ||
- name: Restore stats | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: reviewer-stats-${{ github.run_id }} | ||
restore-keys: | | ||
reviewer-stats | ||
path: ~/reviews | ||
- name: Build single version considering warnings as errors | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
make html-all-subrepos-with-errors |
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 |
---|---|---|
|
@@ -26,6 +26,13 @@ jobs: | |
cd generate_parameter_library/generate_parameter_library_py/ | ||
python -m pip install . | ||
shell: bash | ||
- name: Restore stats | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: reviewer-stats-${{ github.run_id }} | ||
restore-keys: | | ||
reviewer-stats | ||
path: ~/reviews | ||
- name: Build single version considering warnings as errors | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -31,6 +31,13 @@ jobs: | |
cd generate_parameter_library/generate_parameter_library_py/ | ||
python -m pip install . | ||
shell: bash | ||
- name: Restore stats | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: reviewer-stats-${{ github.run_id }} | ||
restore-keys: | | ||
reviewer-stats | ||
path: ~/reviews | ||
- name: Build single version considering warnings as errors | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: "Build & Deploy Page" | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
# Run every morning to ensure component documentation is up to date on deployment | ||
- cron: '23 5 * * *' | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade --requirement requirements.txt | ||
shell: bash | ||
- name: Install generate_parameter_library | ||
run: | | ||
cd | ||
git clone https://github.com/PickNikRobotics/generate_parameter_library.git | ||
cd generate_parameter_library/generate_parameter_library_py/ | ||
python -m pip install . | ||
shell: bash | ||
- name: Install doxygen and graphviz | ||
run: sudo apt-get install -y doxygen graphviz | ||
- name: Restore stats | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: reviewer-stats-${{ github.run_id }} | ||
restore-keys: | | ||
reviewer-stats | ||
path: ~/reviews | ||
- name: Build multiversion with API | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
make multiversion-with-api | ||
- name: clone gh-pages branch | ||
uses: actions/checkout@v4 | ||
if: ${{ success() && github.event_name != 'pull_request' && !env.ACT }} | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
- name: Deploy Pages | ||
if: ${{ success() && github.event_name != 'pull_request' && !env.ACT }} | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./_build/html | ||
cname: control.ros.org |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* reviewer_stats.css */ | ||
table { | ||
font-family: Arial, sans-serif; | ||
border-collapse: collapse; | ||
width: 100%; | ||
} | ||
|
||
th, td { | ||
border: 1px solid #dddddd; | ||
text-align: left; | ||
padding: 8px; | ||
} | ||
|
||
tr:nth-child(even) { | ||
background-color: #f2f2f2; | ||
} | ||
|
||
.progress-bar { | ||
width: 100%; | ||
height: 20px; | ||
margin: 0; | ||
background-color: #ddd; | ||
border-radius: 5px; | ||
overflow: hidden; | ||
} | ||
|
||
.progress-value-reviews { | ||
display: block; | ||
height: 100%; | ||
width: 0; | ||
background-color: #2980b9; | ||
border-radius: 5px; | ||
} | ||
|
||
.progress-value-ratio { | ||
display: block; | ||
height: 100%; | ||
width: 0; | ||
background-color: rgba(47, 64, 95, 0.5); /* Adjusted to 50% transparent */ | ||
border-radius: 5px; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# shellckeck source=deploy_defines | ||
# source deploy_defines regardless of startingpoint | ||
DIR="${BASH_SOURCE%/*}" | ||
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi | ||
. "$DIR/deploy_defines" || { echo "Could not source deploy_defines script. This is needed for correct execution. Exiting!"; exit; } | ||
|
||
add_reviewer_stats_file |
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 |
---|---|---|
|
@@ -23,3 +23,4 @@ add_sub_repositories () { | |
} | ||
|
||
add_sub_repositories | ||
add_reviewer_stats_file |
Oops, something went wrong.