Repository navigation
Add optional data dictionaries and refresh Connect pin previews - #364
mconflitti-pbc wants to merge 4 commits into
Conversation
nealrichardson
left a comment
There was a problem hiding this comment.
Why optional? Why not just add data dict as a dependency and make it default on?
|
I'd prefer the addition of data dictionaries to be optional, to not enforce this behavior/break folks existing workflows. What is the motivation for enforcing this always? |
I saw that you had to install the package with extras like I haven't looked into the specifics in the code so forgive me if I misunderstand some details. But my expectation was that this is adding an additional yaml file into the pin bundle. There already are other files in the bundle right? I would expect there is a way we can turn this on such that it wouldn't break existing workflows. I'm not insisting it must be default on today, it's fine if we want to proceed with it opt-in and consider flipping the default later. But I would think that default on is the direction we want to be going, otherwise I'm skeptical that the feature will get used at all. |
Pins can attach a portable data dictionary to a pin and include a browsable dictionary in its Posit Connect preview. The publisher runs the optional
data-dictCLI before uploading the bundle; Connect serves the resulting HTML alongside the existing data and metadata.data_dict=Trueto draft from a DataFrame inpin_write()or Parquet files inpin_upload(). Supply an authored YAML file path, or YAML text inmetadata["data_dict"], to attach an existing dictionary. Stored dictionaries omit table source paths.pins[data-dict]extra, with an executable on PATH as a fallback. Handle pip wheels with a missing execute bit and require supported CLI version0.0.3. Ordinary pins do not require the CLI; attaching authored YAML to a folder board works without it.force_identical_write=Trueand explain skipped dictionary-only edits when the data hash is unchanged. Reject reserved preview filenames, report file/CLI errors throughPinsError, and clean up failed renders.Validation: 47 dictionary/preview tests passed with the CLI required; 42 existing folder-board tests passed (2 unrelated skips). Ruff lint and format checks passed. A clean macOS pip install reproduced the wheel permission issue and the CLI fix succeeded.
Redeployed ordinary and combined Parquet previews from both local branches to Connect. Downloaded the active bundles, verified they match the builds, and read all four pins back in both languages. Browser checks confirmed light theme, direct metadata display, interactive column profiles, and blocked executable dictionary links. Python CI exercises the optional extra on Linux, macOS, and Windows; R CI exports the installed CLI path into R CMD check. Full CI runs on this PR; CRAN readiness has not been established.