nrel-spa-dart/.github/wiki/CONTRIBUTING.md
Aric Camarata 86db6c6bae
feat: gap-fill API surface parity with nrel-spa JS (v1.0.1) (#1)
* feat: gap-fill API surface parity with nrel-spa JS (v1.0.1)

Add formatTime, calcSpa, SpaFormattedResult, SpaFormattedAnglesResult,
functionCode parameter for getSpa (spaZa/spaZaInc/spaZaRts/spaAll),
incidence field on SpaResult, and export all function code constants.

All 48 tests pass including numerical cross-validation against the NREL
SPA reference date (Golden CO, 2003-10-17) and surface incidence angle.

* docs: add CHANGELOG.md for v1.0.1 release

* chore: polish pubspec, fix unused import, add wiki docs
2026-05-29 06:49:12 -04:00

46 lines
1.7 KiB
Markdown

# Contributing to nrel-spa-dart
Thanks for taking the time to contribute.
## Getting started
1. Fork the repository and clone your fork.
2. Install the Dart SDK (stable channel): [dart.dev/get-dart](https://dart.dev/get-dart)
3. Install dependencies: `dart pub get`
4. Run the tests: `dart test`
## Reporting bugs
Open a GitHub issue with:
- A minimal reproducible example
- The actual output and the expected output
- Your Dart SDK version (`dart --version`)
- Your operating system
## Suggesting enhancements
Open a GitHub issue before writing code. Describe the use case and the proposed API. Algorithm changes require a reference to the relevant paper or standard.
## Pull requests
1. Create a feature branch from `main`.
2. Keep changes focused. One feature or bug fix per PR.
3. Add or update tests for any changed behavior.
4. Run `dart analyze` and confirm zero issues.
5. Run `dart format lib/ test/` before committing.
6. Update the CHANGELOG.md under `## [Unreleased]` with a brief description.
7. Open the PR with a clear title and description.
## Code style
Follow standard Dart conventions. The project uses `dart format` with default settings. Lint rules are defined in `analysis_options.yaml` and inherit from the `lints` package.
Comments should explain *why*, not *what*. Algorithm steps should reference the equation number from Reda & Andreas (2004).
## Algorithm changes
This package implements the NREL Solar Position Algorithm exactly as specified in NREL/TP-560-34302. Proposed deviations from the paper require strong justification and a test against the validation dataset from the paper.
## License
By contributing, you agree that your contributions will be licensed under the MIT License.