Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
44946b1
chore(setup): scaffold compound-gpid docs structure and update .gitig…
randrescastaneda Mar 5, 2026
c895d15
refactor(core): phase A dead code removal and TEMP marker conversion
randrescastaneda Mar 5, 2026
9315844
test(core): add snapshot generation script and baseline regression te…
randrescastaneda Mar 5, 2026
afa9c64
update cg system
Mar 5, 2026
ddfc7e2
code to generate testing data
Mar 5, 2026
59e7a3b
chore(tests): clean up snapshot generation script and add 9th snapsho…
Mar 5, 2026
d5e9c47
refactor(core): remove deprecated group_by blocks from pip_new_lineup…
Mar 5, 2026
b883746
refactor(core): split utils.R into focused files (B1)
Mar 5, 2026
4d43587
refactor(core): deduplicate pip_new_lineups/pip_old_lineups shared ta…
Mar 5, 2026
994dea3
refactor(core): move load_data_list to utils-pipdata, document proces…
Mar 5, 2026
61b1cd6
fix(core): remove group_by forwarding to pip_new_lineups in pip(); fi…
Mar 5, 2026
b66e105
feat(validation): add validate_lkup() helper and entry-point guards (…
randrescastaneda Mar 5, 2026
f92ba5b
fix(review): move validate_lkup() before lkup field access (P1); fix …
randrescastaneda Mar 6, 2026
1b763ce
test(fgt_cumsum): add unit tests for dict encoding, format_lfst, get_…
randrescastaneda Mar 6, 2026
b85fd72
test(compute_fgt): add 9 edge-case tests for process_dt, watts, weigh…
randrescastaneda Mar 6, 2026
04705f7
test(add_agg_stats): add unit tests for negative_to_na and zeros_to_n…
randrescastaneda Mar 6, 2026
d4c24b4
test(utils-pipdata): add assign_stat edge cases (named vector, missin…
randrescastaneda Mar 6, 2026
167de54
test(utils-stats): add add_dist_stats and get_mean_median new-path te…
randrescastaneda Mar 6, 2026
683d1a9
test(utils-lkup): add unit tests for select_country, select_reporting…
randrescastaneda Mar 6, 2026
ae328af
test(create_lkups): add tests for ifel_isnull, use_new_lineup_version…
randrescastaneda Mar 6, 2026
1995f01
test(additional_indicators): add unit tests for get_additional_indica…
randrescastaneda Mar 6, 2026
48c162a
test(censor_rows): add unit tests for censor_stats, estimate_type log…
randrescastaneda Mar 6, 2026
be7350f
chore(tests): cleanup stale test files, extract pip/pip_grp unit test…
randrescastaneda Mar 6, 2026
b487a75
test(integ): add integration tests for survey years, lineup years, re…
randrescastaneda Mar 6, 2026
308aad3
test(helper): add shared helper-lkup.R infrastructure (Step 0)
randrescastaneda Mar 6, 2026
70179bb
fix(tests): address all cg-review findings (P1+P2+P3)
randrescastaneda Mar 9, 2026
dff663c
move to qs2
randrescastaneda Mar 9, 2026
bc1a42d
add data testing to git
randrescastaneda Mar 17, 2026
b7d200b
add data testing
randrescastaneda Mar 17, 2026
12b97fb
Increment version number to 1.5.0
randrescastaneda Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
^renv$
^renv\.lock$
^\.cg-docs$
^pipapi\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
Expand Down
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,30 @@ logs/
demo.duckdb*
/doc/
/Meta/

# Compound GPID (junction + backup - neither should be committed)
.github
.github.bak


# Compound GPID local config (user-specific, never commit)
compound-gpid.local.md

# Compound GPID managed items (junctions + copied file + knowledge base - do not commit)
.github/prompts/
.github/skills/
.github/agents/
.github/instructions/
.github/copilot-instructions.md
.cg-docs/

tests/testdata/snapshots/snap_agg_all_2015.rds
tests/testdata/snapshots/snap_pip_ago_2000.rds
tests/testdata/snapshots/snap_pip_ago_all.rds
tests/testdata/snapshots/snap_pip_ago_fg.rds
tests/testdata/snapshots/snap_pip_ago_multi_pl.rds
tests/testdata/snapshots/snap_pip_ago_popshare.rds
tests/testdata/snapshots/snap_pip_all_2015.rds
tests/testdata/snapshots/snap_pip_chn_2018.rds
tests/testdata/snapshots/snap_pip_wld_pov.rds
tests/testdata/snapshots/snapshot_manifest.txt
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pipapi
Title: API for the Poverty and Inequality Platform
Version: 1.4.2.9000
Version: 1.5.0
Authors@R:
c(person(given = "Tony",
family = "Fujs",
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pipapi (development version)
# pipapi 1.5.0

# pipapi 1.4.2
* fix bugs
Expand Down
4 changes: 4 additions & 0 deletions R/add_agg_stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ ag_average_poverty_stats <- function(df, return_cols) {
}


#' Replace a vector with NA_real_ if it contains any negatives or NAs
#' @noRd
negative_to_na <- function(x) {
if (any(x < 0, na.rm = TRUE) || anyNA(x)) {
NA_real_
Expand All @@ -151,6 +153,8 @@ negative_to_na <- function(x) {
}
}

#' Replace a vector with NA_real_ if it contains any zeros
#' @noRd
zeros_to_na <- function(x) {
if (any(x == 0, na.rm = TRUE)) {
NA_real_
Expand Down
Loading