Repository navigation
Remove trait filters made redundant by traits.build#311 - #886
Merged
Merged
Conversation
Six long-format datasets filtered their trait column in custom_R_code only to keep dataset_test() from failing on traits with no `traits` entry. With traitecoevo/traits.build#311 the build and the test both leave those rows out, so the filters do nothing: each dataset builds identical traits, excluded_data, contexts, locations and methods, and dataset_test() reports the same failures, with and without them. Steart_2009 keeps its source_id filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With traitecoevo/traits.build#311,
dataset_test()no longer fails a long-format dataset whose trait column holds traits with notraitsentry; the build has always left those rows out. Six datasets filtered their trait column incustom_R_codeonly to avoid that failure. This removes those filters.custom_R_codewas only the filter; now.natrait %in%condition removed; thesource_idfilter staysfilter(!trait_name %in% c("leaf_lamina_division"))removed (that trait isn't mapped)Verified: each dataset builds identical
traits,excluded_data,contexts,locationsandmethodswith and without its filter, anddataset_test()reports the same failures (0 for all but NHNSW_2024, which has 1 either way).Kept, because they aren't redundant:
longevityrows out, andlongevityis mapped.dataset_test()then fails its context check, because the unmapped rows carry a context value (leaf phase: intermediate) not incontexts. That check looks at every row of the data, including rows the build drops.Merge after traitecoevo/traits.build#311: without it, Bell_1995, Bignell_1997, Johnson_1980, Saunders_2024 and Steart_2009 fail
dataset_test()on their unmapped traits.🤖 Generated with Claude Code