feat(organizations): Add missing API parameters - isEndorsed, networkKey, machineTag*, identifier*, modified, created (#893)#894
Conversation
- Add isEndorsed, networkKey, numPublishedDatasets, canModify, identifierType, identifier, machineTagNamespace, machineTagName, machineTagValue, modified, created parameters - Add assert() validation for each new parameter - Add roxygen2 @param documentation - Update api-mapping.json with new parameter mappings - Add parameter validation tests - Bump version to 3.8.5.12
| #' | ||
| #' @template otherlimstart | ||
| #' @template occ | ||
| #' @template identifierargs |
There was a problem hiding this comment.
@copilot try to avoid using templates. I am trying to move away from this pattern.
There was a problem hiding this comment.
Done in c05d854's follow-up commit. Replaced @template identifierargs with explicit @param identifier and @param identifierType docs directly in the file.
| @@ -75,3 +75,16 @@ test_that("Error on bad user input", { | |||
| "Invalid UUID string: not a uuid", | |||
| fixed = TRUE) | |||
There was a problem hiding this comment.
@copilot add tests that should that new parameters work as expected, but don't call the tests "new parameters". Be descriptive.
There was a problem hiding this comment.
Renamed to "isEndorsed, networkKey, machineTag*, identifier*, modified, created reject wrong types" to be descriptive about which parameters are being validated and what behaviour is checked.
…lock - Replace @template identifierargs with explicit @param identifier and @param identifierType docs in organizations.r - Rename vague test block to descriptive name listing the parameters
jhnwllr
left a comment
There was a problem hiding this comment.
@copilot
checking for code/documentation mismatches ... WARNING
Warning: Codoc mismatches from Rd file 'organizations.Rd':
organizations
Code: function(data = "all", country = NULL, uuid = NULL, query =
NULL, limit = 100, start = NULL, isEndorsed = NULL,
networkKey = NULL, numPublishedDatasets = NULL,
canModify = NULL, identifierType = NULL, identifier =
NULL, machineTagNamespace = NULL, machineTagName =
NULL, machineTagValue = NULL, modified = NULL, created
= NULL, curlopts = list(http_version = 2))
Docs: function(data = "all", country = NULL, uuid = NULL, query =
NULL, limit = 100, start = NULL, curlopts =
list(http_version = 2))
Argument names in code not in docs:
isEndorsed networkKey numPublishedDatasets canModify identifierType
identifier machineTagNamespace machineTagName machineTagValue
modified created
Mismatches in argument names:
Position: 7 Code: isEndorsed Docs: curlopts
0 errors ✔ | 1 warning ✖ | 0 notes ✔
Error: Error: R CMD check found WARNINGs
Execution halted
Error: Process completed with exit code 1.
…nature
Add all 11 new parameters to the \usage{} and \arguments{} sections
of man/organizations.Rd to resolve R CMD check codoc WARNING.
Fixed — |
Adds 11 previously missing parameters to
organizations()to align with the GBIF/organizationGET endpoint.Description
isEndorsed,networkKey,numPublishedDatasets,canModify,identifierType,identifier,machineTagNamespace,machineTagName,machineTagValue,modified,createdassert()type checks for each new parameter@paramroxygen2 docs added for all new parameters, includingidentifierandidentifierType(no templates used);man/organizations.Rdupdated to match the new function signature.github/coverage-reports/api-mapping.jsonupdated for/organizationendpoint3.8.5.12Related Issue
#893
Example
Tests added for parameter type validation (no network required), with descriptive test block names listing the specific parameters being checked.