Skip to content

[LiquidCortex.jl] GH#20 — Add complete docstrings with examples to all public API functions #20

Description

@rmems

Source

Synced / linked to GitHub for 1:1 mirror (2026-07-26).


Context

Several public API functions have incomplete or missing docstrings. Julia's @doc system and Documenter.jl rely on well-structured docstrings for REPL help and generated docs.

Functions needing docstring improvements

SparseBrain

  • Add usage example to constructor docstring
  • Document all fields in the struct docstring
  • Add example for step!() with inhibition

EnsembleBrain

  • Add usage example to constructor
  • Document aggregation weights
  • Add example for ensemble_step!()

Reference LSM

  • run_lsm_step — add example with custom n_out
  • run_lsm_step_str — add example
  • _init_ref_lsm! — document when to call manually

Utility functions

  • get_output — add example
  • get_ensemble_output — add example
  • compute_reservoir_covariance! — add example with return type
  • diagnostics — add example output
  • ensemble_diagnostics — add example output

Docstring format (Julia standard)

"""
    function_name(arg1, arg2; kwarg=default)

One-line description.

# Arguments
- `arg1`: description
- `arg2`: description

# Keyword Arguments
- `kwarg`: description

# Examples
```julia
result = function_name(1, 2; kwarg=3)

Returns

Description of return value.
"""


## Acceptance criteria

- [ ] All exported functions have complete docstrings
- [ ] All docstrings include at least one usage example
- [ ] All docstrings document return types
- [ ] `julia --project -e 'using LiquidCortex; @doc SparseBrain'` shows complete docs

## Labels

`documentation`, `good first issue`

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions