Fixing hard-coded file path in inst/extdata#22
Open
amcim wants to merge 3 commits into
Open
Conversation
11 tasks
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.
Description
The included duckdb contained hard-coded file paths based on where it was created when
amRdatawas run. This means it would not work when put into this package'sinst/extdatafolder. Fixes #21What kind of change(s) are included?
4 lines were added. After each connection
DBI::dbExecute(con, sprintf("SET file_search_path='%s'",dirname(parquet_duckdb_path)))is run. This points DuckDB at the directory holding the parquets, so views that reference parquets by bare filename (instead of absolute path) resolve correctly.
Notes
Tested that the views are resolving to the same parquets and the pipeline is reading the same data after the path is made relative
amRdatawill have a related PR that makes sure the created duckdb has relative paths. This is what will now be included inamRmlThis fix is relevant for the goal of having the package being installed through remotes. The permanent solution will be to stored the data on the ExperimentHub package and load it here, rather than store in
inst/extdataFeature (adds or updates new capabilities)
Bug fix (fixes an issue).
Enhancement (adds functionality).
Breaking change (these changes would cause existing functionality to not work as expected).
Checklist
Please ensure that all boxes are checked before indicating that this pull request is ready for review.