Project to collect and plot data from gitea to https://metrics.blender.org
Dalai Felinto
cdc21e4fdc
Make sure the fetching process doesn't stop when the transactions data is corrupted (null): infrastructure/blender-projects-platform#76 |
||
---|---|---|
cloud | ||
common | ||
diffs | ||
tasks | ||
templates | ||
.gitattributes | ||
.gitignore | ||
GITEA_PLAN.md | ||
README.md | ||
mypy.ini | ||
poetry.lock | ||
pyproject.toml | ||
test.sh |
README.md
How to install
$ apt install python3-cachecontrol # https://bugs.launchpad.net/ubuntu/+source/poetry/+bug/1958227
$ poetry install
How to fetch the data
Note it needs the token itself, not the file.
$ env GITEA_API_TOKEN=<conduit-token> poetry run python -m tasks.fetch_and_store
$ env GITEA_API_TOKEN=<conduit-token> poetry run python -m diffs.fetch_and_store
For an optional later start:
$ env GITEA_API_TOKEN=<conduit-token> poetry run python -m tasks.fetch_and_store "2020-02-01"
How to use the data
To plot the number of new tasks over time:
poetry run python -m tasks.plot_days new --start 2020-08-01 --end 2020-08-31
To plot the number of fixed commits over time:
poetry run python -m tasks.plot_days committedfix --git-repository=~/src/blender/blender --start 2020-01-01
To plot the number of new patches over time:
poetry run python -m diffs.plot_days new --start 2020-08-01 --end 2020-08-31
To save the values of the data:
poetry run python -m tasks.update-plotted-db ~/src/blender/blender
poetry run python -m diffs.update-plotted-db
To calculate the response time:
poetry run python -m tasks.response_time website --start 2019-01-01 --end 2020-01-01
Token
The token requires:
- read:organization
- read:issue