Skip to content

Fix Bioconductor packaging gaps, live-API bugs, and rename to camelCa… - #1

Open
jananiravi wants to merge 4 commits into
mainfrom
fix/bioconductor-packaging-and-live-api-bugs
Open

Fix Bioconductor packaging gaps, live-API bugs, and rename to camelCa…#1
jananiravi wants to merge 4 commits into
mainfrom
fix/bioconductor-packaging-and-live-api-bugs

Conversation

@jananiravi

@jananiravi jananiravi commented Aug 20, 2026

Copy link
Copy Markdown
Member

Fixed Bioconductor packaging gaps, live-API bugs, and rename to camelCase API

📦 Packaging (R CMD check --as-cran: 4 notes -> 0):

  • Fix LICENSE to the 2-line DCF stub required by "MIT + file LICENSE"; move full text to LICENSE.md and .Rbuildignore it
  • Drop unused Imports (jsonlite, stringr)
  • Add @importFrom rlang .data to resolve undefined-global NOTE
  • Add vignettes/coiCheckR.Rmd (Bioconductor requires at least one)

🐞 Bug fixes (found via live PubMed/NIH RePORTER calls):

  • buildCoauthorEdges(): normalize PubMed's inconsistently-abbreviated ForeName field to initials before matching, fixing silent false negatives in direct co-authorship detection
  • Replace ifelse() with dplyr::if_else() in 3 spots (coauthor_network.R, coi_report.R) to fix a type-instability crash when an author's co-authorship edges are empty
  • reporterSearchPi(): parse "Last, First" into first_name/last_name fields instead of any_name, which silently returns zero rows for the comma format on the live RePORTER API (also more precise than the any_name substring fallback for bare surnames)

API rename (Bioconductor coding style: lowerCamelCase functions):

  • Rename all exported functions (checkCoi, buildCoauthorEdges, pmSearchAuthor, etc.); S3 class coi_report -> coiReport; variables stay snake_case; NAMESPACE/man regenerated

🧹 Cleanup:

  • Remove real third-party names from docs/tests/vignette; use generic placeholders or the author's own consented example (Ravi J / Krishnan A) as live ground truth
  • Apply styler::style_pkg(); fix all lintr line-length findings (lint_package() now clean)

Verified: 20/20 offline tests, 7/7 live-API tests, R CMD check 0 errors/0 warnings/0 notes

…se API

Packaging (R CMD check --as-cran: 4 notes -> 0):
- Fix LICENSE to the 2-line DCF stub required by "MIT + file LICENSE";
  move full text to LICENSE.md and .Rbuildignore it
- Drop unused Imports (jsonlite, stringr)
- Add @importFrom rlang .data to resolve undefined-global NOTE
- Add vignettes/coiCheckR.Rmd (Bioconductor requires at least one)

Bug fixes (found via live PubMed/NIH RePORTER calls):
- buildCoauthorEdges(): normalize PubMed's inconsistently-abbreviated
  ForeName field to initials before matching, fixing silent false
  negatives in direct co-authorship detection
- Replace ifelse() with dplyr::if_else() in 3 spots (coauthor_network.R,
  coi_report.R) to fix a type-instability crash when an author's
  co-authorship edges are empty
- reporterSearchPi(): parse "Last, First" into first_name/last_name
  fields instead of any_name, which silently returns zero rows for the
  comma format on the live RePORTER API (also more precise than the
  any_name substring fallback for bare surnames)

API rename (Bioconductor coding style: lowerCamelCase functions):
- Rename all exported functions (checkCoi, buildCoauthorEdges,
  pmSearchAuthor, etc.); S3 class coi_report -> coiReport; variables
  stay snake_case; NAMESPACE/man regenerated

Cleanup:
- Remove real third-party names from docs/tests/vignette; use
  generic placeholders or the author's own consented example
  (Ravi J / Krishnan A) as live ground truth
- Apply styler::style_pkg(); fix all lintr line-length findings
  (lint_package() now clean)

Verified: 20/20 offline tests, 7/7 live-API tests, R CMD check
0 errors/0 warnings/0 notes

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jananiravi
jananiravi requested a review from eboyer221 August 20, 2026 19:13
This update adds roxygen examples and regenerated man pages across the public API, makes the second-degree COI check accept an optional affiliation filter to reduce same-name false positives, and updates the live API test/vignette guidance to use placeholder names behind explicit opt-in. It also bumps the package version and refreshes the Bioc metadata.
- Introduced robust handling for upstream API failures and tidy internal/API changes.
- Added utils.R (.markSourceFailed, .sourceFailed, .classifyCoiStatus) to tag and classify failed evidence sources; propagate failure flags from PubMed (pmSearchAuthor/pmFetchAuthors) and NIH RePORTER (reporterSearchPI) calls so checkCoi/checkCoiBatch return a status and sources_failed.
- Standardized column names (PMID/DOI), renamed functions (setNCBIKey, reporterSearchPI), refactored parsing helpers, updated NAMESPACE, docs, NEWS, and tests (including new status tests).
- Also added stringr/rlang usage and an `.Rproj` file.
This commit adds pkgdown site configuration and GitHub Pages publishing, updates the package URLs, and ensures live API examples are gated behind \donttest. It also hardens PubMed/NIH matching by canonicalizing names, tolerating full forenames and middle-initial variation, supporting affiliation/org-name filtering for common surnames, and validating the new behavior with regression tests and precompiled vignettes.

@eboyer221 @amcim still need help with vignette + gh pages set-up. running into issues.
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