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

stac-model release workflow, new stac-model-release, align release on pypi and in .toml #16

Merged
merged 8 commits into from
May 7, 2024
Merged
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
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
Loading