Loading dictionary without all of the required fields doesn't produce an error in `data_source` function

Open Beginner friendly
#473 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python, r, yaml
Domain
backend, data

Research direction

Start by reading the data_source function and trace how it loads the dictionary path provided in the report. Reproduce with a dictionary missing required fields such as $version, tables, and name, then compare the behavior with one validated using the data-dict CLI's validate-spec. Done means invalid dictionaries produce an error or warning instead of loading silently.

Written by the indexing model from the issue text.

Description

What: I manually wrote my data dictionary and omitted several required fields and data_source failed silently/did not produce an error (nor a warning). I figured out that the data dictionary wasn't in the agent context when I was asking the agent about things that it should have had context on from the dictionary. Once I fixed the data dictionary (specifically including $version, tables, name in the dictionary) (I used the data-dict CLI validate-spec to validate the dictionary spec). Then I reloaded the dictionary and it was in the agent's context and answered the questions with that context.

Steps to reproduce the issue:

  1. An example of the beginning of the data dictionary with the missing required fields (my actual dictionary was much longer)
Image
  1. provided path to that data dictionary in the dictionary parameter in the data_source function (which executes without any errors/warnings).
    hikes <- commons::data_source(hikes = hikes_df, dictionary = here::here("dictionaries/hikes_wrong.yaml"))

Environment things for reproducibility:

  • R version: 4.6.1
  • Rstudio version: 2026.10.0 Build 233
  • commons version: 0.1.1
  • OS: Windows 11
Dominant language
Python
Stars
69
Forks
5
Avg merge
5d 13h
Merged PRs (30d)
30

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/commons

All issues in posit-dev/commons

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.