Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 6 additions & 64 deletions .github/workflows/update-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,73 +4,15 @@ on:
schedule:
# Run every Monday at 9 AM ET (14:00 UTC)
- cron: '0 14 * * 1'
push:
branches:
- main
paths:
- 'reports/*.py'
- 'reports/pyproject.toml'
workflow_dispatch:

permissions: {}

jobs:
update-reports:
runs-on: ubuntu-latest
environment: gh-stats
reports:
uses: NASA-IMPACT/dse-oss-reports/.github/workflows/reports.yml@33eb4f01af27504d3a35e32fbbc679435e300b5b # v0.2.0
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false

- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Install uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
version: "0.9.*"
enable-cache: true

- name: Generate config data
working-directory: reports
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_ODD_PAT: ${{ secrets.GH_ODD_PAT }}
run: uv run generate_config.py

- name: Generate commit data
working-directory: reports
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_ODD_PAT: ${{ secrets.GH_ODD_PAT }}
run: uv run main.py

- name: Generate plot
working-directory: reports
run: uv run plot.py

- name: Generate docs page
working-directory: reports
run: uv run generate_docs.py

- name: Create Pull Request
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11
with:
commit-message: "Update reports for ${{ github.run_id }}"
title: "Update reports (${{ steps.date.outputs.date }})"
body: |
Automated update of commit reports and visualization.

Generated by GitHub Actions workflow.
branch: update-reports
add-paths: |
reports/output/
docs/images/
docs/objectives.md
with:
dse-oss-reports-ref: further-simplification
secrets:
pat: ${{ secrets.GH_ODD_PAT }}
50 changes: 41 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,50 @@
# VEDA ODD

This repository hosts documentation for contributing to and interacting with the Optimized Data Delivery team of NASA's VEDA project.
This repository hosts documentation for contributing to and interacting with the Optimized Data Delivery team of NASA's VEDA project. Published at <https://nasa-impact.github.io/veda-odd/>.

## Building the Documentation
## Building the documentation

```bash
git clone https://github.com/NASA-IMPACT/veda-odd.git
cd veda-odd
# Serve the documentation
uv run -- mkdocs serve
uv sync
uv run mkdocs serve # preview at http://127.0.0.1:8000
```

The documentation is deployed automatically via GitHub pages and the [deploy workflow](.github/workflows/deploy.yml).
The deploy workflow ([`.github/workflows/deploy.yml`](.github/workflows/deploy.yml)) publishes to GitHub Pages on every push to `main`.

## Reports
## Reporting pipeline

See [reports/README.md](reports/README.md) for the OSS commit statistics tooling that generates the charts and tables on the objectives page.
Quarterly objectives, commit charts, and the [Objectives page](https://nasa-impact.github.io/veda-odd/objectives) are auto-generated by [`dse-oss-reports`](https://github.com/NASA-IMPACT/dse-oss-reports). All team-specific configuration lives in [`team.toml`](./team.toml); see [`docs/adopting.md`](docs/adopting.md) and the [upstream adoption guide](https://github.com/NASA-IMPACT/dse-oss-reports#adoption-guide) for architecture and onboarding.

The weekly cron in [`.github/workflows/update-reports.yml`](.github/workflows/update-reports.yml) calls the library's reusable workflow, which scrapes GitHub issues, fetches commit data, regenerates charts and `docs/objectives.md`, and opens a PR for review.

### Running the pipeline locally

`dse-oss-reports` is pinned in `pyproject.toml`; `uv sync` installs it alongside mkdocs. Then prefix every command with `uv run`. All commands take `--config team.toml` and run from the repo root.

| Subcommand | What it does | Reads | Writes | PAT? |
|---|---|---|---|---|
| `current-pi` | Print the resolved current PI | `team.toml` | stdout | no |
| `generate-config` | Scrape GitHub issues into the objectives data file | GitHub API | `reports/_objectives_data.json` | yes |
| `fetch` | Pull authored commits + resolved items for a PI | GitHub API, `_objectives_data.json` | `reports/output/{pi}-*.csv` | yes |
| `plot` | Render per-PI charts | `reports/output/{pi}-*.csv` | `docs/images/{pi}-*.png` | no |
| `generate-docs` | Render the objectives page | `_objectives_data.json`, existing PNGs | `docs/objectives.md` | no |
| `run-all` | Run all four pipeline stages in order | everything | everything | yes |

PAT-requiring commands read `DSE_OSS_REPORTS_TOKEN` → `GH_ODD_PAT` → `GITHUB_TOKEN` (in that order). Create a fine-grained PAT with public-repo read access at <https://github.com/settings/personal-access-tokens/new>.

#### Common workflows

```bash
# Full refresh from GitHub (PAT required, ~1-2 minutes)
export GH_ODD_PAT=ghp_...
uv run dse-oss-reports --config team.toml run-all

# Regenerate figures from existing CSVs (no PAT, ~5 seconds)
uv run dse-oss-reports --config team.toml plot # current PI
uv run dse-oss-reports --config team.toml plot --pi pi-26.2 # a specific past PI

# Regenerate the docs page after charts change (no PAT)
uv run dse-oss-reports --config team.toml generate-docs
```

Bump the `dse-oss-reports` pin in `pyproject.toml` and both refs in `.github/workflows/update-reports.yml` together when picking up a new library release.
Loading