# Install dependencies
pnpm installThe OXA schema is defined as individual YAML files in the schema/ directory. YAML was chosen for schema definitions because it is more human-readable and easier to edit than JSON.
The schema/schema.json file is autogenerated from the YAML sources and should not be edited directly. Any schema changes should be made to the .yaml files, then regenerated:
pnpm codegen json# Format all files
pnpm format
# Check formatting without modifying files
pnpm format:check# Check for lint issues
pnpm lint
# Auto-fix lint issues
pnpm lint:fix# Run TypeScript type checking
pnpm typecheck# Run all code generation (validate, ts, py, rs, docs, conformance)
pnpm codegen all
# Or run individual steps:
pnpm codegen validate # Validate schema files
pnpm codegen ts # Generate TypeScript types
pnpm codegen py # Generate Python Pydantic models
pnpm codegen rs # Generate Rust types
pnpm codegen conformance # Generate conformance suite manifest
pnpm codegen docs # Generate MyST documentation# Build all packages (uses Turborepo for caching and parallel execution)
pnpm build
# Clean all packages
pnpm cleanNote: This project uses Turborepo for build orchestration. Turborepo provides intelligent caching and parallel task execution across the monorepo, significantly speeding up builds and tests.
This project uses Changesets for version management and releases.
When you make changes that should be released, run:
pnpm changesetThis will prompt you to:
- Select which packages are affected
- Choose the bump type (patch, minor, major)
- Write a summary of the changes
Commit the generated changeset file with your PR.
- When PRs with changesets are merged to
main, a "Version Packages" PR is automatically created/updated - Merging the "Version Packages" PR triggers the release workflow
- Packages are published to:
- npm:
oxa-types,@oxa/core,oxa - PyPI:
oxa-types - crates.io:
oxa-types
- npm:
oxa-types(TypeScript),oxa-types(Python), andoxa-types(Rust) stay in sync@oxa/coreandoxacan version independently
The @oxa/conformance package provides test cases for validating OXA format conversion implementations. If you're building a tool that converts between OXA and other formats, you can use these test cases to validate your implementation.
To add new test cases to the conformance suite:
-
Create a new JSON file in the appropriate directory:
packages/@oxa/conformance/cases/inline/for inline node testspackages/@oxa/conformance/cases/block/for block node tests
-
Follow the test case format:
{
"$schema": "../../schemas/test-case.schema.json",
"title": "Short descriptive title",
"description": "What this test validates",
"category": "inline",
"formats": {
"oxa": { ... },
"myst": { ... },
"pandoc": { ... },
"stencila": { ... },
"markdown": "...",
"html": "...",
"jats": "..."
},
"notes": {
"markdown": "Optional format-specific notes"
}
}-
Formats should be in canonical order:
oxa,myst,pandoc,stencila,markdown,html,jats. Theoxaformat is required; others are optional. -
Regenerate the manifest:
pnpm codegen conformance- Run tests to validate your test case:
pnpm testThe documentation uses MyST and requires the automated codegen tool to run. To start the documentation use npm install -g mystmd and run myst start in the docs/ folder. The online documentation is hosted using Curvenote under https://oxa.dev