Giter Club home page Giter Club logo

github-stats-pages's Introduction

github-stats-pages

Retrieve statistics for a user's repositories and populate the information onto a GitHub static page

Categories Status
General PyPI - Python Version Code style: black
CI/CD GitHub Workflow Status Coverage badge
PyPI PyPI PyPI - Downloads

Overview

This software is both a GitHub Docker container action and a Python packaged software. The former allows for this to run to generate GitHub pages while the latter gives flexibility to deploy on a variety of compute resources (e.g., cloud, dev).

Some key features of this software:

  1. Flexible - Designed to be deployed in a number of ways
  2. Python - Most of the code is Python (excluding static assets) with static types
  3. Copy-left license: This is supported by open source and thus is open source with an MIT License!
  4. Continuous Integration - We currently have 100% code coverage of the Python codebase and the Docker action
  5. Environmentally friendly - Websitecarbon.com reported that a GitHub Pages deployment of this code has a lower carbon footprint than 90% of web pages tested

Requirements

Traffic data for repositories are limited to those who have write or ownership access. Thus, regardless of how you choose to deploy, you will need a token. This codebase uses GitHub's Personal Access Token (PAT).

To create one, follow these instructions or go here. For scopes, select: repo. Save your PAT in a safe place as you will need it later.

Deployment

This code is intended to deploy in a number of ways to allow for the greatest flexibility. First, this repository is also as a GitHub Docker container action (see below). Second, this code is package on PyPI. Third, the source code can be forked or cloned. Finally, a Dockerfile is included for containerization.

GitHub Actions Deployment

TL;DR

For easy deployment, try this GitHub template. Simply:

  1. Use it!
  2. Add a Personal access token, as a repository secret, GH_TOKEN. See above (Settings > Secrets)
  3. If not already enabled, enable GitHub Actions (Settings > Actions)
  4. Sit back and enjoy that ☕️ !

Note: After the first Action run, you may need to enable GitHub pages through the settings page and select gh-pages (Settings > Pages)

The Nitty Gritty

GitHub Pages deployment is simple with the following GitHub Actions cronjob workflow:

name: Deploy GitHub pages with traffic stats

on:
  schedule:
    - cron: "0 3 * * *"

jobs:
  build-n-publish:
    runs-on: ubuntu-latest
    env:
      BOT_NAME: 'github-actions[bot]'
      BOT_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com'

    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Get current date
      id: date
      run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
    - name: Build GitHub stats pages
      uses: astrochun/github-stats-pages@latest
      with:
        username: ${{ github.repository_owner }}
        token: ${{ secrets.GH_TOKEN }}
    - name: Upload data to main branch
      uses: EndBug/[email protected]
      with:
        add: 'data'
        branch: main
        message: "Update data: ${{ steps.date.outputs.date }}"
        author_name: env.BOT_NAME
        author_email: env.BOT_EMAIL
    - name: Upload static files to gh-pages
      uses: peaceiris/actions-gh-pages@v3
      with:
        personal_token: ${{ secrets.GH_TOKEN }}
        publish_dir: ./public
        keep_files: false
        user_name: env.BOT_NAME
        user_email: env.BOT_EMAIL
        publish_branch: gh-pages
        commit_message: "Update static pages: ${{ steps.date.outputs.date }}"

This workflow will run for all public repositories.

Inputs
Variable Description Required? Type Defaults Examples
username GitHub username or organization Yes str N/A astrochun
token GitHub Personal Access Token (PAT) Yes str N/A abcdef12345678
include-repos Comma-separated lists of repositories. This overrides the full list of public repositories No str '' 'github-stats-pages,astrochun.github.io'
exclude-repos Comma-separated lists of repositories to exclude from default public repository list No str '' 'repo1'
Other GitHub Action deployment examples:

To override all public repositories and limit to a subset of public repositories, specify a comma-separated list (no spaces between commas) for include-repos argument.

    - name: Build GitHub stats pages
      uses: astrochun/github-stats-pages@latest
      with:
        username: ${{ github.repository_owner }}
        token: ${{ secrets.GH_TOKEN }}
        include-repos: "github-stats-pages"

Alternatively to exclude specific repositories from the list of public repositories, use the exclude-repos argument with a comma-separated list (no spaces between commas).

    - name: Build GitHub stats pages
      uses: astrochun/github-stats-pages@latest
      with:
        username: ${{ github.repository_owner }}
        token: ${{ secrets.GH_TOKEN }}
        exclude-repos: "repo1,repo2"

Note that you can only specify include-repos or exclude-repos. Specifying both will fail!

Docker Deployment

This repository includes a Dockerfile. More details/instructions provided later.

From source

To run this code from original source, you will need to install it.

Installation

Use our PyPI package to get the most stable release:

(venv) $ pip install github-stats-pages

Or if you want the latest version then:

(venv) $ git clone https://github.com/astrochun/github-stats-pages
(venv) $ cd github-stats_pages
(venv) $ python setup.py install

Execution from source

TL;DR: If you decide to run this code from source, there are a few things you should know.

First, this repository includes an entrypoint.sh. You can simply execute it with the following:

(venv) laptop:github_data $ username="<username>"
(venv) laptop:github_data $ token="<personal_access_token>"
(venv) laptop:github_data $ /path/to/github-stats-pages/entrypoint.sh $username $token

Second, it is recommended to create a folder (e.g., github_data) as the contents will ultimately contain multiple files.

More details

Here's an overview providing more details how this codebase works. There are four primary scripts accompanying github-stats-pages

  1. get_repo_list
  2. gts_run_all_repos
  3. make_stats_plots
  4. merge_csv

get_repo_list generates a CSV file containing a list of public repositories for a GitHub user/organization. This database allows the code to aggregate statistics for all repositories. To run, simply use the following command:

(venv) laptop:github_data $ get_repo_list -u <username/organization>

This will generate a CSV file called "<username/organization>.csv". It is recommended to create a folder (e.g., github_data) as the contents will ultimately contain multiple files.

Next, let's gather the statistics for all public repositories that are not forks. We use another Python library that does this called github-traffic-stats. It is accompanied by a python script called gts.

To access traffic data, this requires a PAT. See above for instructions. Then you can execute the next script:

(venv) laptop:github_data $ token='abcdef12345678'
(venv) laptop:github_data $ gts_run_all_repos -u <username/organization> -t $token -c <username/organization>.csv

This will generate CSV files with date and time stamps prefixes for clones, traffic, and referrals. With routine running of this code, you will generate additional CSV files that allow for you to extend beyond a two-week window of data aggregation. The data can be merged with the merge-csv.sh script:

(venv) laptop:github_data $ merge_csv

This generates four files: merged_clone.csv, merged_paths.csv, merged_referrers.csv, and merge_traffic.csv. These files are used in the final step to generate the plots.

Finally to generate static pages containing the visualization, we use the make_stats_plots script:

(venv) laptop:github_data $ make_stats_plots -u <username> -c <username>.csv -t $token

This will generate all contents in the local path. Note that you can specify an output directory with the -o/--out-dir option. Default is the current path.

The resulting folder structure, for example, will be the following:

github_data/
├── data
│   ├── 2021-01-17-00h-46m-clone-stats.csv
│   ├── 2021-01-17-00h-46m-referrer-stats.csv
│   ├── 2021-01-17-00h-46m-traffic-stats.csv
│   ├── ...
│   ├── merged_clone.csv
│   ├── merged_paths.csv
│   ├── merged_referrer.csv
│   └── merged_traffic.csv
├── repos
│   ├── github-stats-pages.html
│   └── ...
├── styles
|   ├── css
|   │   └── style.css
|   └── js
|       ├── bootstrap.min.js
|       ├── jquery.min.js
|       ├── main.js
|       └── popper.js
├── about.html
├── index.html
├── repositories.html
└── <username>.csv

FAQ

1. How do I add old data?

If you ran this code outside your production deployment (e.g., GitHub pages), it is in fact straightforward to include those data.

For GitHub Pages deployment, simply:

  1. git clone your copy of the github-stats repo
  2. Move/copy previous CSV files to the data folder in the main branch. These files follow a YYYY-MM-DD prefix
  3. Then add, commit, and push: git add data/????-??-??*stats.csv, git commit -m "Add old data", git push

On the next GitHub Action scheduled run, the live pages will automatically incorporate these data.

For any other deployments (e.g., cloud), simply:

  1. Move/copy/rsync/scp the previous CSV files to the data folder in the deployed instance

Upon the next cronjob or script run, the old data will automatically be incorporated.

2. How do I add content to the home page (index.html)?

The deployed index.html can be customized to provide a biography, cool graphics, and/or additional statistics. This is possible through a GitHub profile README that you can create. The link above provides instruction for setting up one. This software will convert the markdown content to HTML and include it in the index.html. An example of the outcome can be found here.

Many GitHub users have developed fancy GitHub profile READMEs: https://github.com/abhisheknaiidu/awesome-github-profile-readme. By including those in your profile README, they should be included in your deployed version. If it doesn't work, feel free to reach out.

Note: While a GitHub profile README does not work for an organization in the same manner as individual GitHub accounts, this software will still use its content if it is publicly available. Here's an example

3. What happens when I renamed a repository?

This software will retrieve the latest list of public repositories. When the statistics pages are then generated, it searches the data/ folder for the information for each repo. As such, there is an issue with renaming of repositories. This will be apparent in the logs with the following warnings:

WARNING: Possible issue with repository name, ...
If you renamed it, you will need to update data/ contents

To rectify this issue, you can git clone your GitHub repository, and rename each occurrence of the old repositories with the new ones using your preferred IDE or command-line options (e.g., sed). Then git add, git commit, and git push these changes. The next scheduled run will then work as intended.

Versioning

Continuous Integration

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Used by

A list of repos using github-stats-pages can be found here.

astrochun/test-stats schorschinho/github-stats-osprey hessevans/test1 awang-karisma/github-stats UAL-RE/github-stats thenomaniqbal/thenomaniqbal Mo-Shakib/Mo-Shakib hyochan/github-stats

github-stats-pages's People

Contributors

astrochun avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

anshuljaiswal

github-stats-pages's Issues

Add CI testing

CI build tests should include:

  • pytest unit testing
  • executing get_repo_list script

Add CHANGELOG.md

Include a CHANGELOG.md. I recommend following the format of github-changelog-generator.

There are four sections:

  1. Implemented enhancements are for PRs with enhancements
  2. Fixed bugs are issues containing fixes
  3. Closed issues are any issues closed. This can be related to #1 and #2 if documented first as an issue.
  4. Merged pull requests are PRs that do not fall under #1 or #2. These can include chores, dependency updates, etc.

Update action docs for file push for GitHub repo

Create a test repository for testing this GitHub Action. It will probably use this action:
https://github.com/ad-m/github-push-action

  • The workflow should be one that can be triggered whenever, but preferably a cron job.
  • Will need to set the repository for GitHub pages (specifying the branch)
  • Branch should be an orphan. Note it should build off of previous commits
  • Update README.md for GitHub Actions docs

Module and script to generate plots

Now that we have stats, let's generate plots

  • We need main module called stats_plots
  • Add bokeh=2.3.0 to requirements.txt
  • We need a script called make_stats_plots
  • Copy bootstrap templates folder over
  • Ensure that templates are packaged with code for PyPI pip installation (This requires including the templates in the github_stats_pages folder)
  • Include index.html page
  • Include an about.html page
  • Include a list of repositories page
  • Execution of scripts will need to copy over styles folder or symlink (default is copy, symlink option is nice)
  • Delete files that are not in use
  • Add ability to generate pages in custom manner
    • Include list
    • Exclude list
  • Have HTML up front with a separate folder for data
  • Write repo pages to a repos folder to better organize contents

Strip out CSS contents that are not used

github_stats_pages/templates/styles/css/styles.css is very bulky with many of the CSS not being used. Let's identify what classes and definitions can be strip.


Bug: Dependency update prevents Docker action from running

I noticed last night that the data was not uploaded. Upon inspection, it seems that an update to pandas require a more recent version of tabulate:

https://github.com/astrochun/test-github-stats/runs/2825693583?check_suite_focus=true

Pandas v1.3.0 require tabulate==0.8.7

Traceback (most recent call last):
  File "/usr/local/bin/gts_run_all_repos", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/scripts/gts_run_all_repos", line 39, in <module>
    gts_run.get_top_paths(args.user, args.token, repo_name,
  File "/github_stats_pages/gts_run.py", line 28, in get_top_paths
    pandas_write_buffer(df, ['path', 'count', 'uniques'], reponame)
  File "/github_stats_pages/gts_run.py", line 42, in pandas_write_buffer
    df[columns].to_markdown(buffer, index=False)
  File "/usr/local/lib/python3.9/site-packages/pandas-1.3.0rc1-py3.9-linux-x86_64.egg/pandas/core/frame.py", line 2568, in to_markdown
    tabulate = import_optional_dependency("tabulate")
  File "/usr/local/lib/python3.9/site-packages/pandas-1.3.0rc1-py3.9-linux-x86_64.egg/pandas/compat/_optional.py", line 141, in import_optional_dependency
    raise ImportError(msg)
ImportError: Pandas requires version '0.8.7' or newer of 'tabulate' (version '0.8.3' currently installed).
Number of GitHub repositories: 40

Chore: Refactoring of stats_plots

Re-factoring should include:

  • Separate method for jinja_dict return
  • Writing main (index, about, repository) HTML files from templates
  • Refactor include_repos and exclude_repos handling

Chore: Add hidden HTML explaining each HTML files

Instructions should be provided to avoid users changing certain HTML files. This includes

  • index.html - Note how to populate contents
  • about.html - Explain that this is not about the user/org but about the code and refer to index.html
    

Use merged files as primary database, deleting individual runs

Currently the data from gts is all stored. It would be nice to add an option to delete these YYYY-MM-DD files so that merge files are the final ones.

A few notes:

  • merge-csv.sh should be modified to include the merge files (if they exist) and delete the YYYY-MM-DD files
  • This should be an option within the Docker action to delete those files. Default is to keep it.

Chore: Add Shields.io logo

Since we are using shields.io for many of our badges, we should include a logo and include an acknowledgement in the About.html.

Here is their logo:
Shields.io logo

Dependency bug with Jinja2

A recent GitHub Actions run yielded the following error:

Traceback (most recent call last):
  File "/usr/local/bin/make_stats_plots", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/scripts/make_stats_plots", line 6, in <module>
    from github_stats_pages import stats_plots
  File "/github_stats_pages/stats_plots.py", line 14, in <module>
    from bokeh.plotting import figure
  File "/usr/local/lib/python3.9/site-packages/bokeh-2.3.0-py3.9.egg/bokeh/plotting/__init__.py", line 67, in <module>
    from ..document import Document; Document
  File "/usr/local/lib/python3.9/site-packages/bokeh-2.3.0-py3.9.egg/bokeh/document/__init__.py", line 35, in <module>
    from .document import DEFAULT_TITLE ; DEFAULT_TITLE
  File "/usr/local/lib/python3.9/site-packages/bokeh-2.3.0-py3.9.egg/bokeh/document/document.py", line 50, in <module>
    from ..core.templates import FILE
  File "/usr/local/lib/python3.9/site-packages/bokeh-2.3.0-py3.9.egg/bokeh/core/templates.py", line 42, in <module>
    from jinja2 import Environment, FileSystemLoader, Markup
ImportError: cannot import name 'Markup' from 'jinja2' (/usr/local/lib/python3.9/site-packages/Jinja2-3.1.0-py3.9.egg/jinja2/__init__.py)

There may have been a version dependency from bokeh that needs to be frozen. Let's freeze to Jinja2==3.0.3

Include github-traffic-stats for stats gathering

The code of interest is available here.

A simple bash execution may suffice.

  • Add python module to run for any repo, gts_run
  • Add unit tests for gts_run
  • Add gts_run_all_repos executable python script
  • Incorporate nchah's merge-csv bash script with a fix to separate out different contents
  • Update setup.py to include new scripts

CI: Deprecate support for 3.7

More recent version of numpy requires >=3.8:

File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-p9da69sv/numpy-1.22.3/setup.py", line 34, in <module>
    ]
RuntimeError: Python version >= 3.8 required.
```

Bug: Failed run due to IndexError

The log of a recent Github Actions run for UAL-RE organization showed a failed run with the following error message

Moving records to data/ folder
Traceback (most recent call last):
Number of GitHub repositories: 19
  File "/usr/local/bin/make_stats_plots", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/scripts/make_stats_plots", line 42, in <module>
    stats_plots.make_plots(**vargs)
  File "/github_stats_pages/stats_plots.py", line 307, in make_plots
    jinja_dict.update(t_r_df.to_dict(orient='records')[0])
IndexError: list index out of range

CI: Migrate to coverage.py for testing coverage

Currently we are running pytest as is. We can use coverage to simplify the test process and upload the coverage artifacts.

Action items:

  • Update GitHub actions
    • Switch from pytest to coverage
    • Upload artifacts
  • Add configuration settings
  • Use action to comment and upload artifacts

Fix namespace for include-repo and exclude-repo

Originally we used include_repo and exclude_repo in stats_plots module and make_stats_plots scripts. It would be preferred to use include_repos and exclude_repos to clarity to user.
For GitHub Actions argument, we should use include-repos and exclude-repos.


Set author of releases

By default the create-release Action uses a GitHub Action bot. This needs to change to the primary owner.


Feature: Add rich support

Since most of the code is scripts that output information, let's try and use rich for rich formatted terminal information.

500 GitHub error

Recent execution failed due to a 500 error from GitHub API. Perhaps a solution is needed to handle this exception:

with:
    username: astrochun
    token: ***
  env:
    BOT_NAME: astrochun[bot]
    BOT_EMAIL: 20[3](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:3)0573[4](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:4)[email protected]
/usr/bin/docker run --name a9[5](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:5)ef27a23931418418588f8808adb1b231e_7dd4a7 --label 29a95e --workdir /github/workspace --rm -e BOT_NAME -e BOT_EMAIL -e INPUT_USERNAME -e INPUT_TOKEN -e INPUT_INCLUDE-REPOS -e INPUT_EXCLUDE-REPOS -e INPUT_TEST -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/test-github-stats/test-github-stats":"/github/workspace" 29a95e:f27a23931418418588f8808adb1b231e  "astrochun" "***" "" "" ""
Version: 0.4.5
Running get_repo_list script ...
get_repo_list - Retrieving repository list ...
construct_csv - Writing: astrochun.csv
> 2018-09-01-steward - Visitors
Date		Views	Unique visitors
Totals		0	0

> 2018-09-01-steward - Git clones
Date		Clones	Unique cloners
Totals		2	2
2022-03-04	2	2

> 2018-09-01-steward - Referring sites
Date		Views	Unique visitors
Totals		0	0

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/requests-2.27.1-py3.9.egg/requests/models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.9/json/__init__.py", line 34[6](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:6), in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.9/json/decoder.py", line 33[7](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:7), in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/gts", line 33, in <module>
    sys.exit(load_entry_point('github-traffic-stats', 'console_scripts', 'gts')())
  File "/usr/local/lib/python3.9/site-packages/github_traffic_stats-1.2.0-py3.9.egg/gts/main.py", line 305, in main
    traffic_response = send_request('traffic', organization, auth_pair, repo).json()
  File "/usr/local/lib/python3.9/site-packages/requests-2.27.1-py3.9.egg/requests/models.py", line 917, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] : 0
> astrochun - Visitors
Date		Views	Unique visitors
Totals		4	1
2022-02-26	4	1

> astrochun - Git clones
Date		Clones	Unique cloners
Totals		1	1
2022-03-04	1	1

> astrochun - Referring sites
Date		Views	Unique visitors
Totals		4	1
github.c...	4	1 

> astrochun.github.io - Visitors
Date		Views	Unique visitors
Totals		0	0

> astrochun.github.io - Git clones
Date		Clones	Unique cloners
Totals		2	2
2022-03-04	2	2

> astrochun.github.io - Referring sites
Date		Views	Unique visitors
Totals		0	0

> chun_codes - Visitors
Date		Views	Unique visitors
Totals		1	1
2022-02-27	1	1

> chun_codes - Git clones
Date		Clones	Unique cloners
Totals		2	2
2022-03-04	2	2

> chun_codes - Referring sites
Date		Views	Unique visitors
Totals		1	1
github.c...	1	1 

> closed-discussion-message - Visitors
Date		Views	Unique visitors
Totals		0	0

> closed-discussion-message - Git clones
Date		Clones	Unique cloners
Totals		2	2
2022-03-04	2	2

> closed-discussion-message - Referring sites
Date		Views	Unique visitors
Totals		0	0

> containeraction - Visitors
Date		Views	Unique visitors
Totals		0	0

> containeraction - Git clones
Date		Clones	Unique cloners
Totals		2	2
2022-03-04	2	2

> containeraction - Referring sites
Date		Views	Unique visitors
Totals		0	0

> DarkData_Inventory - Visitors
Date		Views	Unique visitors
Totals		0	0

> DarkData_Inventory - Git clones
Date		Clones	Unique cloners
Totals		1	1
2022-03-04	1	1

> DarkData_Inventory - Referring sites
Date		Views	Unique visitors
Totals		0	0

> DevOps_guide - Visitors
Date		Views	Unique visitors
Totals		0	0

> DevOps_guide - Git clones
Date		Clones	Unique cloners
Totals		1	1
2022-03-04	1	1

> DevOps_guide - Referring sites
Date		Views	Unique visitors
Totals		0	0

> Evolution-of-Galaxies - Visitors
Date		Views	Unique visitors
Totals		0	0

> Evolution-of-Galaxies - Git clones
Date		Clones	Unique cloners
Totals		2	2
2022-03-04	2	2

> Evolution-of-Galaxies - Referring sites
Date		Views	Unique visitors
Totals		0	0

> Extract1D - Visitors
Date		Views	Unique visitors
Totals		0	0

> Extract1D - Git clones
Date		Clones	Unique cloners
Totals		2	2
2022-03-04	2	2

> Extract1D - Referring sites
Date		Views	Unique visitors
Totals		0	0

> figshare-actions-publish-test - Visitors
Date		Views	Unique visitors
Totals		0	0

> figshare-actions-publish-test - Git clones
Date		Clones	Unique cloners
Totals		1	1
2022-03-04	1	1

> figshare-actions-publish-test - Referring sites
Date		Views	Unique visitors
Totals		0	0

> figshare_actions - Visitors
Date		Views	Unique visitors
Totals		0	0

> figshare_actions - Git clones
Date		Clones	Unique cloners
Totals		1	1
2022-03-04	1	1

> figshare_actions - Referring sites
Date		Views	Unique visitors
Totals		0	0

Traceback (most recent call last):
  File "/usr/local/bin/gts_run_all_repos", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/scripts/gts_run_all_repos", line 51, in <module>
    gts_run.get_top_paths(args.user, args.token, repo_name,
  File "/github_stats_pages/gts_run.py", line 24, in get_top_paths
    top_path_list = repo.get_top_paths()
  File "/usr/local/lib/python3.9/site-packages/PyGithub-1.55-py3.9.egg/github/Repository.py", line 1965, in get_top_paths
    headers, data = self._requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.9/site-packages/PyGithub-1.55-py3.9.egg/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.9/site-packages/PyGithub-1.55-py3.9.egg/github/Requester.py", line 37[8](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:8), in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 500 null
Running gts_run_all_repos script ...
gts_run_all_repos - Excluding forks: 3[9](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:9)
gts_run_all_repos - Excluding archived: 1
gts_run_all_repos : Number of repositories: 42
Working on : 20[18](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:18)-09-01-steward ...
Empty top paths for [20](https://github.com/astrochun/test-github-stats/runs/5436412962?check_suite_focus=true#step:6:20)18-09-01-steward
Working on : academic-ads-bibtex ...
Empty top paths for academic-ads-bibtex
Working on : astrochun ...
> astrochun - Top paths
| path                                     |   count |   uniques |
|:-----------------------------------------|--------:|----------:|
| /astrochun/astrochun                     |       2 |         1 |
| /astrochun/astrochun/blob/main/README.md |       2 |         1 |
Working on : astrochun.github.io ...
Empty top paths for astrochun.github.io
Working on : chun_codes ...
> chun_codes - Top paths
| path                  |   count |   uniques |
|:----------------------|--------:|----------:|
| /astrochun/chun_codes |       1 |         1 |
Working on : closed-discussion-message ...
Empty top paths for closed-discussion-message
Working on : containeraction ...
Empty top paths for containeraction
Working on : DarkData_Inventory ...
Empty top paths for DarkData_Inventory
Working on : DevOps_guide ...
Empty top paths for DevOps_guide
Working on : Evolution-of-Galaxies ...
Empty top paths for Evolution-of-Galaxies
Working on : Extract1D ...
Empty top paths for Extract1D
Working on : figshare-actions-publish-test ...
Empty top paths for figshare-actions-publish-test
Working on : figshare_actions ...

Add popular content

Already supported from the Traffic page:

  • Git clones (showing off)
  • Visitors (showing off)
  • Referring sites (analytics)

Missing:

  • Popular content (prioritising product improvement)
Screenshot

image

Sphinx documentation for RTDs

Documentation should be extensive to explain how to deploy this in a number of ways, such as:

  1. GitHub Actions
  2. Deployment with the code
    

Chore: Add FAQs in documentation

To address possible questions in the future, we should add a FAQs to:

  • Explain how to upload additional data for GitHub Pages deployment
  • Explain how to have the home page content using the special repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.