boostorg / boostorg/website2022

boost-library-stats.cpp.al

Open
#4 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Just to make a more official note about this. A script is compiling information about boost library # of issues, # of pull requests, # of lines of code, # of commits, and dumping the results into a postgres table.

https://boost-library-stats.cpp.al
Login Credentials : viewer / stats345!
Database "stats". Table "stats". And, then browse in "Views". view_2022_10_01

The statistics are an interesting summary of data about each library. That info could be displayed on the website, since the wireframes show library pages having "number of open issues", "number of commits". https://cppalliance.org/Boost-website-demo/2022-03/Library-Single-2x.html

A cron job runs `collect_stats.py` every month, but could be every hour, calculates the results, inserts them into a table, generates a "view" so that you can see only the latest information.

```
0 5 1 * * . $HOME/.web-env-vars && cd $HOME/boost_library_stats && ./scripts/collect_stats.py > /tmp/boost-library-stats.output 2>&1
```

https://github.com/CPPAlliance/boost-library-stats

Credentials are stored in /home/stats/.web-env-vars and loaded as environment variables.

```
export DATABASE_USER=
export DATABASE_PASSWORD=
export DATABASE_NAME=
export DATABASE_HOST=
export DATABASE_PORT=
export SECRET_KEY=
export DJANGO_SETTINGS_MODULE='boost_library_stats.settings'
export RESTMOTE_USER=
export RESTMOTE_PASSWORD=
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export EMAIL_HOST=
export EMAIL_HOST_USER=
export EMAIL_HOST_PASSWORD=
```

boost-library-stats was written in python and even djangoified so it should be possible to run this script with the new website2022. It creates and updates one table, called `stats`. Then, the other webpages can query from `stats` and display the results.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.