This is an automated email from the ASF dual-hosted git repository.

CurtHagenlocher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-dotnet.git


The following commit(s) were added to refs/heads/main by this push:
     new bbca2f6  chore: Include a README in the NuGet packages (#485)
bbca2f6 is described below

commit bbca2f66db9433e54b29d30cada0fe23a70a1a04
Author: ump45nose <[email protected]>
AuthorDate: Thu Nov 19 04:29:25 2026 +0800

    chore: Include a README in the NuGet packages (#485)
    
    ## What's Changed
    
    `dotnet nuget push` warns that our packages have no readme. This adds a
    short package readme (`src/README.md`) and wires it up in the shared
    NuGet properties in `Directory.Build.props` (`PackageReadmeFile` plus a
    packed `Content` item next to the license and icon), so every packable
    project under `src/` gets it.
    
    The root `README.md` is aimed at people building the repo (build steps,
    relative links to source folders), so I wrote a separate, smaller one
    for nuget.org: what Apache Arrow is, the list of packages, a short IPC
    reading example and links to the docs and the repository. All links are
    absolute so they work on nuget.org. It carries the usual ASF license
    header like the other Markdown files.
    
    Checked with `dotnet pack -c Release` for each project in `src/`: all
    seven `.nupkg` files now contain `README.md` at the package root and
    their nuspec has `<readme>README.md</readme>`, with no new pack
    warnings.
    
    This PR was prepared with AI assistance and reviewed by me.
    
    Closes #45.
    
    
    ## Review follow-ups
    
    - The icon and the README both pack with `PackagePath=""` (`d9b24ae`),
    so both land at the package root.
    - `dev/release/verify_rc.sh` derives the package names from
    `src/*/*.csproj` (`4a6613a`) instead of iterating every `src/*/`
    directory, so `src/README.md` and any directory without a project cannot
    break release verification. No project sets `PackageId`, so the file
    name is the package id.
    - The README example uses `RecordBatch? batch` (`3c9f12c`), so pasting
    it into a nullable-enabled project does not warn.
    
    Verification for those two commits: `bash -n dev/release/verify_rc.sh`
    plus a dry run of the loop over a fixture tree (emits `nupkg`/`snupkg`
    names per project, skips a README file and an empty directory). This
    environment has no .NET SDK, so the `dotnet pack` check above was not
    re-run after the Markdown and shell changes.
    
    ---------
    
    Signed-off-by: Vincent <[email protected]>
    Co-authored-by: ump45nose <[email protected]>
---
 Directory.Build.props    |  4 ++-
 dev/release/verify_rc.sh |  6 +++-
 src/README.md            | 73 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/Directory.Build.props b/Directory.Build.props
index d2b10b9..875c726 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -44,6 +44,7 @@
     <Authors>The Apache Software Foundation</Authors>
     <PackageIcon>logo_asf.png</PackageIcon>
     <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
+    <PackageReadmeFile>README.md</PackageReadmeFile>
     <PackageProjectUrl>https://arrow.apache.org/dotnet/</PackageProjectUrl>
     <PackageTags>apache arrow</PackageTags>
     <RepositoryType>git</RepositoryType>
@@ -54,7 +55,8 @@
 
   <ItemGroup Condition="'$(IsPackable)' == 'true'">
     <Content Include="$(CSharpDir)LICENSE.txt" Pack="true" PackagePath="" />
-    <Content Include="$(CSharpDir)logo_asf.png" Link="logo_asf.png" 
Pack="true" PackagePath="\" />
+    <Content Include="$(CSharpDir)logo_asf.png" Link="logo_asf.png" 
Pack="true" PackagePath="" />
+    <Content Include="$(CSharpDir)src/README.md" Link="README.md" Pack="true" 
PackagePath="" />
   </ItemGroup>
 
 </Project>
diff --git a/dev/release/verify_rc.sh b/dev/release/verify_rc.sh
index a470d1b..187169b 100755
--- a/dev/release/verify_rc.sh
+++ b/dev/release/verify_rc.sh
@@ -178,7 +178,11 @@ test_binary_distribution() {
   fi
 
   pushd nuget
-  for package in $(cd ../src && echo *); do
+  # Derive the package names from the packable projects rather than from
+  # every entry under src/, so directories without a package (and files such
+  # as src/README.md) cannot make the verification fail.
+  for project in ../src/*/*.csproj; do
+    package="$(basename "${project}" .csproj)"
     for package_type in nupkg snupkg; do
       fetch_artifact "${package}.${VERSION}.${package_type}"
     done
diff --git a/src/README.md b/src/README.md
new file mode 100644
index 0000000..c679e2a
--- /dev/null
+++ b/src/README.md
@@ -0,0 +1,73 @@
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+# Apache Arrow .NET
+
+[Apache Arrow](https://arrow.apache.org/) is a universal columnar format and
+multi-language toolbox for fast data interchange and in-memory analytics.
+This package is part of the .NET implementation of Apache Arrow.
+
+## Packages
+
+- `Apache.Arrow`: the core library (arrays, schemas, record batches and the
+  Arrow IPC stream and file formats).
+- `Apache.Arrow.Compression`: LZ4 frame and Zstandard codecs for compressed
+  Arrow IPC data.
+- `Apache.Arrow.Flight`: Arrow Flight client and server.
+- `Apache.Arrow.Flight.AspNetCore`: ASP.NET Core integration for Arrow Flight 
servers.
+- `Apache.Arrow.Flight.Sql`: Arrow Flight SQL client and server.
+- `Apache.Arrow.Operations`: codecs for the Variant binary format, including a
+  JSON reader and writer.
+- `Apache.Arrow.Scalars`: scalar types, including readers, writers and an 
object
+  model for the Parquet Variant binary format.
+
+## Usage
+
+Example of reading all record batches from an Arrow IPC file:
+
+```csharp
+using System.Collections.Generic;
+using System.IO;
+using System.Threading.Tasks;
+using Apache.Arrow;
+using Apache.Arrow.Ipc;
+
+public static async Task<List<RecordBatch>> ReadArrowFileAsync(string filename)
+{
+    var batches = new List<RecordBatch>();
+    using (var stream = File.OpenRead(filename))
+    using (var reader = new ArrowFileReader(stream))
+    {
+        // ReadNextRecordBatchAsync() returns null once the reader is drained.
+        // The nullable local keeps this sample warning-free in projects that
+        // enable nullable reference types.
+        RecordBatch? batch;
+        while ((batch = await reader.ReadNextRecordBatchAsync()) != null)
+        {
+            batches.Add(batch);
+        }
+    }
+    return batches;
+}
+```
+
+## Links
+
+- Documentation: https://arrow.apache.org/dotnet/
+- Source code and issue tracker: https://github.com/apache/arrow-dotnet

Reply via email to