From 6b1a3b75db2fd7a9e841a003c34a68dcf50566b5 Mon Sep 17 00:00:00 2001 From: Michele Bastione Date: Sat, 25 Jul 2026 00:27:57 +0200 Subject: [PATCH 1/2] Added CODE_OF_CONDUCT.md and CONTRIBUTING.md files --- CODE_OF_CONDUCT.md | 3 +++ CONTRIBUTING.md | 52 ++++++++++++++++++++++++++++++++++++ MiniExcel.slnx | 12 +++++++-- README-V2.md => README_V2.md | 0 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md rename README-V2.md => README_V2.md (100%) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..856c1283 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,3 @@ +# Code of Conduct + +MiniExcel is part of the [.NET Foundation](https://dotnetfoundation.org/), and we ask our contributors to abide by their [Code of Conduct](https://www.dotnetfoundation.org/code-of-conduct). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..69e0b011 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing to MiniExcel + +Thank you for your enthusiasm and generosity in wanting to contribute to the project! + +We kindly ask you to follow the guidelines hereby specified. + +## Reporting an issue + +Bugs are tracked via [GitHub issues](https://github.com/mini-software/miniexcel/issues/). +The issue template will help you on the way to create a new one: + +* Create an issue via the [issues list](https://github.com/mini-software/miniexcel/issues/new?template=bug_report.md) +* Include the versions of MiniExcel that are affected +* Specify the target framework and operating system +* Describe the differences between the expected behaviour and the actual behaviour +* Provide a minimum code sample that reproduces the issue + +## Requesting a feature/enhancement + +Similarly, feature requests are also tracked via [GitHub](https://github.com/mini-software/miniexcel/issues/) issues. +The issue template will help you on the way once again: + +* Create an issue via the [issues list](https://github.com/mini-software/MiniExcel/issues/new?template=feature_request.md) +* Explain your motivations for the feature to be included +* Describe how the feature would work +* Include workarounds where applicable + +## Making a PR + +**Please do not open a PR that does not reference an issue**. +* If an issue does not already exist please create one via the issues list +* Fork the repository and create a branch with a descriptive name +* Attempt to make commits of logical units +* Verify the solution builds successfully and all tests pass +* Create the PR making sure: + * It references the issue addressed by the PR + * Unit tests for the changes have been added + * Documentation has been updated where necessary + +## AI Usage + +The use of AI agents is allowed for generating bugfixes, unit tests and documentation. +Please make sure to review all AI contributions submitted on your behalf. + +We kindly ask you to refrain from using AI to generate new features, +as it becomes increasingly difficult and time-consuming for the mantainers to review them, integrate them appropriately into the codebase, and ultimately mantain them indefinitely. + +## Questions? + +Feel free to open a discussion or contact the mantainers directly via email if you have further inquiries. + +Finally, when contributing please keep in mind our [Code of Conduct](CODE_OF_CONDUCT.md). diff --git a/MiniExcel.slnx b/MiniExcel.slnx index a34ae0b2..d87561a9 100644 --- a/MiniExcel.slnx +++ b/MiniExcel.slnx @@ -1,7 +1,9 @@ + + @@ -11,18 +13,22 @@ + + + + - - + + @@ -33,9 +39,11 @@ + + diff --git a/README-V2.md b/README_V2.md similarity index 100% rename from README-V2.md rename to README_V2.md From f33b4122b51542e6f4ddd04fb713e67e802afd31 Mon Sep 17 00:00:00 2001 From: Michele Bastione Date: Sat, 25 Jul 2026 00:49:13 +0200 Subject: [PATCH 2/2] Minor fixes --- CONTRIBUTING.md | 4 ++-- README_V2.md | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69e0b011..872cee50 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,10 +43,10 @@ The use of AI agents is allowed for generating bugfixes, unit tests and document Please make sure to review all AI contributions submitted on your behalf. We kindly ask you to refrain from using AI to generate new features, -as it becomes increasingly difficult and time-consuming for the mantainers to review them, integrate them appropriately into the codebase, and ultimately mantain them indefinitely. +as it becomes increasingly difficult and time-consuming for the maintainers to review them, integrate them appropriately into the codebase, and ultimately maintain them indefinitely. ## Questions? -Feel free to open a discussion or contact the mantainers directly via email if you have further inquiries. +Feel free to open a discussion or contact the maintainers directly via email if you have further inquiries. Finally, when contributing please keep in mind our [Code of Conduct](CODE_OF_CONDUCT.md). diff --git a/README_V2.md b/README_V2.md index fc5374d6..450e1fe6 100644 --- a/README_V2.md +++ b/README_V2.md @@ -196,7 +196,7 @@ await exporter.ExportAsync(outputPath, values); ### Release Notes -If you're migrating from a `1.x` version, please check the [upgrade notes](V2-upgrade-notes.md). +If you're migrating from a `1.x` version, please check the [upgrade notes](V2-Upgrade-Notes.md). You can check the full release notes [here](docs). @@ -208,12 +208,12 @@ Check what we are planning for future versions [here](https://github.com/mini-so The code for the benchmarks can be found in [MiniExcel.Benchmarks](benchmarks/MiniExcel.Benchmarks/Program.cs). -The main file used to test performance is [**Test100,000x10.xlsx**](benchmarks/MiniExcel.Benchmarks/Test1%2C000%2C000x10.xlsx), a document containing 100,000 rows * 10 columns whose cells are filled with unique strings. +The main file used to test performance is [**Test100,000x10.xlsx**](benchmarks/MiniExcel.Benchmarks/Test100%2C000x10.xlsx), a document containing 100,000 rows * 10 columns whose cells are filled with unique strings. To run all the benchmarks use: ```bash -dotnet run -project .\benchmarks\MiniExcel.Benchmarks -c Release -f net9.0 -filter * --join +dotnet run --project .\benchmarks\MiniExcel.Benchmarks -c Release -f net9.0 -filter "*" --join ``` You can find the benchmarks' results for the latest release [here](benchmarks/results). @@ -385,7 +385,7 @@ Under the hood the dynamic objects returned in a query are implemented using `Ex making it possible to cast them to `IDictionary`: ```csharp -var excelimporter = MiniExcel.Importers.GetOpenXmlImporter(); +var excelImporter = MiniExcel.Importers.GetOpenXmlImporter(); var rows = excelImporter.Query(path).Cast>(); @@ -509,7 +509,7 @@ exporter.Export(path, values); ```csharp var exporter = MiniExcel.Exporters.GetOpenXmlExporter(); -List>() values = +List> values = [ new() { { "Column1", "MiniExcel" }, { "Column2", 1 } }, new() { { "Column1", "Github" }, { "Column2", 2 } } @@ -567,7 +567,7 @@ using var connection = YourDbConnection(); var cmd = new CommandDefinition( "SELECT 'MiniExcel' AS Column1, 1 as Column2 UNION ALL SELECT 'Github', 2", - flags: CommandFlags.NoCache) + flags: CommandFlags.NoCache ); // Note: QueryAsync will throw a closed connection exception @@ -716,7 +716,7 @@ Dictionary[] value = ]; var exporter = MiniExcel.Exporters.GetOpenXmlExporter(); -exporter.Export("test.xlsx", value, configuration: config); +exporter.Export("test.xlsx", value); ``` ![image](https://user-images.githubusercontent.com/31481586/241419455-3c0aec8a-4e5f-4d83-b7ec-6572124c165d.png) @@ -1149,7 +1149,7 @@ var config = new OpenXmlConfiguration }; var templater = MiniExcel.Templaters.GetOpenXmlTemplater(); -templater.ApplyTemplate(path, templatePath, value, config) +templater.ApplyTemplate(path, templatePath, value, config); ``` ![image](https://user-images.githubusercontent.com/12729184/157464332-e316f829-54aa-4c84-a5aa-9aef337b668d.png) @@ -1252,11 +1252,11 @@ public class Dto public DateTime InDate { get; set; } } -var value = new Dto[] -{ - new Issue241Dto{ Name = "Jack", InDate = new DateTime(2021, 01, 04) }, - new Issue241Dto{ Name = "Henry", InDate = new DateTime(2020, 04, 05) } -}; +Dto[] value = +[ + new() { Name = "Jack", InDate = new DateTime(2021, 01, 04) }, + new() { Name = "Henry", InDate = new DateTime(2020, 04, 05) } +]; var exporter = MiniExcel.Exporters.GetOpenXmlExporter(); exporter.Export(path, value); @@ -1589,7 +1589,7 @@ var config = new CsvConfiguration .ToArray() }; -var importer = MiniExcel.Exporters.GetCsvImporter(); +var importer = MiniExcel.Importers.GetCsvImporter(); var rows = importer.Query(path, configuration: config).ToList(); ```