Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6b9b91

Browse files
committed
v1.1.0 (implements #6, #7, #8)
2 parents 4c9f05d + f91ce6b commit f6b9b91

File tree

5 files changed

+81
-24
lines changed

5 files changed

+81
-24
lines changed

.github/remark.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ plugins:
2121
- 'fenced'
2222
# Headings
2323
- remark-lint-heading-increment
24-
- remark-lint-no-duplicate-headings
2524
- remark-lint-no-multiple-toplevel-headings
2625
- remark-lint-no-heading-punctuation
2726
- - remark-lint-maximum-heading-length

.github/workflows/test.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ on: [push, pull_request]
33
jobs:
44
deploy:
55
runs-on: ubuntu-latest
6-
strategy:
7-
matrix:
8-
node-version: [14.x]
96
steps:
10-
- uses: actions/setup-node@v1
7+
- uses: actions/setup-node@v2
8+
with:
9+
node-version: 'lts/*'
1110
- uses: actions/checkout@v2
1211
- run: |
1312
npm install
14-
npm test
13+
npm test

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
- Allow usage in Catalogs.
1414
- Explicitly support usage in assets.
15+
- New relation type `version-history`
1516

1617
### Changed
1718

1819
- The `version` field is not required any longer.
1920

20-
## [v1.0.0]
21+
### Fixed
2122

22-
- First release
23+
- Clarify usage of the relation types and how often they can be used per document.
24+
25+
## [v1.0.0] - 2021-03-08
26+
27+
- Initial independent release, see [previous history](https://github.com/radiantearth/stac-spec/commits/v1.0.0-rc.1/extensions/version)
2328

2429
[Unreleased]: <https://github.com/stac-extensions/version/compare/v1.1.0...HEAD>
2530
[v1.1.0]: <https://github.com/stac-extensions/version/compare/v1.0.0...v1.1.0>

README.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
- **Scope:** Item, Collection
77
- **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Proposal
88
- **Owner**: @m-mohr
9-
- **History**: [Prior to March 2, 2021](https://github.com/radiantearth/stac-spec/commits/v1.0.0-rc.1/extensions/version)
9+
10+
This document explains the Versioning Indicators Extension to the
11+
[SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification.
1012

1113
This extension allows to version STAC Collections and STAC Items. Therefore, it also allows to deprecate legacy versions.
1214
Only fields and possible link relation types are defined in this extension,
@@ -33,6 +35,11 @@ The fields in the table below can be used in these parts of STAC documents:
3335
| version | string | Version of the context this fields is used in (e.g. Asset or Collection). |
3436
| deprecated | boolean | Specifies that the context this field is used in (e.g. Asset or Collection) is deprecated with the potential to be removed. Defaults to `false`. It should be transitioned out of usage as soon as possible and users should refrain from using it in new projects. A link with relation type `latest-version` SHOULD be added to the links and MUST refer to the resource that can be used instead. |
3537

38+
These fields have different meaning depending on where they are used. When used as an Item properties or top-level Collection field, they refer to
39+
the version or deprecation of all data referenced in the Item or Collection, which may include the metadata itself.
40+
When used in an Asset Object, they refer to the version or deprecation
41+
of the particular data asset linked to in the Asset Object.
42+
3643
## Relation types
3744

3845
The following types should be used as applicable `rel` types for the
@@ -42,6 +49,38 @@ These are all following [RFC 5829](https://tools.ietf.org/html/rfc5829).
4249

4350
| Type | Description |
4451
| ------------------- | ----------- |
45-
| latest-version | This link points to a resource containing the latest (e.g., current) version. |
46-
| predecessor-version | This link points to a resource containing the predecessor version in the version history. |
47-
| successor-version | This link points to a resource containing the successor version in the version history. |
52+
| latest-version | This link points to a STAC resource containing the latest (e.g., current) version. A maximum of one link can use this relation type per STAC resource. |
53+
| predecessor-version | One or multiple links can point to STAC resources that are predecessor versions in the version history. |
54+
| successor-version | One or multiple links can point to STAC resources that are successor versions in the version history. |
55+
| version-history | This link points to a version history or changelog. This can be for example a Markdown file with the corresponding media type or a STAC Catalog or Collection. |
56+
57+
## Contributing
58+
59+
All contributions are subject to the
60+
[STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md).
61+
For contributions, please follow the
62+
[STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions
63+
for running tests are copied here for convenience.
64+
65+
### Running tests
66+
67+
The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid.
68+
To run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/).
69+
70+
First you'll need to install everything with npm once. Just navigate to the root of this repository and on
71+
your command line run:
72+
```bash
73+
npm install
74+
```
75+
76+
Then to check markdown formatting and test the examples against the JSON schema, you can run:
77+
```bash
78+
npm test
79+
```
80+
81+
This will spit out the same texts that you see online, and you can then go and fix your markdown or examples.
82+
83+
If the tests reveal formatting problems with the examples, you can fix them with:
84+
```bash
85+
npm run format-examples
86+
```

json-schema/schema.json

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
{
88
"$comment": "This is the schema for STAC Items.",
99
"allOf": [
10+
{
11+
"$ref": "#/definitions/stac_extensions"
12+
},
1013
{
1114
"type": "object",
1215
"required": [
@@ -28,43 +31,55 @@
2831
}
2932
}
3033
}
31-
},
32-
{
33-
"$ref": "#/definitions/stac_extensions"
3434
}
3535
]
3636
},
3737
{
3838
"$comment": "This is the schema for STAC Collections.",
39+
"type": "object",
3940
"allOf": [
4041
{
41-
"type": "object",
4242
"required": [
4343
"type"
4444
],
4545
"properties": {
4646
"type": {
4747
"const": "Collection"
48-
},
48+
}
49+
}
50+
},
51+
{
52+
"$ref": "#/definitions/stac_extensions"
53+
},
54+
{
55+
"$comment": "This is the schema for the top-level fields in a Collection.",
56+
"allOf": [
57+
{
58+
"$ref": "#/definitions/fields"
59+
}
60+
]
61+
},
62+
{
63+
"$comment": "This validates the fields in Collection Assets.",
64+
"properties": {
4965
"assets": {
5066
"type": "object",
5167
"additionalProperties": {
5268
"$ref": "#/definitions/fields"
5369
}
54-
},
70+
}
71+
}
72+
},
73+
{
74+
"$comment": "This is the schema for the fields in Item Asset Definitions.",
75+
"properties": {
5576
"item_assets": {
5677
"type": "object",
5778
"additionalProperties": {
5879
"$ref": "#/definitions/fields"
5980
}
6081
}
6182
}
62-
},
63-
{
64-
"$ref": "#/definitions/stac_extensions"
65-
},
66-
{
67-
"$ref": "#/definitions/fields"
6883
}
6984
]
7085
},

0 commit comments

Comments
 (0)