Thank you for your interest in contributing! This guide will help you get started.
git clone https://github.com/paradoxie/stat-engine.git
cd stat-engine
npm install| Command | Description |
|---|---|
npm test |
Run all tests once |
npm run test:watch |
Run tests in watch mode |
npm run test:coverage |
Run tests with coverage report |
npm run build |
Build ESM + CJS + type declarations |
npm run lint |
Type-check without emitting |
src/
├── index.ts # Public API entry point
├── engine.ts # Core MultiAlgorithmEngine class
├── math-utils.ts # Shared math functions (median, Kahan sum, etc.)
└── types.ts # TypeScript type definitions
tests/
├── engine.test.ts # Engine integration tests
└── math-utils.test.ts # Math utility unit tests
- Fork the repository and create your branch from
main - Write tests for any new functionality
- Run the test suite to make sure everything passes:
npm test - Run the linter to catch type errors:
npm run lint - Update documentation if you changed any public APIs
- Submit a Pull Request with a clear description
- Use TypeScript strict mode — no
anytypes - Add JSDoc comments to all public functions and types
- Use descriptive variable names over abbreviations
- Keep functions pure where possible (no side effects)
- Add
@internaltag to functions not intended for public use
- Add the algorithm identifier to
QuartileAlgorithmintypes.ts - Add metadata to
ALGORITHM_METADATAinengine.ts - Implement the calculation method as a
private staticmethod - Add the case to the
switchincalculateQuartiles() - Add verification support in
generateVerification() - Write tests covering the new algorithm with known reference values
- Update
README.mdwith the new algorithm's details
Open a GitHub Issue with:
- Your Node.js version and OS
- Minimal reproducible dataset
- Expected vs actual output
- Which algorithm(s) are affected
By contributing, you agree that your contributions will be licensed under the MIT License.