Skip to content

Commit

Permalink
Merge branch 'release/1.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Oct 28, 2022
2 parents a64c860 + 93faa9d commit 91f63a6
Show file tree
Hide file tree
Showing 13 changed files with 2,555 additions and 5 deletions.
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [1.6.0](https://github.com/Terradue/DotNetStac/compare/1.5.0...1.6.0)
## [1.6.1](https://github.com/Terradue/DotNetStac/compare/1.6.0...1.6.1)

add datacube extension support
Added patching function for Stac Objects (RFC 7386)

### Merged

- Added patching function for Stac Objects (RFC 7386) [`#18`](https://github.com/Terradue/DotNetStac/pull/18)

### Commits

- liniting code [`9338969`](https://github.com/Terradue/DotNetStac/commit/9338969117132ad8fd8eb562f43da4e96a849a6a)
- fix error IDE0038 [`01ff3ed`](https://github.com/Terradue/DotNetStac/commit/01ff3ede7d3c8726d8dc6005d80d52a6574edb69)
- tests fixed [`1bd1dd8`](https://github.com/Terradue/DotNetStac/commit/1bd1dd8f62c71371c1f9f5962ecd88a800a4d790)

## [1.6.0](https://github.com/Terradue/DotNetStac/compare/1.5.0...1.6.0) - 2022-10-27

### Merged

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

<h3 align="center">

![Build Status](https://github.com/Terradue/DotNetStac/actions/workflows/build.yaml/badge.svg?branch=release/1.6.0)
![Build Status](https://github.com/Terradue/DotNetStac/actions/workflows/build.yaml/badge.svg?branch=release/1.6.1)
[![NuGet](https://img.shields.io/nuget/vpre/DotNetStac)](https://www.nuget.org/packages/DotNetStac/)
[![codecov](https://codecov.io/gh/Terradue/DotNetStac/branch/release/1.6.0/graph/badge.svg)](https://codecov.io/gh/Terradue/DotNetStac)
[![codecov](https://codecov.io/gh/Terradue/DotNetStac/branch/release/1.6.1/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/master?filepath=example.ipynb)
Expand Down
36 changes: 36 additions & 0 deletions src/DotNetStac.Test/Common/PatchHelpersTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Collections.Generic;
using GeoJSON.Net.Geometry;
using Newtonsoft.Json;
using Stac.Collection;
using Stac.Common;
using Xunit;

namespace Stac.Test.Item
{
public class PatchHelpersTests : TestBase
{
[Fact]
public void PatchStacItemTest()
{
StacItem baseItem = StacConvert.Deserialize<StacItem>(GetJson("Common", "BaseItem"));

StacItem patchItem = StacConvert.Deserialize<StacItem>(GetJson("Common", "Patch"));

StacItem patchedItem = baseItem.Patch<StacItem>(patchItem);

JsonAssert.AreEqual(GetJson("Common", "PatchedItem"), StacConvert.Serialize(patchedItem));
}

[Fact]
public void PatchStacItemTest2()
{
StacItem baseItem = StacConvert.Deserialize<StacItem>(GetJson("Common", "BaseItem"));

Patch patchItem = JsonConvert.DeserializeObject<Patch>(GetJson("Common", "Patch2"));

StacItem patchedItem = baseItem.Patch<StacItem>(patchItem);

JsonAssert.AreEqual(GetJson("Common", "PatchedItem2"), StacConvert.Serialize(patchedItem));
}
}
}
Loading

0 comments on commit 91f63a6

Please sign in to comment.