Skip to content

Only write Tribal layers if they have changed - #1001

Draft
mhweber wants to merge 4 commits into
developfrom
TribalWriteCheck
Draft

Only write Tribal layers if they have changed#1001
mhweber wants to merge 4 commits into
developfrom
TribalWriteCheck

Conversation

@mhweber

@mhweber mhweber commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

This PR addresses #753

  • Only writes Tribal layers if they have changed from what is currently in inst/extdata/Tribal.gpkg layers when TADA_UpdateTribalLayers() is called from MaintenanceScheduled.R.
  • Changed writeLayer in Utilities.R to writeLayerIfChanged to better reflect what the function does.
  • Added an internal function .sf_layer_equal to Utilities.R to compare spatial features for equality.

Note that TADA_UpdateTribalLayers() in MaintenanceScheduled.R will now take a bit longer to run as it evaluates spatial layers against Tribal.gpkg layers to check for any differences.

Pull Request Checklist (convert PR to draft if in progress)

Required

  • Update your branch from the latest develop and resolve any merge conflicts

  • Run devtools::test(), devtools::check(), and devtools::document() locally; ensure tests pass and fix any errors, warnings, or notes. Add new dependencies to DESCRIPTION and document appropriately

  • Add/update vignettes for corresponding changes in functionality, list these under articles in _pkgdown.yml, and ensure added/updated vignettes run and build with proper formatting locally

  • Request review from at least one developer team member (convert PR to ready for review if it was designated as in progress)

Best practices

  • Include a summary of the changes made and relevant context/motivation

  • Link issues to auto-close on merge (use Development sidebar or include "Closes #" in the PR)

  • Refresh inline/block comments for clarity

  • Update roxygen docs and include examples; review help pages

  • Add/update tests in tests/testthat; review the bot's coverage report from test-coverage and confirm all changes are covered

Conditional

  • If there is a bot spelling comment, run spelling::spell_check_package() locally and fix any misspellings; add approved project terms to WORDLIST with spelling::update_wordlist()

  • If tests fail suggesting internal reference files need a refresh, run .TADA_UpdateRefFiles() and .TADA_UpdateExampleData() locally via MaintenanceScheduled.R or trigger the Component File Update GitHub Action

  • If new example data files were added, document them in ExampleData.R and include them in MaintenanceScheduled.R for regular refresh

  • If columns were added/updated, update RequiredCols.R

  • If changes affect other package or the shiny app functions, update those impacted functions accordingly

@mhweber mhweber self-assigned this Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Spelling check failed. Details:

Spelling check failed. Found 1 potential misspelling(s). Note: Run spelling::spell_check_package() locally and fix any misspellings; add approved project terms to WORDLIST with spelling::update_wordlist().

  WORD                  FOUND IN
writeLayerIfChanged   getFeatureLayer.Rd:6,20
                      writeLayerIfChanged.Rd:6,19

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Spelling check failed. Details:

Spelling check failed. Found 1 potential misspelling(s). Note: Run spelling::spell_check_package() locally and fix any misspellings; add approved project terms to WORDLIST with spelling::update_wordlist().

  WORD                  FOUND IN
writeLayerIfChanged   getFeatureLayer.Rd:6,20
                      writeLayerIfChanged.Rd:6,19

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.

1 participant