Skip to content

Commit dbc4d4f

Browse files
Update Core to 2.21 (#397)
* Regenerate bindings for 2.21. * Expose WKB and WKT data types. * Support specifying custom GitHub organizations in the MSBuild scripts. This will be useful for test releases on forks. * Simplify specifying the Core version to use. * Update tests for ls recursive * Bump versions --------- Co-authored-by: Shaun Reed <shaunrd0@gmail.com>
1 parent 901860c commit dbc4d4f

File tree

9 files changed

+42
-20
lines changed

9 files changed

+42
-20
lines changed

.github/workflows/nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- os: windows-latest
2828
platform: windows-x86_64
2929
- tag: dev
30-
tag: [release-2.20, dev]
30+
tag: [release-2.21, dev]
3131
runs-on: ${{ matrix.os }}
3232
steps:
3333
- name: Checkout TileDB
@@ -72,7 +72,7 @@ jobs:
7272
strategy:
7373
fail-fast: false
7474
matrix:
75-
tag: [release-2.20, dev]
75+
tag: [release-2.21, dev]
7676
runs-on: ubuntu-latest
7777
steps:
7878
- name: Checkout TileDB-CSharp
@@ -113,7 +113,7 @@ jobs:
113113
fail-fast: false
114114
matrix:
115115
os: [ubuntu-latest, macos-latest, windows-latest]
116-
tag: [release-2.20, dev]
116+
tag: [release-2.21, dev]
117117
runs-on: ${{ matrix.os }}
118118
steps:
119119
- name: Checkout TileDB-CSharp

Directory.Packages.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
<TileDBNativePackageName>TileDB.Native</TileDBNativePackageName>
5-
<TileDBNativePackageVersion>[2.20.0,2.21.0)</TileDBNativePackageVersion>
5+
<TileDBNativeVersionMajor>2</TileDBNativeVersionMajor>
6+
<TileDBNativeVersionMinor>21</TileDBNativeVersionMinor>
7+
<TileDBNativePackageVersion>[$(TileDBNativeVersionMajor).$(TileDBNativeVersionMinor).0,$(TileDBNativeVersionMajor).$([MSBuild]::Add($(TileDBNativeVersionMinor), 1)).0)</TileDBNativePackageVersion>
68

79
<!-- The DevelopmentBuild property switches to the locally built native packages.
810
They have a different name to avoid publishing them by mistake, and to

scripts/generate-bindings/GenerateBindings.proj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<InputDir>$(TempDir)/download/include</InputDir>
1010
<RspFile>$(TempDir)/generate.rsp</RspFile>
1111
<AccessSpecifier>%2A=internal</AccessSpecifier>
12+
<GitHubOrganization>TileDB-Inc</GitHubOrganization>
1213
</PropertyGroup>
1314

1415
<ItemGroup>
@@ -69,7 +70,7 @@
6970
Text="Version and VersionTag must be specified." />
7071

7172
<PropertyGroup>
72-
<DownloadUrl>https://github.com/TileDB-Inc/TileDB/releases/download/$(Version)/TileDB-windows-x86_64-$(Version)-$(VersionTag).zip</DownloadUrl>
73+
<DownloadUrl>https://github.com/$(GitHubOrganization)/TileDB/releases/download/$(Version)/TileDB-windows-x86_64-$(Version)-$(VersionTag).zip</DownloadUrl>
7374
<ExtractDir>$(TempDir)/download</ExtractDir>
7475
</PropertyGroup>
7576
<DownloadFile

scripts/nuget/GenerateNuGetPackages.proj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<RuntimeJson>$(TempDir)/runtime.json</RuntimeJson>
66
<MetapackageProject>./TileDB.Native.proj</MetapackageProject>
77
<NativePackageTemplateProject>./TileDB.Native.runtime.template.proj</NativePackageTemplateProject>
8+
<GitHubOrganization>TileDB-Inc</GitHubOrganization>
89
</PropertyGroup>
910

1011
<PropertyGroup Condition="$(DevelopmentBuild) == true">
@@ -47,7 +48,7 @@
4748
Text="Version and VersionTag must be specified." />
4849

4950
<PropertyGroup>
50-
<DownloadUrl>https://github.com/TileDB-Inc/TileDB/releases/download/$(Version)/TileDB-%(NativePlatform.Identity)-$(Version)-$(VersionTag).%(NativePlatform.ArchiveExtension)</DownloadUrl>
51+
<DownloadUrl>https://github.com/$(GitHubOrganization)/TileDB/releases/download/$(Version)/TileDB-%(NativePlatform.Identity)-$(Version)-$(VersionTag).%(NativePlatform.ArchiveExtension)</DownloadUrl>
5152
<ExtractDir>$(TempDir)/%(NativePlatform.Identity)</ExtractDir>
5253
</PropertyGroup>
5354
<DownloadFile

sources/TileDB.CSharp/Enums.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,23 @@ public enum DataType : uint
502502
/// On generic methods operating to objects of this datatype,
503503
/// this datatype can be used with <see cref="byte"/> or <see cref="bool"/>.
504504
/// </remarks>
505-
Boolean = tiledb_datatype_t.TILEDB_BOOL
505+
Boolean = tiledb_datatype_t.TILEDB_BOOL,
506+
/// <summary>
507+
/// A geometry in Well-Known Binary (WKB) format.
508+
/// </summary>
509+
/// <remarks>
510+
/// On generic methods operating to objects of this datatype,
511+
/// this datatype can be used with <see cref="byte"/>.
512+
/// </remarks>
513+
GeometryWkb = tiledb_datatype_t.TILEDB_GEOM_WKB,
514+
/// <summary>
515+
/// A geometry in Well-Known Text (WKT) format.
516+
/// </summary>
517+
/// <remarks>
518+
/// On generic methods operating to objects of this datatype,
519+
/// this datatype can be used with <see cref="byte"/>.
520+
/// </remarks>
521+
GeometryWkt = tiledb_datatype_t.TILEDB_GEOM_WKT
506522
}
507523

508524
/// <summary>
@@ -1315,6 +1331,9 @@ internal static Type DataTypeToNumericType(DataType datatype)
13151331
return typeof(byte);
13161332
case DataType.Boolean:
13171333
return typeof(byte);
1334+
case DataType.GeometryWkb:
1335+
case DataType.GeometryWkt:
1336+
return typeof(byte);
13181337
default:
13191338
return typeof(byte);
13201339
}

sources/TileDB.CSharp/Interop/tiledb_datatype_t.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@ public enum tiledb_datatype_t
5252
TILEDB_TIME_AS = 39,
5353
TILEDB_BLOB = 40,
5454
TILEDB_BOOL = 41,
55+
TILEDB_GEOM_WKB = 42,
56+
TILEDB_GEOM_WKT = 43,
5557
}
5658
}

sources/TileDB.CSharp/TileDB.CSharp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<Nullable>enable</Nullable>
88
<RootNamespace>TileDB.CSharp</RootNamespace>
9-
<Version>5.10.0</Version>
9+
<Version>5.11.0</Version>
1010
<Description>C# wrapper of the TileDB Embedded universal data engine.</Description>
1111
<PackageReadmeFile>README.md</PackageReadmeFile>
1212
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1313
<EnablePackageValidation>true</EnablePackageValidation>
14-
<PackageValidationBaselineVersion>5.9.0</PackageValidationBaselineVersion>
14+
<PackageValidationBaselineVersion>5.10.0</PackageValidationBaselineVersion>
1515
<NoWarn>$(NoWarn);TILEDB0012;TILEDB0013;TILEDB0014</NoWarn>
1616
</PropertyGroup>
1717

sources/TileDB.CSharp/VFS.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ public void VisitChildren<T>(string uri, Func<string, T, bool> callback, T callb
439439
/// <param name="callbackArg">An argument that will be passed to <paramref name="callback"/>.</param>
440440
/// <typeparam name="T">The type of <paramref name="callbackArg"/>.</typeparam>
441441
/// <remarks>
442-
/// This operation is supported only on URIs to AWS S3.
442+
/// This operation is supported only on local filesystem and AWS S3 URIs.
443443
/// </remarks>
444444
public void VisitChildrenRecursive<T>(string uri, Func<string, ulong, T, bool> callback, T callbackArg)
445445
{

tests/TileDB.CSharp.Test/VFSTest.cs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,23 @@ public void TestVisitPropagatesExceptions()
157157
[TestMethod]
158158
public void TestVisitRecursive()
159159
{
160-
Assert.Inconclusive("VisitChildrenRecursive is currently supported only on S3.");
161-
162160
using var dir = new TemporaryDirectory("vfs-visit");
163161

164162
using var vfs = new VFS();
163+
vfs.CreateDir(Path.Combine(dir, "dir1"));
165164
vfs.Touch(Path.Combine(dir, "dir1/file1"));
165+
vfs.CreateDir(Path.Combine(dir, "dir2"));
166166
vfs.Touch(Path.Combine(dir, "dir2/file2"));
167-
vfs.Touch(Path.Combine(dir, "dir3/file3"));
167+
vfs.CreateDir(Path.Combine(dir, "dir3"));
168+
System.IO.File.WriteAllBytes(Path.Combine(dir, "dir3/file3"), "12345"u8.ToArray());
168169

169170
int i = 0;
170171

171172
vfs.VisitChildrenRecursive(dir, (uri, size, arg) =>
172173
{
173174
string path = new Uri(uri).LocalPath;
174-
Assert.IsTrue(System.IO.File.Exists(path));
175-
Assert.AreEqual((string)dir, Path.GetDirectoryName(path));
176-
Assert.AreEqual(0ul, size);
175+
Assert.IsTrue(Directory.Exists(path) || System.IO.File.Exists(path));
176+
Assert.AreEqual(path.EndsWith("file3") ? 5ul : 0ul, size);
177177
Assert.AreEqual(555, arg);
178178

179179
i++;
@@ -186,16 +186,13 @@ public void TestVisitRecursive()
186186
[TestMethod]
187187
public void TestVisitRecursivePropagatesExceptions()
188188
{
189-
Assert.Inconclusive("VisitChildrenRecursive is currently supported only on S3.");
190-
191189
using var dir = new TemporaryDirectory("vfs-visit-exceptions");
192190

193191
const string ExceptionKey = "foo";
194192

195193
using var vfs = new VFS();
194+
vfs.CreateDir(Path.Combine(dir, "dir1"));
196195
vfs.Touch(Path.Combine(dir, "dir1/file1"));
197-
vfs.Touch(Path.Combine(dir, "dir2/file2"));
198-
vfs.Touch(Path.Combine(dir, "dir3/file3"));
199196

200197
int i = 0;
201198

0 commit comments

Comments
 (0)