This pull request includes several changes to the codebase, focusing on:
finalizing n_species() and its tests
deprecating some functions
improving documentation
Finalizing n_species() and its tests
Up to now, tests were not really taken into account as we were way far from getting the functions ready to the new format. From this PR we can start using them 🥳 as the very first function, n_species(), is ready! So, please run devtools::test(filter = "n_species") as check. Its related tests have been simplified without losing testing power. Notice that we only consider event based observations for the standard functions of camtraptor v1.0.0 (#332).
Deprecation of functions
Deprecated the get_species() function in favor of taxa() (fix #343)
get_scientific_name() and check_species() functions are defunct in favor of taxa() (fix #235). So, check_species() and get_scientific_name() functions are moved to defunct.R.
Updated references in multiple R files to inherit arg description from n_species instead of the deprecated get_species. This has been done by using @inheritParams n_species instead of @inheritParams get_n_species.
Updated the NEWS.md file to reflect the deprecation/defunct of several functions, the introduction of new replacements and new citation file.
Other code improvements
Simplified get_n_individuals() and get_n_obs() functions by removing the species parameter and associated logic: we do not filter anymore within such functions, only via filter_observations(). IMPORTANT: these functions are still not finalized and do not follow the new data standard still. So, they will fail or return a non tested result.
This pull request includes several changes to the codebase, focusing on:
n_species()
and its testsFinalizing
n_species()
and its testsUp to now, tests were not really taken into account as we were way far from getting the functions ready to the new format. From this PR we can start using them 🥳 as the very first function,
n_species()
, is ready! So, please rundevtools::test(filter = "n_species")
as check. Its related tests have been simplified without losing testing power. Notice that we only consider event based observations for the standard functions of camtraptor v1.0.0 (#332).Deprecation of functions
get_species()
function in favor oftaxa()
(fix #343)get_scientific_name()
andcheck_species()
functions are defunct in favor oftaxa()
(fix #235). So,check_species()
andget_scientific_name()
functions are moved todefunct.R
.Metadata
CITATION.cff
(fix #345) (usingcffr::cff_write()
).Documentation updates
n_species
instead of the deprecatedget_species
. This has been done by using@inheritParams n_species
instead of@inheritParams get_n_species
.NEWS.md
file to reflect the deprecation/defunct of several functions, the introduction of new replacements and new citation file.Other code improvements
get_n_individuals()
andget_n_obs()
functions by removing thespecies
parameter and associated logic: we do not filter anymore within such functions, only viafilter_observations()
. IMPORTANT: these functions are still not finalized and do not follow the new data standard still. So, they will fail or return a non tested result.