Skip to content

Align docs and behavior: address purpose, empty results, validation#85

Closed
frankfarach wants to merge 6 commits into
masterfrom
feature/align-docs-code
Closed

Align docs and behavior: address purpose, empty results, validation#85
frankfarach wants to merge 6 commits into
masterfrom
feature/align-docs-code

Conversation

@frankfarach
Copy link
Copy Markdown
Collaborator

Summary

  • Normalize address_purpose inputs to the API’s uppercase values and add test coverage.
  • Return a typed npi_results object for zero‑record searches.
  • Vectorize npi_is_valid() to accept multiple NPIs.
  • Clarify taxonomy fallback behavior in npi_summarize docs and README.
  • Add Author/Maintainer fields to satisfy R CMD check.

Changes

  • npi_search() accepts case‑insensitive address_purpose and normalizes to LOCATION/MAILING/PRIMARY/SECONDARY.
  • npi_search() returns a structured empty npi_results instead of bare tibble().
  • npi_is_valid() now accepts vectors and returns a logical vector.
  • Docs updated to note taxonomy fallback when no primary is marked.
  • NPI extraction coerced to integer to keep binding stable.

Testing

  • R CMD build .
  • R CMD check npi_0.2.0.9000.tar.gz

Notes

  • No behavior changes beyond the described alignments; existing pipelines should remain compatible.

Accept case-insensitive address_purpose values and normalize to API constants; add unit test for secondary -> SECONDARY.
Allow vector inputs and return logical vectors; add tests for vector validation.
Return a structured npi_results for zero-record searches; keep npi column integer for consistent binding; update empty-result test.
Clarify that npi_summarize falls back to the first taxonomy when no primary is marked; update README and Rd docs.
@frankfarach frankfarach self-assigned this Dec 31, 2025
Document recent changes in NEWS and refresh roxygen output.
@frankfarach frankfarach marked this pull request as draft December 31, 2025 05:55
@frankfarach frankfarach deleted the feature/align-docs-code branch December 31, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant