Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 2.76 KB

File metadata and controls

33 lines (20 loc) · 2.76 KB

Repository Guidelines

Project Structure & Module Organization

Shared statistical definitions live in spec/. Language implementations are under src/python/, src/r/, src/matlab/, and src/fortran/; keep their command-line behavior and output schemas aligned. Cross-language fixtures belong in examples/, automated Python tests in tests/, and platform entry points in scripts/. Generated analysis belongs in results/ and must not be committed. Repository content, user-facing messages, and result-schema fields must be written in English. Documentation and examples must use paths relative to the repository root; dynamically resolved runtime paths must never be embedded in committed output.

Build, Test, and Development Commands

  • conda env create -f environment.yml: create the Python/R development environment.
  • conda run -n distribution-inference pytest: run Python and schema tests.
  • ./scripts/build_fortran.sh or .\scripts\build_fortran.ps1: compile the Fortran CLI.
  • ./run_all.sh --input examples/samples.csv --bootstrap 99: run available implementations.
  • .\run_all.ps1 -Input examples\samples.csv -Bootstrap 99: equivalent Windows workflow.
  • python scripts/generate_readme_figures.py: regenerate README figures from benchmark results.

Use a small Bootstrap count while developing; production runs default to 1000.

Coding Style & Naming Conventions

Use four spaces in Python and R, MATLAB's conventional indentation, and free-form Fortran 2008. Prefer snake_case for files, functions, CLI fields, and result columns; use PascalCase only for types. Run ruff format for Python and keep lines readable in all languages. Canonical distribution and parameter names come from spec/STATISTICAL_SPEC.md; do not expose language-library aliases.

Testing Guidelines

Name Python tests test_*.py. Every statistical change needs a deterministic unit test or a shared fixture comparison. Test support violations, missing values, constant samples, optimizer failures, and boundary confidence intervals. Closed-form estimates should agree to 1e-8; allow documented looser tolerances for iterative fits and GEV. Never treat a skipped unavailable language runtime as a passing numerical comparison.

Commit & Pull Request Guidelines

Use concise Conventional Commits, such as feat: add Weibull profile intervals or fix: reject invalid beta bounds. Pull requests should identify affected languages, explain any parameterization change, list commands run, and attach comparison output when numerical results change. Keep formatting-only edits separate.

Security & Generated Files

Do not commit credentials, private samples, Conda environments, compiler products, or analysis outputs. Keep user data outside examples/ unless it is synthetic and redistributable.