Skip to content

Commit

Permalink
Merge pull request #12 from stac-extensions/update-refs
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault authored Sep 30, 2024
2 parents 54fd62b + 34e31ac commit 936d361
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 46 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/crim-ca/mlm-extension/tree/main)
## [Unreleased](https://github.com/stac-extensions/mlm/tree/main)

### Added
- n/a
Expand All @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- n/a

## [v1.3.0](https://github.com/crim-ca/mlm-extension/tree/v1.3.0)
## [v1.3.0](https://github.com/stac-extensions/mlm/tree/v1.3.0)

### Added
- Add `raster:bands` required property `name` for describing `mlm:input` bands
Expand Down Expand Up @@ -57,13 +57,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
the [`pystac.extensions.eo`](https://github.com/stac-utils/pystac/blob/main/pystac/extensions/eo.py) utilities.
- Fix various STAC Asset definitions erroneously employing `mlm:model` role instead of the intended `mlm:source_code`.

## [v1.2.0](https://github.com/crim-ca/mlm-extension/tree/v1.2.0)
## [v1.2.0](https://github.com/stac-extensions/mlm/tree/v1.2.0)

### Added
- Add the missing JSON schema `item_assets` definition under a Collection to ensure compatibility with
the [Item Assets](https://github.com/stac-extensions/item-assets) extension, as mentioned this specification.
- Add `ModelBand` representation using `name`, `format` and `expression` properties to allow derived band references
(fixes [crim-ca/mlm-extension#7](https://github.com/crim-ca/mlm-extension/discussions/7)).
(fixes [crim-ca/mlm-extension#7](https://github.com/stac-extensions/mlm/discussions/7)).

### Changed
- Adds a job to `.github/workflows/publish.yaml` to publish the `stac-model` package to PyPI.
Expand All @@ -82,7 +82,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Although the role requirement was validated, the definition did not allow for other Assets without it to exist.
- Correct `stac-model` version in code and publish matching release on PyPI.

## [v1.1.0](https://github.com/crim-ca/mlm-extension/tree/v1.1.0)
## [v1.1.0](https://github.com/stac-extensions/mlm/tree/v1.1.0)

### Added
- Add pattern for `mlm:framework`, needing at least one alphanumeric character,
Expand All @@ -106,7 +106,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This is not fundamentally wrong, but it did not allow to validate the `eo` extension use case properly, since
the `raster:bands` reference caused a bypass for the `mlm:input[*].bands` to succeed validation.

## [v1.0.0](https://github.com/crim-ca/mlm-extension/tree/v1.0.0)
## [v1.0.0](https://github.com/stac-extensions/mlm/tree/v1.0.0)

### Added
- more [Task Enum](README.md#task-enum) tasks
Expand Down
4 changes: 2 additions & 2 deletions 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/N1cWyDM2S9eaAQtSvS0J_A/badge)](https://hackmd.io/N1cWyDM2S9eaAQtSvS0J_A?both)

- **Title:** Machine Learning Model Extension
- **Identifier:** [https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json](https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json)
- **Identifier:** [https://stac-extensions.github.io/mlm/v1.3.0/schema.json](https://stac-extensions.github.io/mlm/v1.3.0/schema.json)
- **Field Name Prefix:** mlm
- **Scope:** Collection, Item, Asset, Links
- **Extension Maturity Classification:** Pilot
Expand Down Expand Up @@ -84,7 +84,7 @@ connectors, please refer to the [STAC Model](./README_STAC_MODEL.md) document.
extension for describing models run on
[WherobotsAI Raster Inference](https://wherobots.com/wherobotsai-for-raster-inference/)
- [Collection example](examples/collection.json): Shows the basic usage of the extension in a STAC Collection
- [JSON Schema](https://crim-ca.github.io/mlm-extension/)
- [JSON Schema](https://stac-extensions.github.io/mlm/)
- [Changelog](./CHANGELOG.md)

## Item Properties and Collection Fields
Expand Down
26 changes: 13 additions & 13 deletions README_STAC_MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,34 +67,34 @@ See [LICENSE][blic2] for more details.
[bp1]: https://img.shields.io/pypi/pyversions/stac-model?style=for-the-badge
[bp2]: https://pypi.org/project/stac-model/
[bp3]: https://img.shields.io/pypi/v/stac-model?style=for-the-badge&logo=pypi&color=3775a9
[bp4]: https://github.com/crim-ca/mlm-extension
[bp5]: https://github.com/crim-ca/mlm-extension/releases
[bp4]: https://github.com/stac-extensions/mlm
[bp5]: https://github.com/stac-extensions/mlm/releases
[bp6]: https://img.shields.io/badge/made%20with-galactipy%20%F0%9F%8C%8C-179287?style=for-the-badge&labelColor=193A3E
[bp7]: https://kutt.it/7fYqQl
[bp8]: https://img.shields.io/static/v1.svg?label=Contributions&message=Welcome&color=0059b3&style=for-the-badge
[bp9]: https://github.com/crim-ca/mlm-extension/blob/main/CONTRIBUTING.md
[bp9]: https://github.com/stac-extensions/mlm/blob/main/CONTRIBUTING.md
[bp11]: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json&style=for-the-badge
[bp12]: https://python-poetry.org/

[bp15]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
[bp16]: https://github.com/crim-ca/mlm-extension/blob/main/.pre-commit-config.yaml
[bp16]: https://github.com/stac-extensions/mlm/blob/main/.pre-commit-config.yaml

[blic1]: https://img.shields.io/github/license/crim-ca/mlm-extension?style=for-the-badge
[blic2]: https://github.com/crim-ca/mlm-extension/blob/main/LICENSE
[blic1]: https://img.shields.io/github/license/stac-extensions/mlm?style=for-the-badge
[blic2]: https://github.com/stac-extensions/mlm/blob/main/LICENSE
[blic3]: https://img.shields.io/badge/%F0%9F%93%A6-semantic%20versions-4053D6?style=for-the-badge

[github-releases]: https://github.com/crim-ca/mlm-extension/releases
[github-releases]: https://github.com/stac-extensions/mlm/releases

[bscm1]: https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white
[bscm2]: https://img.shields.io/github/v/release/crim-ca/mlm-extension?filter=stac-model-v*&style=for-the-badge&logo=semantic-release&color=347d39
[bscm6]: https://img.shields.io/github/actions/workflow/status/crim-ca/mlm-extension/publish.yaml?style=for-the-badge&logo=github
[bscm7]: https://github.com/crim-ca/mlm-extension/blob/main/.github/workflows/publish.yaml
[bscm2]: https://img.shields.io/github/v/release/stac-extensions/mlm?filter=stac-model-v*&style=for-the-badge&logo=semantic-release&color=347d39
[bscm6]: https://img.shields.io/github/actions/workflow/status/stac-extensions/mlm/publish.yaml?style=for-the-badge&logo=github
[bscm7]: https://github.com/stac-extensions/mlm/blob/main/.github/workflows/publish.yaml

[hub1]: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates#enabling-dependabot-version-updates
[hub2]: https://github.com/marketplace/actions/close-stale-issues
[hub6]: https://docs.github.com/en/code-security/dependabot
[hub8]: https://github.com/crim-ca/mlm-extension/blob/main/.github/release-drafter.yml
[hub9]: https://github.com/crim-ca/mlm-extension/blob/main/.github/.stale.yml
[hub8]: https://github.com/stac-extensions/mlm/blob/main/.github/release-drafter.yml
[hub9]: https://github.com/stac-extensions/mlm/blob/main/.github/.stale.yml

[bdoc1]: https://img.shields.io/badge/docs-github%20pages-0a507a?style=for-the-badge
[bdoc2]: https://github.com/crim-ca/mlm-extension/blob/main/README_STAC_MODEL.md
[bdoc2]: https://github.com/stac-extensions/mlm/blob/main/README_STAC_MODEL.md
4 changes: 2 additions & 2 deletions best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ leading to a new MLM STAC Item definition (see also [STAC Version Extension](#ve
{
"id": "stac-item-model",
"stac_extensions": [
"https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"https://stac-extensions.github.io/mlm/v1.3.0/schema.json",
"https://stac-extensions.github.io/ml-aoi/v0.2.0/schema.json"
],
"assets": {
Expand Down Expand Up @@ -224,7 +224,7 @@ that the model is properly instantiated from the expected weights, or that suffi
```json
{
"stac_extensions": [
"https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"https://stac-extensions.github.io/mlm/v1.3.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_bands_expression.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$comment": "Demonstrate the use of MLM and EO for bands description, with EO bands directly in the Model Asset.",
"stac_version": "1.0.0",
"stac_extensions": [
"https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"https://stac-extensions.github.io/mlm/v1.3.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_basic.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json"
"https://stac-extensions.github.io/mlm/v1.3.0/schema.json"
],
"type": "Feature",
"id": "example-model",
Expand Down
2 changes: 1 addition & 1 deletion examples/item_eo_and_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://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"https://stac-extensions.github.io/mlm/v1.3.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_eo_bands.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$comment": "Demonstrate the use of MLM and EO for bands description, with EO bands directly in the Model Asset.",
"stac_version": "1.0.0",
"stac_extensions": [
"https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"https://stac-extensions.github.io/mlm/v1.3.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_eo_bands_summarized.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$comment": "Demonstrate the use of MLM and EO for bands description, with EO bands summarized in the Item properties and referenced by name in the Model Asset.",
"stac_version": "1.0.0",
"stac_extensions": [
"https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"https://stac-extensions.github.io/mlm/v1.3.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://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"https://stac-extensions.github.io/mlm/v1.3.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://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"https://stac-extensions.github.io/mlm/v1.3.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://crim-ca.github.io/mlm-extension/v1.3.0/schema.json",
"$id": "https://stac-extensions.github.io/mlm/v1.3.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.",
"$comment": "Use 'allOf+if/then' for each 'type' to allow implementations to report more specific messages about the exact case in error (if any). Using only a 'oneOf/allOf' with the 'type' caused any incompatible 'type' to be reported first with a minimal and poorly described error by 'pystac'.",
Expand Down Expand Up @@ -123,7 +123,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json"
"const": "https://stac-extensions.github.io/mlm/v1.3.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://crim-ca.github.io/mlm-extension/v1.3.0/schema.json=./json-schema/schema.json",
"format-examples": "stac-node-validator . --format --schemaMap https://crim-ca.github.io/mlm-extension/v1.3.0/schema.json=./json-schema/schema.json"
"check-examples": "stac-node-validator . --lint --verbose --schemaMap https://stac-extensions.github.io/mlm/v1.3.0/schema.json=./json-schema/schema.json",
"format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/mlm/v1.3.0/schema.json=./json-schema/schema.json"
},
"dependencies": {
"remark-cli": "^8.0.0",
Expand Down
22 changes: 11 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors = [
]
license = "Apache Software License 2.0"
repository = "https://github.com/crim-ca/mlm-extension"
homepage = "https://github.com/crim-ca/mlm-extension/blob/main/README_STAC_MODEL.md"
homepage = "https://github.com/stac-extensions/mlm/blob/main/README_STAC_MODEL.md"
packages = [
{include = "stac_model"}
]
Expand Down Expand Up @@ -94,7 +94,7 @@ bump-my-version = ">=0.21,<0.27"
# Although these definitions are provided in this 'stac-model' project file,
# they are actually intented for versioning the MLM specification itself.
# To version 'stac-model', use the 'poetry version' operations.
# See also https://github.com/crim-ca/mlm-extension/blob/main/CONTRIBUTING.md#building-and-releasing
# See also https://github.com/stac-extensions/mlm/blob/main/CONTRIBUTING.md#building-and-releasing
current_version = "1.3.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
Expand Down Expand Up @@ -125,8 +125,8 @@ glob_exclude = [
"dist/**",
"node_modules/**",
]
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"
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"

[[tool.bumpversion.files]]
glob = "**/*.md"
Expand All @@ -141,8 +141,8 @@ glob_exclude = [
"dist/**",
"node_modules/**",
]
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"
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"

[[tool.bumpversion.files]]
glob = "**/*.py"
Expand All @@ -157,16 +157,16 @@ glob_exclude = [
"dist/**",
"node_modules/**",
]
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"
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"

[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = """
## [Unreleased](https://github.com/crim-ca/mlm-extension/tree/main)
## [Unreleased](https://github.com/stac-extensions/mlm/tree/main)
"""
replace = """
## [Unreleased](https://github.com/crim-ca/mlm-extension/tree/main)
## [Unreleased](https://github.com/stac-extensions/mlm/tree/main)
### Added
- n/a
Expand All @@ -183,7 +183,7 @@ replace = """
### Fixed
- n/a
## [v{new_version}](https://github.com/crim-ca/mlm-extension/tree/v{new_version})
## [v{new_version}](https://github.com/stac-extensions/mlm/tree/v{new_version})
"""

[tool.ruff]
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://crim-ca.github.io/mlm-extension/v1.3.0/schema.json"
SCHEMA_URI: str = "https://stac-extensions.github.io/mlm/v1.3.0/schema.json"
PREFIX = f"{get_args(SchemaName)[0]}:"


Expand Down

0 comments on commit 936d361

Please sign in to comment.