Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema for checksum files used in model repro CI checks #5

Merged
merged 5 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# ACCESS-NRI schema

## Overview

This repo contains first attempts to arrive at a common schema to describe various types of assets used/supported by ACCESS-NRI. The primary motivation for developing these schema at this stage is the development of the ACCESS-NRI Intake catalog.

## Versioning

We utilize [`SchemaVer`](https://docs.snowplow.io/docs/pipeline-components-and-applications/iglu/common-architecture/schemaver/) for schema versioning in this repository.

In a nutshell, `SchemaVer` is a `MODEL-REVISION-ADDITION` format, where:

* If adding changes that have no interoperability with the previous schema or historical data, the `MODEL` version should be incremented.
* If adding changes that may have interoperability with the previous schema and some historical data, increment the `REVISION` version.
* If adding changes that are interoperable with the previous schema and all historical data, increment the `ADDITION` version.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Access-OM2 Checksums",
"description": "The checksums from the model output of Access-OM2 model run",
CodeGat marked this conversation as resolved.
Show resolved Hide resolved
"type": "object",
"properties": {
"schema": {
aidanheerdegen marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"description": "The URL of the schema (str)"
},
"schema_version": {
"type": "string",
"description": "The version of the schema (str)"
},
"output": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "The name of the checksum field (str)"
},
"checksum": {
"type": "string",
"description": "The value of the checksum (str)"
}
},
"required": [
"field",
"checksum"
]
}
}
},
"required": [
"schema",
"schema_version",
"output"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# `access-om2-checksums` Changelog

## 1-0-0

* Initial release
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ACCESS-OM2 Checksums

This schema is used for checksum files generated as part of ACCESS-OM2
reproducibility CI checks for model configurations in the
[ACCESS-NRI/access-om2-configs](https://github.com/ACCESS-NRI/access-om2-configs)
repository.

## Extending the schema

To modify the schema, a new version of the schema will need to be created.

1. Determine the new schema version: We utilize [`SchemaVer`](https://docs.snowplow.io/docs/pipeline-components-and-applications/iglu/common-architecture/schemaver/) for schema versioning. In a nutshell, `SchemaVer` is a `MODEL-REVISION-ADDITION` format, where:
* If adding changes that have no interoperability with the previous schema or historical data, the `MODEL` version should be incremented.
* If adding changes that may have interoperability with the previous schema and some historical data, increment the `REVISION` version.
* If adding changes that are interoperable with the previous schema and all historical data, increment the `ADDITION` version.

2. Create a new file for the new schema version, e.g. `1-0-1.json`