3.6 KiB
Guide on how to monitor decomp progress using frogress
Overview
This guide will provide a flow for how to use frogress for your project.
sequenceDiagram
autonumber
actor Contributor as Project contributor
actor Monitor as Spectator
Contributor->>+CI: Trigger
CI->>CI: Build
CI->>CI: Calculate progress
CI->>-frogress: Upload progress
Note over CI,frogress: POST /data/project:/version:/
Monitor->>frogress: Fetch progress
Note over Monitor,frogress: GET /data/project:/version:/?mode=all
frogress->>Monitor: Return progress
Monitor->>Monitor: Render progress
CI: Continuous Integration services including GitHub Actions, Gitlab pipelines, Travis CI and Jenkins.
Steps
-
Contact frogress admin (Ethan) to add your project to the database and obtain an api_key
-
Create schema with
cli.py
2.1 Edit
cli.ini
[frogress] domain = https://progress.deco.mp api_key = api_key
2.2 Create version
# Usage ./cli.py create version -h # Example ./cli.py create version fireemblem8 us
2.3 Create category
# Usage ./cli.py create category -h # Example ./cli.py create category fireemblem8 us default
-
Configure CI to upload data on build
3.1 API
POST https://progress.deco.mp/data/project:/version:/
{ "api_key": "", "entries": [ "git_hash": "", "timestamp": "", "categories": { "default": { # metrics } } ] }
3.2 Example
-
Supplement historical data (optional, one-time)
Calculate progress for historical commits and upload it to frogress for the purpose of visualizing and tracking historical data
-
Fetch project data
5.1 API
There are 3 "modes" for returning results:
all
,latest
, andshield
. The first two are pretty self explanatory, andshield
can be used to generate badges for your repo's README.md (shields.io).GET https://progress.deco.mp/data/project:/version:/?mode=all
GET https://progress.deco.mp/data/project:/version:/?mode=latest
Note that the category and measure are required for mode
shield
.GET https://progress.deco.mp/data/project:/version:/category:/?mode=shield&measure=MEASURE
Note: Specifying a category in the request URL is optional for
all
andlatest
modes. If the category is not specified, results from all categories will be returned. However, forshield
, it is necessary to specify the category and measure in the request url, as shown above.all
example:https://progress.deco.mp/data/fireemblem8/us/?mode=all
shield
example:https://progress.deco.mp/data/dukezh/us/default/?mode=shield&measure=bytes
5.2 Build a website
Build a website to display your progress!
You can use the "latest" mode to retrieve just the latest datapoint or render full graphs using a library such as uPlot or Chart.js