-
Notifications
You must be signed in to change notification settings - Fork 4
Update sample tax bills for 2024 #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jeancochrane
merged 19 commits into
2024-data-update
from
jeancochrane/update-sample-tax-bills-for-2024
Apr 28, 2026
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9a4f8a4
Update unit tests for new 2024 data and functions
jeancochrane f05e905
Update sample tax bills for 2024
jeancochrane ef48dc8
Fix a few final lines of `test-tax_bill.R`
jeancochrane 28caaab
Add to vetdis calc in tests
jeancochrane dadbe77
Merge branch '2024-data-update' into jeancochrane/72-update-unit-test…
jeancochrane b0684df
Merge branch 'jeancochrane/72-update-unit-tests-to-include-2024-data-…
jeancochrane dac3bb4
Further updates to sample tax bills, and test contents of sample_tax_…
jeancochrane cf2a2a0
Update `tax_bill` test to account for fund-level reporting differenci…
jeancochrane e0dcd36
Update `test-tax_bill.R` to finish 2024 sample bill tests
jeancochrane ea1c91c
Make sure `test-sample_tax_bills_summary.R` always runs relative to t…
jeancochrane 3f707fc
Split agency lookup snapshot tests out into dedicated test
jeancochrane 0746750
Merge branch '2024-data-update' into jeancochrane/update-sample-tax-b…
jeancochrane d636e00
Update `lookup_agency` snapshot tests for 2024 data
jeancochrane b22a117
Fail loudly if `sample_tax_bills` directory doesn't exist in tests
jeancochrane e984b74
Update `test-sample_tax_bills_summary.R` so that tests can run on bui…
jeancochrane cc0752c
Small tweak and add docs to `tax_bill` comparison test
jeancochrane 6df55bb
Add some uncertainty to language about future agencies in `sample_tax…
jeancochrane ad73e8b
Clarify the way `name_priority` works for transit TIFs in `sample_tax…
jeancochrane 7b3104d
Better comments on `lookup_agency()` snapshot tests, plus make them f…
jeancochrane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Git LFS file not shown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| context("Test sample_tax_bills_summary") | ||
|
jeancochrane marked this conversation as resolved.
|
||
|
|
||
| ##### TEST sample_tax_bills_summary ##### | ||
|
|
||
| library(dplyr) | ||
|
|
||
| ptaxsim_db_conn <- DBI::dbConnect( | ||
| RSQLite::SQLite(), | ||
| Sys.getenv("PTAXSIM_DB_PATH") | ||
| ) | ||
| assign("ptaxsim_db_conn", ptaxsim_db_conn, envir = .GlobalEnv) | ||
|
|
||
| # Test to make sure we have added sample tax bills for the latest year | ||
| test_that("max data year matches max year for sample tax bills", { | ||
| max_year <- DBI::dbGetQuery( | ||
| ptaxsim_db_conn, | ||
| "SELECT data_year_max FROM metadata" | ||
| ) %>% | ||
| pull() | ||
|
|
||
| expect_equal(max(sample_tax_bills_summary$year), max_year) | ||
| expect_equal(max(sample_tax_bills_detail$year), max_year) | ||
| }) | ||
|
|
||
| # Test to make sure we have updated both the summary and detail sample bills | ||
| test_that("sample_tax_bills_summary PIN-years match sample_tax_bills_detail", { | ||
| summary_pin_years <- sample_tax_bills_summary %>% | ||
| distinct(year, pin) %>% | ||
| arrange(year, pin) | ||
|
|
||
| detail_pin_years <- sample_tax_bills_detail %>% | ||
| distinct(year, pin) %>% | ||
| arrange(year, pin) | ||
|
|
||
| expect_equal(summary_pin_years, detail_pin_years, ignore_attr = TRUE) | ||
| }) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.