Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

adjust schema URI with CRIM-ca org and MLM repo + add bump-my-version #16

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![hackmd-github-sync-badge](https://hackmd.io/lekSD_RVRiquNHRloXRzeg/badge)](https://hackmd.io/lekSD_RVRiquNHRloXRzeg?both)

- **Title:** Machine Learning Model Extension
- **Identifier:** [https://stac-extensions.github.io/mlm/v1.0.0/schema.json](https://stac-extensions.github.io/mlm/v1.0.0/schema.json)
- **Identifier:** [https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json](https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json)
- **Field Name Prefix:** mlm
- **Scope:** Collection, Item, Asset, Links
- **Extension Maturity Classification:** Proposal
Expand Down
4 changes: 2 additions & 2 deletions best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ leading to a new MLM STAC Item definition (see also [STAC Version Extension](#ve
{
"id": "stac-item-model",
"stac_extensions": [
"https://stac-extensions.github.io/mlm/v1.0.0/schema.json",
"https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json",
"https://stac-extensions.github.io/ml-aoi/v0.2.0/schema.json"
],
"assets": {
Expand Down Expand Up @@ -216,7 +216,7 @@ that the model is properly instantiated from the expected weights, or that suffi
```json
{
"stac_extensions": [
"https://stac-extensions.github.io/mlm/v1.0.0/schema.json",
"https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json"
],
"assets": {
Expand Down
2 changes: 1 addition & 1 deletion examples/item_basic.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/mlm/v1.0.0/schema.json"
"https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json"
],
"type": "Feature",
"id": "example-model",
Expand Down
2 changes: 1 addition & 1 deletion examples/item_eo_bands.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/mlm/v1.0.0/schema.json",
"https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/file/v1.0.0/schema.json",
Expand Down
2 changes: 1 addition & 1 deletion examples/item_multi_io.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/mlm/v1.0.0/schema.json",
"https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/file/v1.0.0/schema.json",
"https://stac-extensions.github.io/ml-aoi/v0.2.0/schema.json"
Expand Down
2 changes: 1 addition & 1 deletion examples/item_raster_bands.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/mlm/v1.0.0/schema.json",
"https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/file/v1.0.0/schema.json",
"https://stac-extensions.github.io/ml-aoi/v0.2.0/schema.json"
Expand Down
4 changes: 2 additions & 2 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://stac-extensions.github.io/mlm/v1.0.0/schema.json",
"$id": "https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json",
"title": "Machine Learning Model STAC Extension Schema",
"description": "This object represents the metadata for a Machine Learning Model (MLM) used in STAC documents.",
"oneOf": [
Expand Down Expand Up @@ -97,7 +97,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://stac-extensions.github.io/mlm/v1.0.0/schema.json"
"const": "https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"test": "npm run check-markdown && npm run check-examples",
"check-markdown": "remark . -f -r .github/remark.yaml -i .remarkignore",
"format-markdown": "remark . -f -r .github/remark.yaml -i .remarkignore -o",
"check-examples": "stac-node-validator . --lint --verbose --schemaMap https://stac-extensions.github.io/mlm/v1.0.0/schema.json=./json-schema/schema.json",
"format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/mlm/v1.0.0/schema.json=./json-schema/schema.json"
"check-examples": "stac-node-validator . --lint --verbose --schemaMap https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json=./json-schema/schema.json",
"format-examples": "stac-node-validator . --format --schemaMap https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json=./json-schema/schema.json"
},
"dependencies": {
"remark-cli": "^8.0.0",
Expand Down
129 changes: 128 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,40 @@ pytest-click = "^1.1.0"
pytest-pikachu = "^1.0.0"
coverage = "^7.3.0"
ruff = "^0.2.2"
bump-my-version = "^0.20.2"

[tool.bumpversion]
current_version = "1.0.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = true
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
commit_args = "--no-verify"
message = "Bump version: {current_version} → {new_version}"

[[tool.bumpversion.files]]
glob = "**/*.json"
search = "https://crim-ca.github.io/mlm-extension/v{current_version}/schema.json"
replace = "https://crim-ca.github.io/mlm-extension/v{new_version}/schema.json"

[[tool.bumpversion.files]]
glob = "**/*.md"
search = "https://crim-ca.github.io/mlm-extension/v{current_version}/schema.json"
replace = "https://crim-ca.github.io/mlm-extension/v{new_version}/schema.json"

[[tool.bumpversion.files]]
glob = "**/*.py"
search = "https://crim-ca.github.io/mlm-extension/v{current_version}/schema.json"
replace = "https://crim-ca.github.io/mlm-extension/v{new_version}/schema.json"

[tool.ruff]
exclude = [
Expand Down
2 changes: 1 addition & 1 deletion stac_model/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
)

SchemaName = Literal["mlm"]
SCHEMA_URI: str = "https://stac-extensions.github.io/mlm/v1.0.0/schema.json"
SCHEMA_URI: str = "https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json"
PREFIX = f"{get_args(SchemaName)[0]}:"


Expand Down
Loading