LucidStats
LucidStats is an open source project that provides advanced analytics for open source
projects.
The first goal of the analytics system is to provide advanced sponsorship charts such as
- income per week
- income per month
- churn rate
Issues Charts
The second goal of the system is to provide a vision and measure how well the issue tracker works.
- number of open issues per week/month
- number of closed issues per week/month
- ratio closed to open
How it works
The project is in the WIP state, so it's not useful at the moment, but some of the features such as
data collection & processing are already working.
The data is collected through GitHub Webhooks.
Development
Requirements:
To see the list of available tasks, execute task
with no arguments.
$ ~/go/s/g/l/lucidstats master↕ task
task: Available tasks for this project:
* build: build source code
* debug: debug program (run with all pre-populated params)
* dev:start: start development docker containers
* dev:stop: start development docker containers
* dock: build docker image
* nats: start local nats server
* sql: start local mariadb server
* sql:schema: set up sql schema
* sql:shell: set up sql schema
Start
The usual process looks in the following way:
-
Start nats and maria containers:
$ task dev:start
If it fails because of existing container, you can try to call task dev:stop dev:start
.
-
Build & Start the program with all pre-defined parameters for development purposes:
$ task debug
- Upload database SQL schema
$ task sql:schema
Data
The data can be generated using go/cmd/generator
tool.
- Compile the generator:
$ go build ./go/cmd/generator
- Start it
./generator --persons 10-20 --tiers 0-3 --events-created 1-5 --events-tier-changed 1-5 --events-cancel 1-5 generated
The generator's options:
--persons <min-max> Min-max number of persons.
--tiers <min-max> Min-max number of tiers per person.
--events-created <min-max> Min-max number of "created" events per person.
--events-tier-changed <min-max> Min-max number of "tier_changed" events per person.
--events-cancel <min-max> Min-max number of "pending_cancellation" events per person.
- Upload the generated JSON files to the web server via webhook endpoint.
$ hack/testdata generated
The command will upload JSON datasets one by one emulating GitHub's behavior.
License
Apache 2.0