Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3d5ebb5
feat(reference)!: type launch tables as launch envelopes
YoloWingPixie Oct 4, 2026
349b37a
feat(package): make the SQLite self-describing and searchable
YoloWingPixie Oct 4, 2026
1b19991
feat(site): add a reference site that reads the SQLite live
YoloWingPixie Oct 4, 2026
dbee7b0
fix(site): clear out/ before building so stale pages can't linger
YoloWingPixie Oct 4, 2026
f7f9ec8
ci(site): deploy the site to Cloudflare Pages on pushes to main
YoloWingPixie Oct 5, 2026
0b9b6df
feat(package): add precomputed record and browse views to the SQLite
YoloWingPixie Oct 5, 2026
4d7bec2
feat(site): faster first load and plainer text
YoloWingPixie Oct 5, 2026
f657a54
feat(schema)!: add unit suffixes to angle fields
YoloWingPixie Oct 10, 2026
0d383e9
feat(site): restyle as a technical manual
YoloWingPixie Oct 10, 2026
78601a0
feat(site): group browse lists and honour configured facets
YoloWingPixie Oct 10, 2026
108d894
feat(site): add View Lua drawer from the dump release
YoloWingPixie Oct 10, 2026
75fc977
feat(site): add location maps to records
YoloWingPixie Oct 10, 2026
1b209e4
fix(site): stop the Lua drawer freezing when picking a block
YoloWingPixie Oct 10, 2026
958059c
feat(site): scroll browse pages as a whole page
YoloWingPixie Oct 10, 2026
bc9af20
feat(site): make Lua API entries signature-headed and compact
YoloWingPixie Oct 10, 2026
4e8d26c
feat(site): label return types in Lua API headings
YoloWingPixie Oct 10, 2026
41c9dd6
feat(site): set Lua API fields and parameters as ruled tables
YoloWingPixie Oct 10, 2026
d781eb9
feat(site): make the Lua API a chapter of the reference
YoloWingPixie Oct 10, 2026
2579152
fix(site): stack enum table rows on phones
YoloWingPixie Oct 10, 2026
8674203
feat(site): link to the GitHub repo from the header
YoloWingPixie Oct 10, 2026
bcc65c5
ci: scope schema CI and site deploy by changed paths
YoloWingPixie Oct 10, 2026
dcb389c
refactor(site): share helpers and consolidate CSS
YoloWingPixie Oct 10, 2026
1e96009
refactor(site): move field roles into the catalog and cut query waste
YoloWingPixie Oct 10, 2026
13cce4b
refactor(site): finish moving field layout into the catalog
YoloWingPixie Oct 10, 2026
763028c
refactor(site): build the catalog in mark passes and fix duplicate keys
YoloWingPixie Oct 10, 2026
f8ced3e
refactor(site): share curve, cell and section rules across views
YoloWingPixie Oct 10, 2026
6c08cef
refactor(site): record each field's compare shape in the catalog
YoloWingPixie Oct 10, 2026
af4dfa5
fix(site): resolve configured browse columns and facets via the catalog
YoloWingPixie Oct 10, 2026
390d7a7
refactor(site): one storage resolver, ref loader and layout decision
YoloWingPixie Oct 10, 2026
f7f043d
refactor(site): treat Mach samples as curves and key overlays by id
YoloWingPixie Oct 10, 2026
a44aafe
refactor(site): key ref facets by id and make nav sections data
YoloWingPixie Oct 10, 2026
46c8e5e
ci(site): run site lint, tests, overlay check and e2e on PRs
YoloWingPixie Oct 10, 2026
c4e2358
perf(site): static model and name index, compressed precomputed views
YoloWingPixie Oct 10, 2026
e4cb89d
fix(site): stop airbase pages scrolling sideways on phones
YoloWingPixie Oct 10, 2026
7b02e0b
perf(site): precompute compare field values into the SQLite
YoloWingPixie Oct 10, 2026
a513353
fix(site): theme the open list of dropdowns in dark mode
YoloWingPixie Oct 10, 2026
e472980
fix(site): open compare on the record's series from its Compare button
YoloWingPixie Oct 10, 2026
1a878a7
fix(package): satisfy mypy in page_order and the SQLite tests
YoloWingPixie Oct 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
name: DCS World Schema CI

on:
# The site has its own workflow (site.yml); changes only to it skip schema CI.
push:
branches: [ main ]
paths-ignore:
- 'site/**'
- '.github/workflows/site.yml'
pull_request:
branches: [ main ]
paths-ignore:
- 'site/**'
- '.github/workflows/site.yml'
workflow_dispatch:

permissions:
Expand Down
285 changes: 285 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
name: Site

on:
# The site itself, this workflow, and the inputs its database and Lua are built from.
# Pull requests run the checks only; pushes to main also deploy.
push:
branches: [main]
paths:
- 'site/**'
- '.github/workflows/site.yml'
- 'dcs-world-reference/latest/**'
- 'dcs-world-schema/**'
- 'tools/**'
- 'VERSION'
- 'Taskfile.yml'
- 'pyproject.toml'
- 'uv.lock'
pull_request:
branches: [main]
paths:
- 'site/**'
- '.github/workflows/site.yml'
- 'dcs-world-reference/latest/**'
- 'dcs-world-schema/**'
- 'tools/**'
- 'VERSION'
- 'Taskfile.yml'
- 'pyproject.toml'
- 'uv.lock'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: site-${{ github.ref }}
cancel-in-progress: true

jobs:
shell:
name: Build shell
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache key
id: key
run: echo "key=site-shell-${{ hashFiles('site/**', '!site/node_modules/**', '!site/out/**', '!site/.next/**', 'dcs-world-schema/**') }}" >> "$GITHUB_OUTPUT"

- name: Restore shell
id: cache
uses: actions/cache@v4
with:
path: site/out
key: ${{ steps.key.outputs.key }}

- name: Set up Node
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install uv and Task
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install uv
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: Build shell
if: steps.cache.outputs.cache-hit != 'true'
env:
SITE_SQLITE: none
SITE_LUA: none
run: |
task uv:sync
task merge
corepack enable
cd site
pnpm install --frozen-lockfile
pnpm build

- uses: actions/upload-artifact@v4
with:
name: site-shell
path: site/out
retention-days: 1

database:
name: Build database
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache key
id: key
run: echo "key=site-db-${{ hashFiles('dcs-world-reference/latest/**', 'dcs-world-schema/**', 'tools/**', 'VERSION', 'uv.lock', 'site/src/lib/series-display.json', 'site/src/lib/api/scripting.json', 'site/src/lib/compare-fields.json') }}" >> "$GITHUB_OUTPUT"

- name: Restore database
id: cache
uses: actions/cache@v4
with:
path: dist/site-db
key: ${{ steps.key.outputs.key }}

- name: Set up Python
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install uv and Task
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install uv
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: Build database
if: steps.cache.outputs.cache-hit != 'true'
run: |
task uv:sync
task package:sqlite
mkdir -p dist/site-db
cp dist/dcs-world-reference-*-dcs*.sqlite dist/site-db/

- uses: actions/upload-artifact@v4
with:
name: site-db
path: dist/site-db
retention-days: 1

# The _G dump files the records point into ("View Lua"), from the dump's release asset
# (tools/datamine/dump_lua.py: tag dcs-dump-<DCS version>, asset dcs-g-dump-<version>.tar.gz).
lua:
name: Collect Lua
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Dump release
id: dump
run: |
version="$(jq -r .dcsVersion dcs-world-reference/latest/manifest.json)"
{
echo "tag=dcs-dump-$version"
echo "asset=dcs-g-dump-$version.tar.gz"
echo "key=site-lua-$version-${{ hashFiles('dcs-world-reference/latest/**', 'tools/datamine/dump_lua.py', 'tools/datamine/dump_paths.py', 'tools/datamine/common.py', 'uv.lock') }}"
} >> "$GITHUB_OUTPUT"

- name: Restore Lua
id: cache
uses: actions/cache@v4
with:
path: dist/site-lua
key: ${{ steps.dump.outputs.key }}

- name: Set up Python
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Collect Lua
if: steps.cache.outputs.cache-hit != 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
pip install uv
gh release download "${{ steps.dump.outputs.tag }}" --pattern "${{ steps.dump.outputs.asset }}" --dir .datamine
uv run python -m tools.datamine.dump_lua collect --archive ".datamine/${{ steps.dump.outputs.asset }}" --out dist/site-lua

- uses: actions/upload-artifact@v4
with:
name: site-lua
path: dist/site-lua
retention-days: 1

# Lint, types, unit tests and overlays against the database built above, then the
# Playwright suite (both database layouts) on a build of the site with that database.
checks:
name: Site checks
needs: database
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: site-db
path: dist/site-db

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install
run: |
corepack enable
pnpm install --frozen-lockfile
echo "SITE_SQLITE=$(ls "$GITHUB_WORKSPACE"/dist/site-db/*.sqlite)" >> "$GITHUB_ENV"

- name: Lint
run: pnpm lint

- name: Typecheck
run: pnpm typecheck

- name: Unit tests
run: pnpm test

- name: Overlays
run: pnpm check:overlays "$SITE_SQLITE"

- name: Build
env:
SITE_LUA: none
run: pnpm build

- name: Install Chromium
run: pnpm exec playwright install --with-deps chromium

# The speed budgets (perf.spec.ts) measure throttled loads; shared runners are too
# noisy for them, so they run locally only.
- name: End-to-end
run: |
pnpm exec playwright test --grep-invert "speed budget"
SITE_DB_MODE=chunked pnpm exec playwright test --grep-invert "speed budget"

deploy:
name: Deploy
if: github.event_name != 'pull_request'
needs: [shell, database, lua, checks]
runs-on: ubuntu-latest
environment:
name: cloudflare-pages
url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: site/scripts

- uses: actions/setup-node@v4
with:
node-version: "22"

- uses: actions/download-artifact@v4
with:
name: site-shell
path: public

- uses: actions/download-artifact@v4
with:
name: site-db
path: db

- uses: actions/download-artifact@v4
with:
name: site-lua
path: lua

- name: Split database
run: node site/scripts/split-sqlite.ts public --mode=chunked --db="$(ls db/*.sqlite)"

- name: Add Lua
env:
SITE_LUA: lua
SITE_LUA_REQUIRED: "1"
run: node site/scripts/copy-lua-assets.ts public

- name: Deploy
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: "4.147.0"
command: pages deploy public --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME || 'dcs-world-schema' }} --branch=main
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ uv.lock

# datamine cache and DCS run output (tools/datamine/refresh.py)
.datamine/
# Dump files the site shows (tools/datamine/dump_lua.py); built from the dump release asset, never committed
dcs-world-reference/latest/_lua/

# Python
__pycache__/
Expand Down Expand Up @@ -176,3 +178,11 @@ packages/lua/dcs_world_reference/*.lua
packages/go/data/
packages/go/*_gen.go
packages/go/*_gen_test.go

# reference site prototype (site/): generated data and test output
site/public/data/
site/test-results/
site/playwright-report/
site/public/sqlite/
site/public/overlays/
site/public/_redirects
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- SQLite: `schema_types` (every entity type with its fields), `ref_paths` (every reference), a `search` table with an FTS5 index, and the Lua API (`api_symbols`, `api_type_uses`).
- Reference site in `site/`: search, record pages, compare and the Lua API, read live from the SQLite in the browser.
- SQLite: `field_values` (`series`, `path`, `view`): every field the reference site compares, across a series' records, as raw-deflate compressed JSON `{values: {id: value}, links}` (keyed motor stages by stage, curves as `{x, y}`, launch envelopes as surfaces, Mach-sampled lists as stored), and `field_paths`: each series' keyed field paths.

### Changed
- SQLite: `record_views.view` and `series_views.view` are BLOBs of raw-deflate compressed JSON (`zlib.decompress(view, -15)`), no longer TEXT. Record views gain `scripting` (the record's Lua class, member and enum rows); series views gain `fields` (the reference site's default browse paths beyond the scalar columns) and `groups` (each row's group-by target). These views are new since 0.5.0, so no released consumer reads them; code written against the unreleased TEXT views must inflate them.
- Breaking: `weapon_flight.launchTables` is replaced by `launchEnvelopes`: maximum and minimum launch range (m) and aspect (deg) by launch altitude (m) and true airspeed (m/s).
- Breaking: angle fields whose unit was not stated now carry it in their name (values unchanged):
- `ground_vehicles`, `ships` `weaponSystems[]`: `reloadAngleY` → `reloadAngleYRad`, `reloadAngleZ` → `reloadAngleZRad`, `minLaunchAngle` → `minLaunchAngleRad`, `inclinationCorrectionBias` → `inclinationCorrectionBiasRad`, `inclinationCorrectionUpperLimit` → `inclinationCorrectionUpperLimitRad`.
- `weapon_flight` `gimbal`: `trackingRateMax` → `trackingRateMaxRadS`.
- `aircraft_flight` `aerodynamics.table[]`: `aoaMax` → `aoaMaxDeg`.
- `gun_ammo` rebound blocks: `angle0` → `angle0Deg`, `angle100` → `angle100Deg`, `deviationAngle` → `deviationAngleDeg`.

## [0.5.0] - 2026-10-04

### Added
Expand Down
25 changes: 25 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,15 @@ tasks:
cmds:
- "uv run python -m tools.datamine.extract {{.CLI_ARGS}}"

"datamine:dump-asset":
desc: |
Pack a _G dump (default .datamine/_G) as its release asset, dist/dcs-g-dump-<DCS version>.tar.gz,
which the site's View Lua reads (tools/datamine/dump_lua.py). Publish it with
gh release create dcs-dump-<DCS version> dist/dcs-g-dump-<DCS version>.tar.gz --latest=false
Usage: task datamine:dump-asset -- [G_DIR] [--out FILE]
cmds:
- "uv run python -m tools.datamine.dump_lua pack {{.CLI_ARGS}}"

"datamine:coverage":
desc: >-
Coverage of DCS object configuration in Lua _G dumps: diff a dump against a
Expand Down Expand Up @@ -472,6 +481,7 @@ tasks:
dcs-world-reference/latest/ (needs Node >= 20.10 and Go >= 1.24)
deps:
- build:jsonschema
- build:envs
cmds:
- "uv run python -m tools.package.build"
- "uv run python -m tools.package.sqlite"
Expand All @@ -486,6 +496,7 @@ tasks:
Build dist/dcs-world-reference-<version>-dcs<dcs version>.sqlite
deps:
- build:jsonschema
- build:envs
cmds:
- "uv run python -m tools.package.bundles"
- "uv run python -m tools.package.sqlite"
Expand Down Expand Up @@ -608,3 +619,17 @@ tasks:
- "datamine:id-types:check"
- lint
- "package:test"

site:dev:
desc: "Run the reference site prototype (site/) dev server on :3210"
dir: site
cmds:
- corepack pnpm install
- corepack pnpm dev

site:build:
desc: "Build the reference site prototype as a static export into site/out (SITE_BASE_PATH for a subpath)"
dir: site
cmds:
- corepack pnpm install
- corepack pnpm build
Loading
Loading