Deprecate NASIS column name aliases #369
Merged
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.
This PR introduces soft deprecation of aliases to address NASIS portion of #242; it supersedes #368 which is a branch that will only be used for testing that various soilDB usages in the wild are working without aliases.
The development and next CRAN release will have warning messages and duplicate columns. In order to ensure that a particular script is compatible with the future removal of aliases, be sure it runs with an install from the "remove-aliases" branch:
For the deprecation of column aliases, a warning message will be issued the first time an affected function is called in a session. e.g.
Subsequent calls to functions in the same session will not display the message. Higher level functions like
fetchNASIS()
andfetchVegdata()
will dump quite a few of these--one for each lower-level function that has aliases currently in use, which is kindof annoying but should make the fact that things are changing fairly obvious to users.The message gives instructions on result column names that need to be changed. For now the old aliases and the new physical column names will be duplicated in the result, so nothing will "break" and users can switch to the suggested names without disruptions other than the messages.
To prevent the alias warning messages from displaying in future sessions, there is an option that can be set,
options(soilDB.warn.aliases=FALSE)
, which we may want to use in some cases to limit the more verbose output that will show up in tutorials or training materials. I suggest setting this option in an invisible code block so the user does not turn off the messages in their own session, but the messages are omitted from the knitted output.I will create a webpage on the ncss-tech.github.io repository with some additional information about the justification and overall scope of this change, with links to NASIS metadata, etc. to add to the message.See https://ncss-tech.github.io/AQP/soilDB/bulletins/2025.01-1-soilDB-NASIS-column-aliases.html