Skip to content

0.2.2 - #47

Merged
davidycliao merged 8 commits into
masterfrom
0.2.2
Jul 20, 2026
Merged

davidycliao merged 8 commits into
masterfrom
0.2.2

Conversation

@davidycliao

Copy link
Copy Markdown
Owner

No description provided.

davidycliao and others added 8 commits July 20, 2026 00:35
bill_to_network() used several igraph functions (V, V<-, E, membership)
that were not declared via @importFrom, and igraph itself was missing
from DESCRIPTION Imports, so the function would fail at runtime for
users without igraph already loaded. Add tests covering the function's
output structure, top_n selection, and use_all mode.

Also adds accessibility alt-text to logo images, a GIND@NTU link to the
pkgdown homepage, and rebuilds the pkgdown site.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…n_info duplicate

R CMD check --as-cran previously failed with 2 ERRORs:
- checking examples: review_session_info() was defined twice in R/info.R;
  the dead first definition's unguarded example got merged into the Rd
  file's \examples block ahead of the working implementation's \dontrun
  block, so R CMD check ran a live network call. Removed the dead
  duplicate definition (the second, curl-based implementation always won
  at runtime anyway).
- checking tests: numerous tests call the live Legislative Yuan API with
  no guard, so a CRAN check machine hitting a flaky/unreachable endpoint
  would fail the whole check and risk the package being pulled. Added
  skip_on_cran() plus graceful tryCatch-based skips to every
  network-dependent test.

Also switches bill_to_network() off the igraph::get.edgelist() function
deprecated in igraph 2.0, and adds cran-comments.md documenting the
remaining non-ASCII WARNING (Traditional Chinese strings are load-bearing:
they match live API column names and split Chinese legislator name lists,
so escaping or translating them isn't safe to automate) and the
CRAN-machine-only "unable to verify current time" NOTE.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… PDF manual, non-ASCII docs)

win-builder's incoming pretest reported 1 ERROR, 2 WARNINGs, 2-3 NOTEs on
both Windows and Debian. Root causes and fixes:

- LICENSE contained MIT-license boilerplate copy-pasted from an unrelated
  package (flaiR), conflicting with DESCRIPTION's "GPL-3 + file LICENSE".
  Replaced with the standard GPL-3 stub (YEAR/COPYRIGHT HOLDER).

- Authors@R had Chinese-language name fields ("歐噴有限公司", "立法院")
  that made the PDF reference manual fail to build entirely (LaTeX has no
  CJK font support in CRAN's default build). Removed the Chinese, kept the
  English org names. Verified \uXXXX and \enc{}{} do NOT survive Rd-to-
  LaTeX rendering for CJK, so the only real fix is translating all
  roxygen-derived content (title/description/params/examples/return docs)
  across 17 R files (~240 lines) to English. Functionally load-bearing
  Chinese (regex separators, live API column/category names) stays in
  the R code itself, documented in English with a note instead.

- Found two more copy-paste bugs while auditing every roxygen block:
  get_committee_record had a second, fully orphaned doc block (roxygen
  silently discarded it), and get_legislators' docs had a stray
  get_executive_response() example call sitting outside \dontrun{},
  silently hitting a live, unrelated API endpoint on every check.

- DESCRIPTION: removed the invalid 'AS-CRAN' field, reworded Description
  to not start with "The package".

- Fixed the CONDUCT.md link (real path is inst/CONDUCT.md, not repo root)
  and the codecov.io link (redirects to app.codecov.io). Removed
  inst/README.Rmd/.md, a stale v0.1.6-era duplicate of the root README
  that CRAN's URL check was actually scanning instead of the current one.

- Wrapped get_meetings()'s second example in \dontrun{} (was silently
  hitting the live API on every check like the other bugs above) and
  shortened a resulting example line under the 100-char Rd width limit.

R CMD check --as-cran --manual now reports 0 errors, with the PDF manual
building cleanly; see cran-comments.md for the two remaining justified
NOTEs and the non-ASCII WARNING (now confined to functionally load-bearing
Chinese in R code, not documentation).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The skip_if(is.null(result), ...) guards already catch errors via
tryCatch, but the underlying curl/jsonlite connection attempt also
signals a warning before failing, which testthat surfaced as a WARNING
on 6 tests even though they correctly skipped afterward. Wrap each
guarded call in suppressWarnings() so an unreachable API produces a
clean SKIP with no noise.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…odeFactor

The repository's CodeFactor grade (C) is dragged down by vendored/generated
paths it shouldn't be analyzing as source: pkgdown's bundled third-party JS/CSS
(docs/deps/**, minified and inherently "low quality" by static analysis),
RStudio's local notebook cache (.Rproj.user/**), and auto-generated Rd/vignette
output (man/**, inst/doc/**). Add .codefactor.yml to exclude them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@davidycliao
davidycliao merged commit a2e9eb7 into master Jul 20, 2026
6 checks passed
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