From 414377176f244728e498aa7c58db20f90badd5bd Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 10:42:15 +0100 Subject: [PATCH 01/10] super-linter.yml: Add Setup .NET to address SDK issue --- .github/workflows/super-linter.yml | 5 +++++ README.md | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 0d9eb7c6..8a9cf6c9 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -33,6 +33,11 @@ jobs: # list of files that changed across commits fetch-depth: 0 + - name: Setup .NET (global.json) + uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0 + with: + global-json-file: global.json + - name: Super-linter uses: super-linter/super-linter@85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d # v7.2.1 env: diff --git a/README.md b/README.md index cdbc18b9..5d1ad35d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Super-Linter](https://github.com/nietras/Sep/actions/workflows/super-linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter) [![codecov](https://codecov.io/gh/nietras/Sep/branch/main/graph/badge.svg?token=WN56CR3X0D)](https://codecov.io/gh/nietras/Sep) [![CodeQL](https://github.com/nietras/Sep/workflows/CodeQL/badge.svg)](https://github.com/nietras/Sep/actions?query=workflow%3ACodeQL) +[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9962/badge)](https://www.bestpractices.dev/projects/9962) [![Nuget](https://img.shields.io/nuget/v/Sep?color=purple)](https://www.nuget.org/packages/Sep/) [![Release](https://img.shields.io/github/v/release/nietras/Sep)](https://github.com/nietras/Sep/releases/) [![downloads](https://img.shields.io/nuget/dt/Sep)](https://www.nuget.org/packages/Sep) From f88a96d5b59ae194da3ea515e33ba472697f3ee0 Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 10:49:27 +0100 Subject: [PATCH 02/10] nits --- .github/workflows/super-linter.yml | 5 ----- .github/workspace/global.json | 2 +- README.md | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 8a9cf6c9..0d9eb7c6 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -33,11 +33,6 @@ jobs: # list of files that changed across commits fetch-depth: 0 - - name: Setup .NET (global.json) - uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0 - with: - global-json-file: global.json - - name: Super-linter uses: super-linter/super-linter@85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d # v7.2.1 env: diff --git a/.github/workspace/global.json b/.github/workspace/global.json index 031276e2..0baa6503 100644 --- a/.github/workspace/global.json +++ b/.github/workspace/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.102", + "version": "9.0.100", "rollForward": "latestPatch", "allowPrerelease": false } diff --git a/README.md b/README.md index 5d1ad35d..cdbc18b9 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ [![Super-Linter](https://github.com/nietras/Sep/actions/workflows/super-linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter) [![codecov](https://codecov.io/gh/nietras/Sep/branch/main/graph/badge.svg?token=WN56CR3X0D)](https://codecov.io/gh/nietras/Sep) [![CodeQL](https://github.com/nietras/Sep/workflows/CodeQL/badge.svg)](https://github.com/nietras/Sep/actions?query=workflow%3ACodeQL) -[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9962/badge)](https://www.bestpractices.dev/projects/9962) [![Nuget](https://img.shields.io/nuget/v/Sep?color=purple)](https://www.nuget.org/packages/Sep/) [![Release](https://img.shields.io/github/v/release/nietras/Sep)](https://github.com/nietras/Sep/releases/) [![downloads](https://img.shields.io/nuget/dt/Sep)](https://www.nuget.org/packages/Sep) From 3bcaefbb60e5b3089615141336b800c0f78797fa Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 10:56:14 +0100 Subject: [PATCH 03/10] remove bullet points in readme --- README.md | 102 +++++++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index cdbc18b9..c5efe795 100644 --- a/README.md +++ b/README.md @@ -20,54 +20,60 @@ machine learning use cases. ⭐ Please star this project if you like it. ⭐ -* **🌃 Modern** - utilizes features such as - [`Span`](https://learn.microsoft.com/en-us/archive/msdn-magazine/2018/january/csharp-all-about-span-exploring-a-new-net-mainstay), - [Generic Math](https://devblogs.microsoft.com/dotnet/dotnet-7-generic-math/) - ([`ISpanParsable`](https://learn.microsoft.com/en-us/dotnet/api/system.ispanparsable-1)/ - [`ISpanFormattable`](https://learn.microsoft.com/en-us/dotnet/api/system.ispanformattable)), - [`ref struct`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/ref-struct), - [`ArrayPool`](https://learn.microsoft.com/en-us/dotnet/api/system.buffers.arraypool-1) - and similar from [.NET 7+ and C# - 11+](https://nietras.com/2022/11/26/dotnet-and-csharp-versions/) for a modern - and highly efficient implementation. -* **🔎 Minimal** - a succinct yet expressive API with few options and no hidden - changes to input or output. What you read/write is what you get. E.g. by - default there is no "automatic" escaping/unescaping of quotes or trimming of - spaces. To enable this see [SepReaderOptions](#sepreaderoptions) and - [Unescaping](#unescaping) and [Trimming](#trimming). See - [SepWriterOptions](#sepwriteroptions) for [Escaping](#escaping). -* **🚀 Fast** - blazing fast with both architecture specific and cross-platform - SIMD vectorized parsing incl. 64/128/256/512-bit paths e.g. AVX2, AVX-512 - (.NET 8.0+), NEON. Uses - [csFastFloat](https://github.com/CarlVerret/csFastFloat) for fast parsing of - floating points. See [detailed benchmarks](#comparison-benchmarks) for - cross-platform results. -* **🌪️ Multi-threaded** - unparalleled speed with highly efficient parallel CSV - parsing that is [up to 35x faster than - CsvHelper](#floats-reader-comparison-benchmarks), see - [ParallelEnumerate](#parallelenumerate-and-enumerate) and - [benchmarks](#comparison-benchmarks). -* **🌀 Async support** - efficient `ValueTask` based `async/await` support. - Requires C# 13.0+ and for .NET 9.0+ includes `SepReader` implementing - `IAsyncEnumerable<>`. See [Async Support](#async-support) for details. -* **🗑️ Zero allocation** - intelligent and efficient memory management allowing - for zero allocations after warmup incl. supporting use cases of reading or - writing arrays of values (e.g. features) easily without repeated allocations. -* **✅ Thorough tests** - great code coverage and focus on edge case testing - incl. randomized [fuzz testing](https://en.wikipedia.org/wiki/Fuzzing). -* **🌐 Cross-platform** - works on any platform, any architecture supported by - .NET. 100% managed and written in beautiful modern C#. -* **✂️ Trimmable and AOT/NativeAOT compatible** - no problematic reflection or - dynamic code generation. Hence, fully - [trimmable](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming) - and - [Ahead-of-Time](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/) - compatible. With a simple console tester program executable possible in just a - few MBs. 💾 -* **🗣️ Opinionated and pragmatic** - conforms to the essentials of - [RFC-4180](https://www.ietf.org/rfc/rfc4180.txt), but takes an opinionated and - pragmatic approach towards this especially with regards to quoting and line - ends. See section [RFC-4180](#rfc-4180). +**🌃 Modern** - utilizes features such as +[`Span`](https://learn.microsoft.com/en-us/archive/msdn-magazine/2018/january/csharp-all-about-span-exploring-a-new-net-mainstay), +[Generic Math](https://devblogs.microsoft.com/dotnet/dotnet-7-generic-math/) +([`ISpanParsable`](https://learn.microsoft.com/en-us/dotnet/api/system.ispanparsable-1)/ +[`ISpanFormattable`](https://learn.microsoft.com/en-us/dotnet/api/system.ispanformattable)), +[`ref struct`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/ref-struct), +[`ArrayPool`](https://learn.microsoft.com/en-us/dotnet/api/system.buffers.arraypool-1) +and similar from [.NET 7+ and C# +11+](https://nietras.com/2022/11/26/dotnet-and-csharp-versions/) for a modern +and highly efficient implementation. + +**🔎 Minimal** - a succinct yet expressive API with few options and no hidden +changes to input or output. What you read/write is what you get. E.g. by +default there is no "automatic" escaping/unescaping of quotes or trimming of +spaces. To enable this see [SepReaderOptions](#sepreaderoptions) and +[Unescaping](#unescaping) and [Trimming](#trimming). See +[SepWriterOptions](#sepwriteroptions) for [Escaping](#escaping). + +**🚀 Fast** - blazing fast with both architecture specific and cross-platform +SIMD vectorized parsing incl. 64/128/256/512-bit paths e.g. AVX2, AVX-512 +(.NET 8.0+), NEON. Uses +[csFastFloat](https://github.com/CarlVerret/csFastFloat) for fast parsing of +floating points. See [detailed benchmarks](#comparison-benchmarks) for +cross-platform results. + +**🌪️ Multi-threaded** - unparalleled speed with highly efficient parallel CSV +parsing that is [up to 35x faster than +CsvHelper](#floats-reader-comparison-benchmarks), see +[ParallelEnumerate](#parallelenumerate-and-enumerate) and +[benchmarks](#comparison-benchmarks). + +**🌀 Async support** - efficient `ValueTask` based `async/await` support. +Requires C# 13.0+ and for .NET 9.0+ includes `SepReader` implementing +`IAsyncEnumerable<>`. See [Async Support](#async-support) for details. +**🗑️ Zero allocation** - intelligent and efficient memory management allowing +for zero allocations after warmup incl. supporting use cases of reading or +writing arrays of values (e.g. features) easily without repeated allocations. + +**✅ Thorough tests** - great code coverage and focus on edge case testing +incl. randomized [fuzz testing](https://en.wikipedia.org/wiki/Fuzzing). +**🌐 Cross-platform** - works on any platform, any architecture supported by +NET. 100% managed and written in beautiful modern C#. +**✂️ Trimmable and AOT/NativeAOT compatible** - no problematic reflection or +dynamic code generation. Hence, fully +[trimmable](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming) +and +[Ahead-of-Time](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/) +compatible. With a simple console tester program executable possible in just a +few MBs. 💾 + +**🗣️ Opinionated and pragmatic** - conforms to the essentials of +[RFC-4180](https://www.ietf.org/rfc/rfc4180.txt), but takes an opinionated and +pragmatic approach towards this especially with regards to quoting and line +ends. See section [RFC-4180](#rfc-4180). [Example](#example) | [Naming and Terminology](#naming-and-terminology) | [API](#application-programming-interface-api) | [Limitations and Constraints](#limitations-and-constraints) | [Comparison Benchmarks](#comparison-benchmarks) | [Example Catalogue](#example-catalogue) | [RFC-4180](#rfc-4180) | [FAQ](#frequently-asked-questions-faq) | [Public API Reference](#public-api-reference) From 0b5b13d1ad265b31d2e22edd4b20114d08bdbca7 Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 10:56:26 +0100 Subject: [PATCH 04/10] disable VALIDATE_DOTNET_SLN_ --- .github/workflows/super-linter.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 0d9eb7c6..a4c69994 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -36,8 +36,11 @@ jobs: - name: Super-linter uses: super-linter/super-linter@85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d # v7.2.1 env: - # dotnet format not working, checked during build instead + # format not working, checked during build instead VALIDATE_CSHARP: false + VALIDATE_DOTNET_SLN_FORMAT_ANALYZERS: false + VALIDATE_DOTNET_SLN_FORMAT_STYLE: false + VALIDATE_DOTNET_SLN_FORMAT_WHITESPACE: false # prettier defaults are very different than current markdown VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_GIT_COMMITLINT: false From 4b7674b41ea0ecdf9875d30a64a5f2541732f135 Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 11:02:33 +0100 Subject: [PATCH 05/10] remove possibly --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c5efe795..795dc480 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Sep - ~~Possibly~~ the World's Fastest .NET CSV Parser +# Sep - the World's Fastest .NET CSV Parser ![.NET](https://img.shields.io/badge/net8.0%20net9.0-5C2D91?logo=.NET&labelColor=gray) ![C#](https://img.shields.io/badge/C%23-13.0-239120?labelColor=gray) [![Build Status](https://github.com/nietras/Sep/actions/workflows/dotnet.yml/badge.svg?branch=main)](https://github.com/nietras/Sep/actions/workflows/dotnet.yml) From 9437c77868a6ec7cfc03cc56aeea5950d444f296 Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 11:07:05 +0100 Subject: [PATCH 06/10] .codecov.yml: set after_n_buils to 6 to prevent over notification --- .codecov.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.codecov.yml b/.codecov.yml index 2efd4d5d..ac61c2f7 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -4,3 +4,7 @@ coverage: project: true patch: false changes: false + notify: + after_n_builds: 6 + comment: + after_n_builds: 6 \ No newline at end of file From 8e9189c928b97077b843a903c323d0056e66723a Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 11:10:00 +0100 Subject: [PATCH 07/10] change build to build-and-test in dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 5a5b91d6..0800e105 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -21,7 +21,7 @@ env: NuGetDirectory: ${{ github.workspace }}/nuget jobs: - build: + build-and-test: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] From 8093609adcc40383bb18724b8ab8cad6ad3b6cf3 Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 11:13:18 +0100 Subject: [PATCH 08/10] fix dep --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 0800e105..3764a41c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -161,7 +161,7 @@ jobs: path: ${{ env.NuGetDirectory }}/*nupkg create-release-push: - needs: [build, pack] + needs: [build-and-test, pack] runs-on: windows-latest permissions: contents: write From 32b5fb1f328bbe40c4d099ccf6ba1665da22e90f Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 11:18:30 +0100 Subject: [PATCH 09/10] fix nits --- .codecov.yml | 2 +- .github/workspace/global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index ac61c2f7..a0baca65 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -7,4 +7,4 @@ coverage: notify: after_n_builds: 6 comment: - after_n_builds: 6 \ No newline at end of file + after_n_builds: 6 diff --git a/.github/workspace/global.json b/.github/workspace/global.json index 0baa6503..031276e2 100644 --- a/.github/workspace/global.json +++ b/.github/workspace/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100", + "version": "9.0.102", "rollForward": "latestPatch", "allowPrerelease": false } From 579bb206afc11358e7fb47c8c95c4c2082aff4b8 Mon Sep 17 00:00:00 2001 From: nietras Date: Sat, 1 Feb 2025 11:30:08 +0100 Subject: [PATCH 10/10] try add yml to .editorconfig for prettier --- .editorconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.editorconfig b/.editorconfig index 0071d7b0..5a34245c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,6 +22,13 @@ indent_size = 4 insert_final_newline = true charset = utf-8-bom +# yaml files (for prettier) +[*.{yml,yaml}] +charset = utf-8 +insert_final_newline = true +indent_size = 2 +end_of_line = auto + #sort System.* using directives alphabetically, and place them before other usings dotnet_sort_system_directives_first = true