Skip to content

[evol assembly] Testing gaps: several exported functions lack test coverage #27

Description

@dfalster

Tracking issue for test coverage gaps, following the test suite added in #25 and extended in #26.

Current state: devtools::test() is green (79 pass, 0 fail), covering the core community + fitness primitives. Several exported functions remain untested.

Tested

  • Object: community_start, trait_matrix, length.community (+ internal community_add / community_drop)
  • Bounds: bounds, bounds_infinite, check_bounds, check_point
  • Controls: demographic_step_control, plant_default_assembly_control (via test setup)
  • Demography / fitness: community_demography (empty + single resident), community_selection_gradient, community_viable_fitness_1D, max_fitness, max_growth_rate

Untested — should work today (highest value)

  • community_solve_singularity_1D — 1D evolutionary attractor (headline capability; self-contained, expected to pass)
  • assembler_start / assembler_run / assembler_control — the full assembly loop (stochastic and maximum-fitness births)
  • community_fitness_landscape — grid method (GP/surrogate method may be separate)
  • tidy_assembly — output tidying
  • mutational_vcv_proportion

Untested — blocked / deferred (test alongside the fix)

  • community_plot_fitness_landscape — known not working
  • plot_community, plot_community_2d — plotting (visual; lower priority)
  • plant_community_check_for_inviable_strategies — has an open TODO to drop its direct plant dependency
  • util_nlsolve — only exercised by the equilibrium_solve_* solvers, which are not yet reworked/verified for the community object (see CLAUDE.md "Known issues")

Notes

  • When adding tests, verify each function actually works first; report breakage rather than asserting around it.
  • Integration tests run the SCM and are a few seconds each — keep max_patch_lifetime small (e.g. 30) as the existing tests do.
  • See CLAUDE.md (Test baseline / Known issues) for the broader status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskA discrete task needed for a feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions