Skip to content

Commit

Permalink
Merge branch 'main' into dimension-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Oct 16, 2023
2 parents c738153 + 7ca45f8 commit f4bae0f
Show file tree
Hide file tree
Showing 78 changed files with 1,556 additions and 367 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"clangsharppinvokegenerator": {
"version": "15.0.2",
"version": "16.0.0",
"commands": [
"ClangSharpPInvokeGenerator"
]
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Nightly-Build

env:
TILEDB_NIGHTLY_BUILD: 1
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'

on:
schedule:
Expand All @@ -19,23 +20,29 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- BOOTSTRAP: ../bootstrap --enable-s3 --enable-serialization --force-build-all-deps
- BOOTSTRAP: ../bootstrap --enable-s3 --enable-serialization --force-build-all-deps --enable-vcpkg
- os: ubuntu-latest
platform: linux-x86_64
- os: macos-latest
platform: macos-x86_64
- os: windows-latest
platform: windows-x86_64
BOOTSTRAP: ../bootstrap.ps1 -EnableS3 -EnableSerialization -EnableBuildDeps
tag: [release-2.15, dev]
BOOTSTRAP: ../bootstrap.ps1 -EnableS3 -EnableSerialization -EnableBuildDeps -EnableVcpkg
- tag: dev
tag: [release-2.17, dev]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout TileDB
uses: actions/checkout@v3
with:
repository: TileDB-Inc/TileDB
ref: ${{ matrix.tag }}

- name: Export GitHub Actions cache variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Build TileDB
run: |
mkdir -p build
Expand All @@ -45,21 +52,22 @@ jobs:
cmake --build . --config Release --target install-tiledb
cd ../
mkdir -p artifacts/${{ matrix.platform }}
mv dist/* artifacts/${{ matrix.platform }}
mv build/dist/* artifacts/${{ matrix.platform }}
# We combine the binaries of the many platforms per tag by uploading them to the same artifact.
- name: Upload native artifacts
uses: actions/upload-artifact@v3
with:
name: tiledb-native-${{ matrix.tag }}
path: artifacts/
retention-days: 1

Pack-NuGet:
needs: Build-Native
strategy:
fail-fast: false
matrix:
tag: [release-2.15, dev]
tag: [release-2.17, dev]
runs-on: ubuntu-latest
steps:
- name: Checkout TileDB-CSharp
Expand Down Expand Up @@ -91,14 +99,15 @@ jobs:
with:
name: tiledb-nuget-${{ matrix.tag }}
path: scripts/nuget/packages/
retention-days: 5

Test-NuGet:
needs: Pack-NuGet
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
tag: [release-2.15, dev]
tag: [release-2.17, dev]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout TileDB-CSharp
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/tiledb-csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,35 @@ name: CI

on:
push:
branches: [ main ]
branches: [ main, 'release/*' ]
pull_request:
branches: [ main ]
branches: [ main, 'release/*' ]
workflow_dispatch:
workflow_call:

jobs:
Validate-Package:
runs-on: ubuntu-latest
steps:
# Checks out repository
- uses: actions/checkout@v3

- name: Remove existing .NET versions
shell: bash
run: |
rm -rf $DOTNET_ROOT
- name: Set up .NET SDK from global.json
uses: actions/setup-dotnet@v3

- name: Display .NET versions
run: dotnet --info

# Package validation runs as part of packing.
- name: Dotnet pack for TileDB.CSharp
run: |
dotnet pack -c Release sources/TileDB.CSharp
Run-Tests:
strategy:
fail-fast: false
Expand Down
14 changes: 7 additions & 7 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<TileDBNativePackageName>TileDB.Native</TileDBNativePackageName>
<TileDBNativePackageVersion>[2.15.0,2.16.0)</TileDBNativePackageVersion>
<TileDBNativePackageVersion>[2.17.0,2.18.0)</TileDBNativePackageVersion>

<!-- The DevelopmentBuild property switches to the locally built native packages.
They have a different name to avoid publishing them by mistake, and to
Expand All @@ -25,12 +25,12 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="$(TileDBNativePackageName)" Version="$(TileDBNativePackageVersion)" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageVersion Include="MSTest.TestFramework" Version="3.0.2" />
<PackageVersion Include="coverlet.collector" Version="3.2.0" PrivateAssets="all" />
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="8.51.0.59060" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.0.4" />
<PackageVersion Include="MSTest.TestFramework" Version="3.0.4" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" PrivateAssets="all" />
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="9.3.0.71466" />
<GlobalPackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1" />
</ItemGroup>
</Project>
20 changes: 20 additions & 0 deletions docs/obsoletions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Following [the deprecation policy of TileDB Embedded][core-deprecation], obsolet
|Diagnostic codes|Deprecated in version|Removed in version|
|----------------|---------------------|------------------|
|[`TILEDB0001`](#TILEDB0001)[`TILEDB0011`](#TILEDB0011)|5.3.0|5.5.0|
|[`TILEDB0012`](#TILEDB0012)[`TILEDB0012`](#TILEDB0012)|5.7.0|5.9.0|

## `TILEDB0001` - Enum value names that start with `TILEDB_` were replaced with C#-friendly names.

Expand Down Expand Up @@ -299,4 +300,23 @@ Some of these methods were renamed or had their signature changed (for example t

Instead of setting ranges and subarrays on the `Query`, create and configure a `Subarray` object, and assign it to the query using the `Query.SetSubarray` method.

## `TILEDB0012` - Members of the `TileDB.Interop` namespace will become internal in a future version and should not be used by user code.

<a name="TILEDB0012"></a>

Some APIs in the `TileDB.Interop` namespace that were inadvertently removed in version 5.3.0 were reintroduced in version 5.7.0. They are marked as obsolete and hidden from IntelliSense and will be removed from the public API for good in version 5.9.0. They were also reintroduced in patch releases 5.3.1 and 5.4.1, obsoleted under the [`TILEDB0003`](#TILEDB0003) code.

### Version introduced

5.7.0

### Recommended action

The obsoleted APIs fall into the following categories:

- The `MarshaledString` and `MarshaledStringOut` types are used to help convert strings from and to ASCII and pass them to native code. If you are using them in user code for native code interop, you should use .NET's [built-in P/Invoke](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/charset) marshaling instead. For other kinds of encoding conversions, you should use APIs from the [`System.Text.Encoding`](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding) class.
- The `__sFile` and `LibC` types have no members and there is no reason to use them anyway.
- The types that derive from `SafeHandle` are used to safely manage the lifetime of native TileDB objects. With the APIs in the `TileDB.CSharp` namespace providing broad coverage of TileDB's functionalities while also being safer and easier to sue, these types provide limited utility. You should use the APIs in the `TileDB.CSharp` namespace instead.
- Types with the name `tiledb_***_t` were made public again only to support the APIs of the safe handles above. They have little other use on their own. You should use APIs in the `TileDB.CSharp` namespace instead.

[core-deprecation]: https://github.com/TileDB-Inc/TileDB/blob/dev/doc/policy/api_changes.md
4 changes: 2 additions & 2 deletions examples/TileDB.CSharp.Example/ExampleIncompleteQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ from b in Enumerable.Range(1, 10)
{
arrayWrite.Open(QueryType.Write);

var queryWrite = new Query(Ctx, arrayWrite);
var queryWrite = new Query(arrayWrite);
queryWrite.SetLayout(LayoutType.Unordered);
queryWrite.SetDataBuffer("rows", rowsData);
queryWrite.SetDataBuffer("cols", colsData);
Expand All @@ -73,7 +73,7 @@ private static void ReadArray()
using (var arrayRead = new Array(Ctx, ArrayPath))
{
arrayRead.Open(QueryType.Read);
var queryRead = new Query(Ctx, arrayRead);
var queryRead = new Query(arrayRead);
queryRead.SetLayout(LayoutType.Unordered);

queryRead.SetDataBuffer("rows", rowsRead);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private static void WriteArray()
{
arrayWrite.Open(QueryType.Write);

var queryWrite = new Query(Ctx, arrayWrite);
var queryWrite = new Query(arrayWrite);
queryWrite.SetLayout(LayoutType.Unordered);
queryWrite.SetDataBuffer("rows", rowsData);
queryWrite.SetOffsetsBuffer("rows", rowsOffsets);
Expand All @@ -62,7 +62,7 @@ private static void ReadArray()
using (var arrayRead = new Array(Ctx, ArrayPath))
{
arrayRead.Open(QueryType.Read);
var queryRead = new Query(Ctx, arrayRead);
var queryRead = new Query(arrayRead);
queryRead.SetLayout(LayoutType.Unordered);
var subarray = new Subarray(arrayRead);
subarray.AddRange("rows", "a", "eeeee");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private static void WriteArray()
using (var array_write = new Array(Ctx, ArrayPath))
{
array_write.Open(QueryType.Write);
var query_write = new Query(Ctx, array_write);
var query_write = new Query(array_write);
query_write.SetLayout(LayoutType.Unordered);
query_write.SetDataBuffer("rows", dim1_data_buffer);
query_write.SetDataBuffer("cols", dim2_data_buffer);
Expand All @@ -58,7 +58,7 @@ private static void ReadArray()
using (var array_read = new Array(Ctx, ArrayPath))
{
array_read.Open(QueryType.Read);
var query_read = new Query(Ctx, array_read);
var query_read = new Query(array_read);
query_read.SetLayout(LayoutType.Unordered);
query_read.SetDataBuffer("rows", dim1_data_buffer_read);
query_read.SetDataBuffer("cols", dim2_data_buffer_read);
Expand Down
4 changes: 2 additions & 2 deletions examples/TileDB.CSharp.Example/ExampleQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private static void WriteArray()
using (var array_write = new Array(Ctx, ArrayPath))
{
array_write.Open(QueryType.Write);
var query_write = new Query(Ctx, array_write);
var query_write = new Query(array_write);
query_write.SetLayout(LayoutType.Unordered);
query_write.SetDataBuffer("rows", dim1_data_buffer);
query_write.SetDataBuffer("cols", dim2_data_buffer);
Expand All @@ -53,7 +53,7 @@ private static void ReadArray()
using (var array_read = new Array(Ctx, ArrayPath))
{
array_read.Open(QueryType.Read);
var query_read = new Query(Ctx, array_read);
var query_read = new Query(array_read);
query_read.SetLayout(LayoutType.RowMajor);
query_read.SetDataBuffer("rows", dim1_data_buffer_read);
query_read.SetDataBuffer("cols", dim2_data_buffer_read);
Expand Down
4 changes: 2 additions & 2 deletions examples/TileDB.CSharp.Example/ExampleWritingDenseGlobal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private static void WriteArray()
using var array = new Array(Ctx, ArrayPath);
array.Open(QueryType.Write);

using var queryWrite = new Query(Ctx, array, QueryType.Write);
using var queryWrite = new Query(array, QueryType.Write);
queryWrite.SetLayout(LayoutType.GlobalOrder);
// Slice rows 1-4, columns 1-2 for a total of 8 cells
using var subarray = new Subarray(array);
Expand All @@ -56,7 +56,7 @@ private static void ReadArray()
{
using var array = new Array(Ctx, ArrayPath);
array.Open(QueryType.Read);
using var readQuery = new Query(Ctx, array, QueryType.Read);
using var readQuery = new Query(array, QueryType.Read);
using var subarray = new Subarray(array);
subarray.SetSubarray(1, 4, 1, 4);
readQuery.SetSubarray(subarray);
Expand Down
4 changes: 2 additions & 2 deletions examples/TileDB.CSharp.Example/ExampleWritingSparseGlobal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private static void WriteArray()
{
using var array = new Array(Ctx, ArrayPath);
array.Open(QueryType.Write);
using var queryWrite = new Query(Ctx, array, QueryType.Write);
using var queryWrite = new Query(array, QueryType.Write);
queryWrite.SetLayout(LayoutType.GlobalOrder);

// Coordinates for global order writes must be provided in-order
Expand Down Expand Up @@ -57,7 +57,7 @@ private static void ReadArray()
{
using var array = new Array(Ctx, ArrayPath);
array.Open(QueryType.Read);
using var readQuery = new Query(Ctx, array, QueryType.Read);
using var readQuery = new Query(array, QueryType.Read);
using var subarray = new Subarray(array);
subarray.SetSubarray(1, 4, 1, 4);
readQuery.SetSubarray(subarray);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>Exe</OutputType>
<RollForward>Major</RollForward>
<RootNamespace>TileDB.CSharp.Examples</RootNamespace>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<UseCurrentRuntimeIdentifier>true</UseCurrentRuntimeIdentifier>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "7.0.200"
"version": "7.0.305"
}
}
10 changes: 8 additions & 2 deletions scripts/generate-bindings/GenerateBindings.proj
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@
<ConfigOption Include="multi-file" />
<InputFile Include="tiledb/tiledb_experimental.h" />
<TraversePaths Include="$(InputDir)/**/*.h" />
<RemapHandleType Include="attribute" />
<RemapHandleType Include="buffer" />
<RemapHandleType Include="buffer_list" />
<RemapHandleType Include="config" />
<RemapHandleType Include="config_iter" />
<RemapHandleType Include="ctx" />
<RemapHandleType Include="dimension" />
<RemapHandleType Include="dimension_label" />
<RemapHandleType Include="domain" />
<RemapHandleType Include="enumeration" />
<RemapHandleType Include="error" />
<RemapHandleType Include="filter" />
<RemapHandleType Include="filter_list" />
Expand All @@ -31,10 +36,11 @@
<RemapHandleType Include="vfs_fh" />
<Remap Include="@(RemapHandleType->'tiledb_%(Identity)_handle_t=tiledb_%(Identity)_t')" />
<Remap Include="tiledb_experimental_query_status_details_t=tiledb_query_status_details_t" />
<ExcludeDump Include="array_schema" />
<ExcludeDump Include="attribute" />
<ExcludeDump Include="domain" />
<ExcludeDump Include="dimension" />
<ExcludeDump Include="array_schema" />
<ExcludeDump Include="domain" />
<ExcludeDump Include="enumeration" />
<ExcludeDump Include="stats" />
<ExcludeDump Include="stats_raw" />
<ExcludeDump Include="fragment_info" />
Expand Down
3 changes: 3 additions & 0 deletions sources/TileDB.CSharp/Array.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
using TileDB.CSharp.Marshalling;
using TileDB.CSharp.Marshalling.SafeHandles;
using TileDB.Interop;
using ArrayHandle = TileDB.CSharp.Marshalling.SafeHandles.ArrayHandle;
using ArraySchemaHandle = TileDB.CSharp.Marshalling.SafeHandles.ArraySchemaHandle;
using ConfigHandle = TileDB.CSharp.Marshalling.SafeHandles.ConfigHandle;

namespace TileDB.CSharp
{
Expand Down
Loading

0 comments on commit f4bae0f

Please sign in to comment.