Issue #3: Create NEWS.md documenting version 0.3.2 changes for CRAN
compliance — R requires a news file at submission.
Issue #4: Rename LICENSE.md -> LICENSE per R packaging conventions so the
LGPL-3 license ships correctly in built tarballs. Updated .Rbuildignore to
remove the ^LICENSE\.md$ exclusion and add ^NEWS\.md$.
Issue #5: Add comprehensive test coverage for three previously untested
exported utility functions in tests/testthat/test_utils.R:
- postcode_lookup(): returns correct abbreviations, handles DC/Puerto Rico,
is vectorized, returns NA for unknown states, matches all state.name entries
- race_short_names(): maps all NCES categories correctly, coerces factors to
character, passes through unrecognized values unchanged, handles empty input,
and exhaustively verifies against a reference implementation across every
variant string the function accepts
- get_fips(): errors gracefully when tidycensus is absent with an informative
message; returns correct FIPS codes (MT=30, CA=06) when installed
All 21 new test blocks pass. The pre-existing na_sum quiet=TRUE failure in
test_utils.R line 63 was not introduced by these changes.
R's |> has higher precedence than +, so parentheses ARE required
around the ggplot chain before piping to civilytics_logo():
(ggplot(df, aes(x, y)) + geom_point() + theme_civilytics()) |>
civilytics_logo()
Updated docs, examples, and pipe test accordingly.
- R/colors.R: civilytics_colors named vector (from --cv-* CSS vars on
civilytics.com), three palettes (main/sequential/diverging),
scale_color_civilytics() and scale_fill_civilytics() for ggplot2
- R/fonts.R: auto-loads Inter + Libre Franklin from Google Fonts via
showtext in .onLoad(); exports civilytics_load_fonts() for manual retry
- R/theme.R: wires ggplot2 4.0 ink/paper/accent params into theme_grey()
base, adds title_family + strip_color params; new theme_civilytics_dark()
using navy_dark background and warm off-white text
- R/logo.R: make_logo_grob(variant) accepts "light"/"dark" to select the
white logo for dark-background compositions
- DESCRIPTION: adds showtext, sysfonts; pins ggplot2 >= 4.0.0
- tests/testthat/test_theme.R: full test suite for colors, palettes,
scales, both theme variants, and logo grob variants
- Wrap get_fips/get_stabbr examples in dontrun (tidycensus is Suggests)
- Add .gitea to .Rbuildignore (hidden dir note)
- Add importFrom(datasets, state.abb/state.name) for postcode_lookup
- Remove LazyData: true (no data/ directory)
- Add real R CMD check workflow via Gitea Actions (rocker/r-ver:4.4)
- Remove Jenkinsfile and demo workflow
- Modernize DESCRIPTION: Authors@R, R >= 4.1.0, URL/BugReports fields,
move tidycensus from Imports to Suggests, testthat edition 3
- Fix agresti_coull_interval: correct implementation, export it
- Convert get_fips/get_stabbr to use requireNamespace for tidycensus
- Remove civilytics:: self-reference in rnh()