Skip to content

Issues/names other issues#23

Merged
keatonwilson merged 3 commits intomainfrom
issues/names_other_issues
Mar 15, 2026
Merged

Issues/names other issues#23
keatonwilson merged 3 commits intomainfrom
issues/names_other_issues

Conversation

@keatonwilson
Copy link
Copy Markdown
Collaborator

⏺ Summary

  • Integrate meta table (authorship metadata) into all four collate_*() functions via left_join on dataset_name, making author names and ORCID IDs
    available in collated output
  • Improve collate_soil() categorization — use sensor_location from data_description table instead of heuristics based on individual_id/plot_id
    values, making the individual/plot/study split more robust and explicit
  • Push filters into the database — collate_met() now uses .env$dataset_name for proper tidy evaluation and performs joins lazily inside DuckDB
    before a single collect(), improving performance
  • Prevent duplicate columns — detect and drop overlapping columns between study_site and meta before joining to avoid .x/.y suffixes
  • Suppress lutz warnings — wrap tz_lookup_coords() calls in suppressWarnings() across all collate functions
  • Fix test database paths — use test_path("../..") in tests so get_db_path() resolves correctly regardless of working directory
  • Update vignettes — document the meta table, update core table count from 6 to 7, and note dataset_name column in flag tables
  • Clean up renv.lock — remove the lock file from version control (dependencies managed elsewhere)

Test plan

  • Verify collate_met() returns meta columns (e.g., submitting_author_first_name)
  • Verify collate_chamber_wp() returns meta columns
  • Verify collate_auto_wp() returns meta columns
  • Verify collate_soil() returns meta columns and sensor_location at all three levels
  • Verify sensor_location values match expected levels (Individual, Plot, Whole study)
  • Verify no duplicate columns in joined output
  • Run devtools::check() to confirm no regressions

keatonwilson and others added 3 commits March 2, 2026 20:42
Integrate the new `meta` table (authorship metadata) into all four
collate_*() functions via left join on dataset_name. Update collate_soil()
to use sensor_location from data_description instead of individual_id/plot_id
heuristics for the 3-way split. Update vignettes to document the meta table,
flag table dataset_name column, and updated core table count. Add corresponding
test expectations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s, push filters into DB earlier, fix test db paths
@keatonwilson keatonwilson requested a review from jessicaguo March 3, 2026 23:52
Copy link
Copy Markdown
Member

@jessicaguo jessicaguo left a comment

Choose a reason for hiding this comment

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

Oops, pressed too soon

Comment thread tests/testthat/test-collate.R
Comment thread tests/testthat/test-collate.R
Comment thread vignettes/data-analysis-examples.Rmd
Comment thread vignettes/getting-started.Rmd
@keatonwilson
Copy link
Copy Markdown
Collaborator Author

@jessicaguo merging - will deal with meta table rename in subsequent PRs here and on PSINetDB.

@keatonwilson keatonwilson merged commit cb316e9 into main Mar 15, 2026
@keatonwilson keatonwilson deleted the issues/names_other_issues branch March 15, 2026 17:13
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