Currently, species parameters validation and default filling are split between the standalone validSpeciesParams() function and the constructor species_params.data.frame(), leading to duplicate validation logic and redundant conversions.
Detailed Plan:
- Integrate the complete validation and default filling logic from
validSpeciesParams() into the constructor species_params.data.frame().
- Update
validSpeciesParams() to simply return species_params(object).
- Consolidate error handling and consistency warnings inside
check_and_convert_species_params().
- Ensure full compatibility and pass all existing tests.
Currently, species parameters validation and default filling are split between the standalone
validSpeciesParams()function and the constructorspecies_params.data.frame(), leading to duplicate validation logic and redundant conversions.Detailed Plan:
validSpeciesParams()into the constructorspecies_params.data.frame().validSpeciesParams()to simply returnspecies_params(object).check_and_convert_species_params().