|
1 | | -# Contributing guidelines |
| 1 | +# Contributing Guidelines |
2 | 2 |
|
3 | | -## Pre-requisites |
| 3 | +## Prerequisites |
4 | 4 |
|
5 | | - - [.NET 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) |
| 5 | +- Install the supported .NET SDKs for the target frameworks listed in `Directory.Build.props`. |
| 6 | +- This repository currently targets `net8.0`, `net9.0`, and `net10.0`. |
| 7 | + |
| 8 | +## Repository Layout |
| 9 | + |
| 10 | +- `AEMO.MDFF.sln` is the root solution. |
| 11 | +- Library code lives in `src/AEMO.MDFF`. |
| 12 | +- Tests and sample data live in `src/AEMO.MDFF.Tests`. |
| 13 | +- Shared MSBuild settings live in `Directory.Build.props`. |
| 14 | +- Central NuGet package versions live in `Directory.Packages.props`. |
| 15 | + |
| 16 | +## Build And Test |
| 17 | + |
| 18 | +Run commands from the repository root: |
| 19 | + |
| 20 | +```shell |
| 21 | +dotnet restore AEMO.MDFF.sln |
| 22 | +dotnet build AEMO.MDFF.sln |
| 23 | +dotnet test AEMO.MDFF.sln |
| 24 | +``` |
| 25 | + |
| 26 | +If your local machine has a newer .NET runtime but not every older targeted runtime, use: |
| 27 | + |
| 28 | +```shell |
| 29 | +DOTNET_ROLL_FORWARD=Major dotnet test AEMO.MDFF.sln |
| 30 | +``` |
| 31 | + |
| 32 | +To validate packaging after a Release build: |
| 33 | + |
| 34 | +```shell |
| 35 | +dotnet build AEMO.MDFF.sln --configuration Release |
| 36 | +dotnet pack AEMO.MDFF.sln --configuration Release --no-build --output nupkgs |
| 37 | +``` |
| 38 | + |
| 39 | +## Pull Requests |
| 40 | + |
| 41 | +- Use conventional commits, for example `fix(nem12): ...`, `feat(nem13): ...`, or `chore(build): ...`. |
| 42 | +- Keep each PR focused on one concern where practical. |
| 43 | +- Include tests for parser behavior changes and malformed record ordering. |
| 44 | +- Do not commit generated `bin`, `obj`, or local package output files. |
| 45 | + |
| 46 | +## Parser Guidelines |
| 47 | + |
| 48 | +- Keep MDFF readers streaming: parse one CSV row at a time and yield records incrementally. |
| 49 | +- Avoid parser state that survives across calls to `ReadAsync`. |
| 50 | +- Keep per-record allocations bounded. |
| 51 | +- Model optional MDFF fields as nullable. |
| 52 | +- Use explicit `InvalidDataException` messages for invalid record ordering or unsupported record types. |
0 commit comments