Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ability to skip checks against schema in as_config() checks #191

Open
annakrystalli opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@annakrystalli
Copy link
Member

annakrystalli commented Nov 19, 2024

Backrgound

Currently there are a bunch of check performed during as_config().

  1. Check the schema_id prefix url
  2. Check the schema_id version is a valid released version (requires internet connection - annoying during new schema version development)
  3. Check config level 1 property names against schema (requires internet connection and valid schema_id to download schema)
  4. Check that the schema file name can be parsed correctly to extract the config type

Performing these checks when coercing a list in R seems sensible, but requiring an internet connection and re-performing checks that should have been performed vi validate_config() to just load a json config file seems excessive.

Proposal

  • At the very least I feel we should be able to bypass checks 2 & 3 with a skip_schema_checks argument in as_config() that is set to TRUE when using as_config() as part of read_config_file().
  • Check 3 should only deploy if check 2 is successful

Open to suggestions for cleaner more intuitive approaches.

Relatedly, if any errors are thrown in as_config(), the read_config() and read_config_file() still fail to return a config class object, however they now it do so silently by default. Is this the desired behaviour? If not, what is the desired behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant