# Build & test inside Docker (primary dev workflow)
docker compose build
docker compose run islasgeci make tests
docker compose run islasgeci make coverageThe project uses a strict red/green/refactor cycle via make. Each phase applies styler formatting, runs tests with stop_on_failure = TRUE, then auto-commits:
| Phase | Command | Auto-commits | On failure |
|---|---|---|---|
| Red (write failing test) | make red |
tests/testthat/*.R |
git restore . |
| Green (make pass) | make green |
R/*.R |
git restore . |
| Refactor | make refactor |
R/*.R + tests/testthat/*.R |
git restore . |
make check— check styler formatting (no auto-fix, used in CI).make format— auto-format R/ and tests/ withstyler.make setup—clean+install(rebuilds package, regenerates NAMESPACE, runsdevtools::check).make tests— rundevtools::test(stop_on_failure = TRUE).
- Exported functions (see
NAMESPACE— auto-generated by roxygen2):classify_by_season_and_enso_phase()— classify dates by season and ENSO phase.get_domain_specific_options()— define CLI option keys with defaults.
- Internal functions in
R/:compute_season(),compute_enso(),lookup_season_column(),transform_roni_data_to_longer(),lookup_nine_oni_values(),classify_enso_phase(),has_consecutive_threshold_values(). src/borrador_codigo_enso.Ris scratch/draft code, not part of the package — do not edit or export.- Sibling reference:
../bycatch_code/establishes patterns this project follows (e.g.,get_domain_specific_optionsusinggecioptparse). Consult it for implementation conventions. - gecioptparse API: Exported functions
character_option(),integer_option(),double_option(), andget_options_from_vec()are used to build CLI options. Pattern: define each option withgecioptparse::*_option(), combine into a vector, pass togecioptparse::get_options_from_vec(). - The Gold: Defined in
TODO.md. Currently: migrateget_domain_specific_options()to usegecioptparse. - Only branch is
develop(nomain).
- testthat edition 3, BDD-style with
describe()/it(). - Test fixtures live in
tests/data/(roni_data.csv,transformed_roni_data.csv). - Tests read CSVs with
readr::read_csv("/workdir/tests/data/...")— path is hardcoded for the Docker container.
- Remote dependencies:
IslasGECI/gecioptparse,IslasGECI/testtools(installed viaremotesinDESCRIPTION). NAMESPACEis generated by roxygen2 — never edit by hand. Regen withdevtools::document()(part ofmake setup).man/directory is generated the same way.- Coverage uses
covrpackage + Codecov (token intests/testthat/coverage.R). - CI runs inside Docker only:
docker build→make check→make coverage→make mutants(mutants target is a placeholder:"En espera del doctorado de Evaristo 👾🎉🎓").
CHANGELOG.mdcomparison URLs now point to the correctensorepository (wastemplater— fixed).