Skip to content

test(get.R): add snapshot testing workflow - #126

Merged
florisvdh merged 4 commits into
dev_nextreleasefrom
setup-snapshot-testing
Jul 15, 2026
Merged

test(get.R): add snapshot testing workflow#126
florisvdh merged 4 commits into
dev_nextreleasefrom
setup-snapshot-testing

Conversation

@droomelotdegendt

Copy link
Copy Markdown
Collaborator

Goal

Introduce a testing setup for the database functions (get_locs, get_xg3, get_chem). While running these tests, a dbplyr query translation error was discovered and subsequently fixed.

Key Changes

Main goal: snapshot testing setup (tests/testthat)
  • Implemented an automated testing structure using locally stored CSV snapshots to ensure code stability without exposing confidential data to a public repository.
  • Added documentation on how to run these tests for future contributors and reviewers.
Bonus: bugfix discovered during testing
  • Fixed a bug in get_chem where modern dbplyr versions generated corrupted SQL expressions by replacing the legacy raw sql() string with native dplyr::between() syntax.

@droomelotdegendt
droomelotdegendt changed the base branch from main to dev_nextrelease July 9, 2026 09:32

@florisvdh florisvdh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!!! Thank you very much for providing a consistent testing framework that conforms with testthat & tidyverse guidelines, and for adding awesome documentation! 🚀

@florisvdh
florisvdh merged commit 1e85275 into dev_nextrelease Jul 15, 2026
3 checks passed
@florisvdh
florisvdh deleted the setup-snapshot-testing branch July 15, 2026 06:41
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.

2 participants