diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 049a19e..9699b7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,8 @@ jobs: - run: uv run python codegen/generate_tools.py --check - run: uv run python codegen/generate_anchors.py --check - run: uv run python codegen/generate_directions.py --check + - run: uv run python codegen/generate_casefold.py --check + - run: uv run python codegen/generate_nfc.py --check # Published text names no one inside the team and points at no internal room or tracker. - run: uv run python scripts/public_words.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed5d010..cd58f5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,10 +62,14 @@ jobs: - run: uv sync --locked - run: uv run pytest -q - run: uv run ruff check . + - run: uv run ruff format --check . - run: uv run mypy --strict src tests - run: uv run python codegen/generate_schema.py --check - run: uv run python codegen/generate_tools.py --check - run: uv run python codegen/generate_anchors.py --check + - run: uv run python codegen/generate_directions.py --check + - run: uv run python codegen/generate_casefold.py --check + - run: uv run python codegen/generate_nfc.py --check # Published text names no one inside the team and points at no internal room or tracker. - run: uv run python scripts/public_words.py - run: uv build diff --git a/AGENTS.md b/AGENTS.md index 701e363..820ecc1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,6 +18,8 @@ uv run python codegen/generate_schema.py --check uv run python codegen/generate_tools.py --check uv run python codegen/generate_anchors.py --check uv run python codegen/generate_directions.py --check +uv run python codegen/generate_casefold.py --check +uv run python codegen/generate_nfc.py --check uv run python scripts/public_words.py ``` diff --git a/README.md b/README.md index 67b97ae..a3829f8 100644 --- a/README.md +++ b/README.md @@ -397,7 +397,7 @@ Not yet: typed element models, the account routes, a snapshot writer. ## Develop ```bash -uv sync +uv sync --locked uv run pytest -q uv run ruff check . && uv run ruff format --check . && uv run mypy --strict src tests uv run python codegen/generate_schema.py --check @@ -406,19 +406,22 @@ uv run python codegen/generate_anchors.py --check uv run python codegen/generate_directions.py --check uv run python codegen/generate_casefold.py --check uv run python codegen/generate_nfc.py --check +uv run python scripts/public_words.py ``` To move the schema pin to a new [schema-dist](https://github.com/OnlyWorlds/schema-dist) tag: `uv run python codegen/repin.py ""` vendors the tag's tree from a local checkout of schema-dist (the directory beside this one, `$OW_SCHEMA_DIST`, or `--schema-dist `) and rewrites `codegen/schema-pin.json`. It writes nothing unless the tree agrees with its own MANIFEST and with the MANIFEST GitHub serves at the tag. Then run `codegen/generate_schema.py` and the checks above. -Three groups of tests skip unless their variable is set: +Five groups of tests use environment variables to enable their checks: - `OW_CONFORMANCE_FIXTURE=`: the folder-format conformance fixture from the Atlas repo. - `OW_OPENAPI=https://www.onlyworlds.com/api/v2/openapi.json` (or a saved copy): checks the client's routes, parameters and fields against the API's own OpenAPI document. - `OW_LIVE=1`: read-only calls against the demo world, and a few writes to the practice world (its published key and PIN, reset every night), each deleted again. +- `OKF_REFERENCE_SRC=`: the `src/` of an open-knowledge-format checkout, for its reference parser and viewer. The check skips when that code cannot be imported. +- `OW_STAGING_BASE`, `OW_STAGING_OWNER_KEY`, `OW_STAGING_OWNER_PIN`, `OW_STAGING_CONTRIB_KEY`, `OW_STAGING_CONTRIB_PIN` and `OW_STAGING_MEMBERSHIP`: all six are needed for the staging write checks. Each element made is deleted after the test. -CI's `wire` job sets the last two on every push. Red there with the other jobs green means the server moved under the client, not that a change broke it. +Other checks skip when PyYAML or Git is missing, when NTFS cannot hold the test names, or when symlinks are unavailable or the platform is Windows. These have no environment switch. -`OKF_REFERENCE_SRC=` (the `src/` of an open-knowledge-format checkout) also runs OKF's own parser and viewer over an exported bundle. +CI's `wire` job sets `OW_OPENAPI` and `OW_LIVE` on pushes to `main` and on pull requests. Red there with the other jobs green means the server moved under the client, not that a change broke it. ## Licence and contributions