mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Mark all required fields for config. Throw if no input_* field specified
- Add custom validator to throw if neither input_filter or input_<files|directories> are specified - Set field expecting paths to type Path - Now that default_config isn't used in code. We can update fields in rawconfig to specify whether they're required or not. This lets pydantic validate config file and throw appropriate error
This commit is contained in:
@@ -40,5 +40,5 @@ def test_cli_config_from_file():
|
||||
assert actual_args.config_file == Path('tests/data/config.yml')
|
||||
assert actual_args.regenerate == True
|
||||
assert actual_args.config is not None
|
||||
assert actual_args.config.content_type.org.input_files == ['~/first_from_config.org', '~/second_from_config.org']
|
||||
assert actual_args.config.content_type.org.input_files == [Path('~/first_from_config.org'), Path('~/second_from_config.org')]
|
||||
assert actual_args.verbose == 3
|
||||
|
||||
Reference in New Issue
Block a user