Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

cassis-cli example

Example repo showing how to manage a Cassis ontology with cassis-cli: version it in Git, validate and run evals in CI on every pull request, and publish on merge.

What's in here

  • cassis/ — a full Cassis ontology export for a Formula 1 dataset: domains, tables with descriptions and synonyms, joins, and metrics. This is the format produced by cassis ontology pull and consumed by cassis ontology upload.
  • .github/workflows/ontology.yml — a minimal GitHub Actions workflow:
    • check (every PR and push to main): cassis ontology check validates the YAML files with the same checks as the Cassis GitHub PR check.
    • eval (PRs only): cassis eval run runs the project's eval suite against the ontology files on the branch, so you see the impact of a change before merging. Nothing is pushed to Cassis; scoring happens in-memory.
    • publish (push to main): cassis ontology upload replaces the project's ontology with the files in the repo and publishes a new version. Idempotent: unchanged files are a no-op.

Try it yourself

  1. Fork this repo.
  2. In Cassis, create an API key under Organization settings → API keys and add it as the CASSIS_API_KEY repository secret.
  3. Find your project ID (the UUID in the project's URL) and add it as the CASSIS_PROJECT_ID repository variable.
  4. Open a PR that edits any file under cassis/ (tweak a description, add a synonym) and watch the checks run.

The workflow in practice

edit cassis/*.yml on a branch
        │
        ▼
   open a PR ──► ontology check   (YAML + import validation)
        │        eval run          (does the change help or hurt?)
        ▼
   merge to main ──► ontology upload (publish a new version)

CLI reference

pip install cassis-cli

cassis ontology check          # validate ontology files in the current checkout
cassis ontology pull           # download the project's unpublished ontology into the checkout
cassis eval run                # run the project's eval suite against local files
cassis ontology upload         # upload and publish the local files as a new version

All commands read CASSIS_API_KEY, CASSIS_PROJECT_ID and CASSIS_API_URL from the environment, or take --api-key / --project / --api-url flags.

About

Example CI setup for cassis-cli: ontology in Git, checks and evals on every PR, publish on merge.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors