Skip to content

Commit

Permalink
Merge pull request #16 from crim-ca/stac-model-release
Browse files Browse the repository at this point in the history
stac-model release workflow, new stac-model-release, align release on pypi and in .toml
  • Loading branch information
rbavery authored May 7, 2024
2 parents 082aa7c + 089791b commit ce80140
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 193 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/greetings.yml

This file was deleted.

21 changes: 18 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Publish JSON Schema
name: Publish JSON Schema or stac-model package via Github Release
on:
release:
types: [published]
jobs:
deploy:
deploy-schema:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Inject env variables
Expand All @@ -14,4 +15,18 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: json-schema
destination_dir: ${{ env.GITHUB_REF_SLUG }}
destination_dir: ${{ env.GITHUB_REF_SLUG }}
publish-pypi:
if: startsWith(github.ref, 'refs/tags/stac-model-v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.10
- name: Install poetry
run: make poetry-install
- name: Build and publish
run: |
make publish
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
the [Item Assets](https://github.com/stac-extensions/item-assets) extension, as mentioned this specification.

### Changed
- n/a
- Adds a job to publish.yaml to publish the stac-model package

### Deprecated
- n/a

### Removed
- Field `mlm:name` requirement to be unique. There is no way to guarantee this from a single Item's definition
and their JSON schema validation. For uniqueness requirement, users should instead rely on the `id` property
and their JSON schema validation. For uniqueness requirement, users should instead rely on the `id` property
of the Item, which is ensured to be unique under the corresponding Collection, since it would not be retrievable
otherwise (i.e.: `collections/{collectionID}/items/{itemID}`).

### Fixed
- Fix the validation strategy of the `mlm:model` role required by at least one Asset under a STAC Item.
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)

Expand Down Expand Up @@ -69,7 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `disk_size` replaced by `file:size` (see [Best Practices - File Extension](best-practices.md#file-extension))
- `memory_size` under `dlm:architecture` moved directly under Item properties as `mlm:memory_size`
- replaced all hardware/accelerator/runtime definitions into distinct `mlm` fields directly under the
STAC Item properties (top-level, not nested) to allow better search support by STAC API.
STAC Item properties (top-level, not nested) to allow better search support by STAC API.
- reorganized `dlm:architecture` nested fields to exist at the top level of properties as `mlm:name`, `mlm:summary`
and so on to provide STAC API search capabilities.
- replaced `normalization:mean`, etc. with [statistics](./README.md#bands-and-statistics) from STAC 1.1 common metadata
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
make poetry-install
```

> This installs Poetry as a [standalone application][poetry-install].
> This installs Poetry as a [standalone application][poetry-install].
> If you prefer, you can simply install it inside your virtual environment.
2. Initialize project dependencies with poetry and install `pre-commit` hooks:
Expand All @@ -24,7 +24,7 @@ To activate your `virtualenv` run `poetry shell`.

Want to know more about Poetry? Check [its documentation][poetry-docs].

Poetry's [commands][poetry-cli] let you easily make descriptive python environments
Poetry's [commands][poetry-cli] let you easily make descriptive python environments
and run commands in those environments, like:

- `poetry add numpy@latest`
Expand All @@ -51,7 +51,7 @@ make test
git checkout -b your-branch
git add .
git commit -m ":tada: Initial commit"
git remote add origin https://github.com/your-fork/stac-model.git
git remote add origin https://github.com/your-fork/mlm-extension.git
git push -u origin your-branch
```

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ poetry-plugins:
poetry-env:
poetry config virtualenvs.in-project true

.PHONY: publish
publish:
poetry publish --build

#* Installation
.PHONY: install
install: poetry-env
Expand Down
Loading

0 comments on commit ce80140

Please sign in to comment.