Add shinymeta-backed QMD report module and capture import metadata#3
Add shinymeta-backed QMD report module and capture import metadata#3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd4785f988
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| device = rlang::`%||%`(metadata$device, NA_character_), | ||
| tz = rlang::`%||%`(metadata$tz, NA_character_), |
There was a problem hiding this comment.
Preserve device/timezone when updating metadata
The report pulls device and tz from dataset$metadata, but datasetDetailServer() overwrites metadata with only variable fields when the user saves variable details (see R/datasetDetail.R lines 98–101). After any edit in Prepare, the report will show “Not recorded” for device/time zone even though those values were captured at import, so the report loses key provenance. Consider preserving existing metadata fields when saving or sourcing device/tz from a stable location.
Useful? React with 👍 / 👎.
| import_call <- build_import_call( | ||
| device = input$device, | ||
| file_names = input$file$name, | ||
| tz = input$tz, |
There was a problem hiding this comment.
Use actual imported file paths in recorded call
The report’s reproducible call is built from input$file$name, but the actual import uses filename = new_names() (temp directory paths; see R/import.R around lines 432–435). This means the reported call will not match the real call and won’t run unless the working directory happens to contain those filenames. If the goal is “exact import calls,” capture the same filenames that were used for the import.
Useful? React with 👍 / 👎.
Motivation
shinymetato capture/expand import call expressions for reproducible workflows without adding new runtime dependencies beyondshinymeta.Description
reportUIandreportServerthat produces a downloadable QMD with an overview and per-dataset details; implementation added inR/report.R.import_specsand ashinymetaimport_callvia a new helperbuild_import_callinR/import.R.R/LightLogWeb-app.Rand ensure test data also includeimport_specs/import_callinR/dataset_manager.R.build_report_data), render QMD content (build_report_qmd), and format values and expanded import calls viashinymeta::expandChainandrlang::expr_deparse.shinymetatoDESCRIPTIONImports and include a basic test filetests/test-report.Rthat asserts multi-dataset report content is produced by the helpers.Testing
tests/test-report.Rthat constructs two synthetic datasets and assertsbuild_report_data()andbuild_report_qmd()contain the expected dataset counts and names.Rwas not available, so no runtime test results are available.Codex Task