Skip to content

Commit

Permalink
Merge branch 'release/0.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed May 25, 2021
2 parents a0b7d7b + 57a06e3 commit e43b88e
Show file tree
Hide file tree
Showing 48 changed files with 4,600 additions and 563 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,43 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '2.1.x', '3.1.x', '5.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' #${{ matrix.dotnet-version }}
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: dotnet restore src
- name: Build
run: dotnet build src --configuration Release --no-restore
tests:
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '2.1.x', '3.1.x', '5.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: dotnet restore src
- name: Test
run: dotnet test --collect:"XPlat Code Coverage" --settings:src/DotNetStac.Test/coverlet.runsettings --results-directory:TestResults src
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
directory: TestResults
fail_ci_if_error: true # optional (default = false)
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
- uses: nikeee/docfx-action@v1.0.0
name: Build Documentation
with:
args: docs/docfx.json
flags: unittests
name: ${{ matrix.platform }}-${{ matrix.dotnet-version }}
- name: Upload test results
uses: actions/upload-artifact@v2
with:
Expand Down
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [v0.9.0]

### Added

- More tests

### Fixed

- Eo Band Common Name nullable

### Changed

- Common Metadata as properties in Stac Objects

### Removed

- Common metadata class helper

## [v0.8.1]

### Added
Expand Down Expand Up @@ -71,8 +89,9 @@ At the moment of this release, the STAC specification is 1.0.0-rc.4 and minor ch

- Cloned assets

[Unreleased]: <https://github.com/Terradue/DotnetStac/compare/0.8.1...HEAD>
[v0.8.0]: <https://github.com/Terradue/DotnetStac/tree/0.8.1>
[Unreleased]: <https://github.com/Terradue/DotnetStac/compare/0.9.0...HEAD>
[v0.9.0]: <https://github.com/Terradue/DotnetStac/tree/0.9.0>
[v0.8.1]: <https://github.com/Terradue/DotnetStac/tree/0.8.1>
[v0.8.0]: <https://github.com/Terradue/DotnetStac/tree/0.8.0>
[v0.7.0]: <https://github.com/Terradue/DotnetStac/tree/0.7.0>
[v0.6.2]: <https://github.com/Terradue/DotnetStac/tree/0.6.2>
47 changes: 43 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[![codecov](https://codecov.io/gh/Terradue/DotNetStac/branch/master/graph/badge.svg)](https://codecov.io/gh/Terradue/DotNetStac)
[![Gitter](https://img.shields.io/gitter/room/SpatioTemporal-Asset-Catalog/Lobby?color=yellow)](https://gitter.im/SpatioTemporal-Asset-Catalog/Lobby)
[![License](https://img.shields.io/badge/license-AGPL3-blue.svg)](LICENSE)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Terradue/DotNetStac/develop?filepath=example.ipynb)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Terradue/DotNetStac/master?filepath=example.ipynb)

</h3>

Expand All @@ -39,14 +39,53 @@ In a nutshell, the library allows serialization/desrialization of STAC JSON docu

* (De)Serialization engine fully compliant with current version of [STAC specifications](https://stacspec.org)
* Many helpers to support STAC objects manipulation:
* Field accessors using class properties (e.g. Title, DateTime, Geometry)
* Field accessors using class properties and common metadata (e.g. Title, DateTime, Geometry)
* Collection creation helper summarizing Items set
* STAC extensions support with C# extension classes with direct accessors to the fields.
* JSON Schema validation using [Json.NET Schema](https://github.com/JamesNK/Newtonsoft.Json.Schema)
* STAC extensions support with C# extension classes with direct accessors to the fields:
* [Electro-Optical](https://github.com/stac-extensions/eo) with `Common Band Name` enumeration
* [File Info](https://github.com/stac-extensions/file) with helpers to calculate [multihash](https://github.com/multiformats/cs-multihash) checksum
* [Processing](https://github.com/stac-extensions/processing)
* [Projection](https://github.com/stac-extensions/projection) with helpers to set `epsg` id and `wkt2` representation from [Proj.Net Coordinate Systems](https://github.com/NetTopologySuite/ProjNet4GeoAPI)
* [Raster](https://github.com/stac-extensions/raster)
* [SAR](https://github.com/stac-extensions/sar) with helpers for interferometric searches
* [Satellite](https://github.com/stac-extensions/sat) with extra orbit state vector and baseline calculation
* [Scientific Citation](https://github.com/stac-extensions/scientific)
* [View Geometry](https://github.com/stac-extensions/view)

## Getting Started

A [dedicated notebook](notebooks/example.ipynb) is available to get started. If you want to play directly with the notebook, you can [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Terradue/DotNetStac/develop?filepath=example.ipynb)
### Install package

```console
$ dotnet add package DotNetStac
```

### Deserialize and validate your first catalog

```csharp
using Stac;
using Stac.Schemas;
using System;
using System.Net;
using Newtonsoft.Json.Schema;

var webc = new WebClient();
Uri catalogUri = new Uri("https://raw.githubusercontent.com/radiantearth/stac-spec/master/examples/catalog.json");
StacValidator stacValidator = new StacValidator(new JSchemaUrlResolver());

// StacConvert.Deserialize is the helper to start loading any STAC document
var json = webc.DownloadString(catalogUri);
bool valid = stacValidator.ValidateJson(json);
StacCatalog catalog = StacConvert.Deserialize<StacCatalog>(json);

Console.Out.WriteLine(catalog.Id + ": " + catalog.Description + (valid ? " [VALID]" : "[INVALID]"));
Console.Out.WriteLine(catalog.StacVersion);
```

### Learn more

A [dedicated notebook](notebooks/example.ipynb) is available to get started with all DotNetStac features. If you want to play directly with the notebook, you can [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Terradue/DotNetStac/develop?filepath=example.ipynb)

## Documentation

Expand Down
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
target: auto
threshold: 0%
flags:
- unittests
Loading

0 comments on commit e43b88e

Please sign in to comment.