Skip to content

Install & Run

This page explains how to run the weekly analytics package on a laptop, VM, container, or scheduled cloud job.

Download

Requirements

RequirementPurpose
Python 3Runs the report pipeline.
Node.js 18+Required only for Cloudflare publishing through Wrangler/Staticrypt.
Pylon API keyPulls accounts, issues, and custom fields.
OllamaOptional but required for narrative summaries.
Cloudflare credentialsOptional; required for publishing the password-protected report archive.

Install Pipeline

bash
tar -xzf freighttiger-weekly-analytics-pipeline.tar.gz
cd report-pipeline
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
cp .env.example .env

Edit .env:

bash
PYLON_API_KEY=...

Enable Summaries

The summary step expects Ollama locally:

bash
ollama serve
ollama pull qwen3:8b

If summaries are not required, or Ollama is unavailable, run only the deterministic steps against an existing snapshot.

Run The Weekly Report

Full run:

bash
make all

Manual staged run:

bash
.venv/bin/python scripts/01_pull_pylon.py --date YYYY-MM-DD
.venv/bin/python scripts/02_compute_metrics.py --date YYYY-MM-DD
.venv/bin/python scripts/03_generate_summaries.py --date YYYY-MM-DD
.venv/bin/python scripts/04_render_report.py --date YYYY-MM-DD

Expected output:

text
data/weekly_snapshots/{date}/...
reports/{date}/report.html
reports/{date}/report.md

Publish

One-time login:

bash
make cf-login

Publish:

bash
make publish REPORT_PASSWORD='...' PAGES_PROJECT='ft-tms-weekly'

Publishing creates:

text
publish/{date}/index.html
publish/latest/index.html
publish/index.html

and deploys publish/ to Cloudflare Pages.

Cron Shape

Recommended weekly cron:

bash
cd /opt/ft-weekly-analytics
make all
make publish REPORT_PASSWORD="$REPORT_PASSWORD" PAGES_PROJECT="ft-tms-weekly"

Store these outside source control:

  • PYLON_API_KEY
  • REPORT_PASSWORD
  • Cloudflare/Wrangler credentials

Validation

After installation:

bash
make all
test -f reports/$(date -u +%Y-%m-%d)/report.html
test -f reports/$(date -u +%Y-%m-%d)/report.md

For package-only validation:

bash
python3 /path/to/skill-creator/scripts/quick_validate.py skills/freighttiger-weekly-analytics

Existing snapshot protection

01_pull_pylon.py refuses to overwrite a non-empty dated snapshot folder. Use a new --date or intentionally remove the incomplete generated folder.

FreightTiger Pylon setup, skills, and automations handoff