Skip to content

Commit

Permalink
Merge pull request #79 from jgehrcke/jp/maintenance
Browse files Browse the repository at this point in the history
Maintenance: bump dependencies, adjust README, re-generate base image
  • Loading branch information
jgehrcke committed Sep 30, 2023
2 parents 57fc0c2 + 2285bd7 commit 188cc59
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jgehrcke/github-repo-stats-base:f9f4e16c1
FROM jgehrcke/github-repo-stats-base:e87aa5891

COPY fetch.py /fetch.py
COPY analyze.py /analyze.py
Expand Down
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# github-repo-stats

A GitHub Action ([in Marketplace](https://github.com/marketplace/actions/github-repo-stats)) built to overcome the [14-day limitation](https://github.com/isaacs/github/issues/399) of GitHub's built-in traffic statistics.
This is a GitHub Action originally built to overcome the [14-day limitation](https://github.com/isaacs/github/issues/399) of GitHub's built-in traffic statistics.

Data that you don't persist today will be gone in two weeks from now.
Run this daily to collect potentially valuable data.

According to the motto: a data snapshot each day keeps the doctor away 🍎

See [this Action in Marketplace](https://github.com/marketplace/actions/github-repo-stats).

High-level method description:

Expand All @@ -16,11 +20,13 @@ Looking for a quick start? Follow the [simple tutorial](https://github.com/jgehr

**Demo 1**:
* [HTML report](https://jgehrcke.github.io/ghrs-test/jgehrcke/github-repo-stats/latest-report/report.html), [PDF report](https://jgehrcke.github.io/ghrs-test/jgehrcke/github-repo-stats/latest-report/report.pdf)
* [Workflow file](https://github.com/jgehrcke/ghrs-test/blob/github-repo-stats/.github/workflows/github-repo-stats.yml), [data branch](https://github.com/jgehrcke/ghrs-test/tree/github-repo-stats/jgehrcke/github-repo-stats)
* [Workflow file](https://github.com/jgehrcke/ghrs-test/blob/github-repo-stats/.github/workflows/github-repo-stats-ghrs.yml), [data branch](https://github.com/jgehrcke/ghrs-test/tree/github-repo-stats/jgehrcke/github-repo-stats)

**Demo 2**:
* [HTML report](https://jgehrcke.github.io/ghrs-test/jgehrcke/covid-19-germany-gae/latest-report/report.html), [PDF report](https://jgehrcke.github.io/ghrs-test/jgehrcke/covid-19-germany-gae/latest-report/report.pdf)
* [Workflow file](https://github.com/jgehrcke/ghrs-test/blob/covid-19-germany-gae/.github/workflows/github-repo-stats.yml), [data branch](https://github.com/jgehrcke/ghrs-test/tree/covid-19-germany-gae/jgehrcke/github-repo-stats)
* [Workflow file](https://github.com/jgehrcke/ghrs-test/blob/github-repo-stats/.github/workflows/github-repo-stats-cov19.yml), [data branch](https://github.com/jgehrcke/ghrs-test/tree/github-repo-stats/jgehrcke/github-repo-stats)

For more use cases (and their setup), see "Used by" section below.

## Highlights

Expand Down Expand Up @@ -237,10 +243,15 @@ rm -rf .* *; bash /home/jp/dev/github-repo-stats/entrypoint.sh

A few rather randomly picked use cases:


* https://github.com/idurar/erp-crm/tree/github-repo-stats/idurar/idurar-erp-crm
* https://github.com/awslabs/aws-security-analytics-bootstrap/tree/github-repo-stats/awslabs/aws-security-analytics-bootstrap
* https://github.com/centerofci/mathesar/tree/github-repo-stats/centerofci/mathesar
* https://github.com/carbon-design-system/carbon/tree/github-repo-stats/carbon-design-system/carbon
* https://github.com/Pythagora-io/pythagora/tree/github-repo-stats/Pythagora-io/pythagora
* https://github.com/ignite-hq/cli/tree/github-repo-stats/ignite-hq/cli
* https://github.com/tom-doerr/github_repo_stats_data/tree/master/tom-doerr
* https://github.com/ethyca/fides-stats/tree/main/ethyca/fides
* https://github.com/dylansdaniels/hnn_tracking_test/tree/main/jonescompneurolab/hnn
* https://github.com/idaholab/repository-statistics/tree/main/idaholab
* https://github.com/Declipsonator/Tweaks-Stats/tree/main/Declipsonator/Meteor-Tweaks
* https://github.com/gitsrc/icefiredb-status/tree/github-repo-stats/IceFireDB/IceFireDB
4 changes: 2 additions & 2 deletions base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ RUN apt-get update && apt-get install -y -q --no-install-recommends \
google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*

RUN pip install pip==22.1
RUN pip install pip==23.2.1

# requirements-fa.txt: dependencies for fetch.py & analyze.py
# for pdf.py: Note Explore bumping selenium to 4.x
COPY requirements-fa.txt .
RUN pip install -r requirements-fa.txt \
&& pip install selenium==3.141.0 webdriver_manager==3.5.2 # Dependencies for pdf.py \
&& pip install selenium==4.13.0 webdriver_manager==4.0.1 # Dependencies for pdf.py \
&& pip cache purge

RUN echo "biggest dirs"
Expand Down
2 changes: 1 addition & 1 deletion ci.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jgehrcke/github-repo-stats-base:6e6c3e4f8
FROM jgehrcke/github-repo-stats-base:e87aa5891

# Install GNU parallel
RUN apt-get update && apt-get install -y -q --no-install-recommends \
Expand Down
3 changes: 2 additions & 1 deletion pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from selenium.webdriver.support.expected_conditions import presence_of_element_located
Expand Down Expand Up @@ -78,7 +79,7 @@ def gen_pdf_bytes(html_apath):
log.info("set up chromedriver with capabilities %s", wd_options.to_capabilities())

with webdriver.Chrome(
ChromeDriverManager().install(), options=wd_options
service=Service(ChromeDriverManager().install()), options=wd_options
) as driver:
log.info("webdriver set up")
waiter = WebDriverWait(driver, 10)
Expand Down
4 changes: 2 additions & 2 deletions requirements-fa.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dependencies for fetch.py and analyze.py
pandas==1.4.2
pandas==2.1.1
PyGitHub==1.55
altair==4.2.0
altair==4.2.2
pytz
retrying
carbonplan[styles]

0 comments on commit 188cc59

Please sign in to comment.