Add package inclusion dir. at the API level
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 29 Jul 2020 14:31:30 +0000 (10:31 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 29 Jul 2020 14:31:30 +0000 (10:31 -0400)
commit7cd4634e4194ec331268a2495b91a43e6ee8ef78
tree93f782b5ff4805b7b28f49552655168a50434cfd
parentc51a558f9dfeed5bfac700b9c1037669bd2de714
Add package inclusion dir. at the API level

This patch adds a `with_package_inclusion_directory` boolean parameter
(true by default) to the barectf.effective_configuration_file() and
barectf.configuration_from_file() functions.

If this new parameter is true, then the package inclusion directory
(`barectf/include/2` or `barectf/include/3`, depending on the
configuration file's version) is appended to the provided inclusion
directories.

This patch moves this logic from the CLI module to the configuration
modules. It is my understanding that users would want to be able to
include package YAML files using only the API. In `cli.py`,
_parse_args() now simply appends the current working directory, so that
the order stays the same:

1. `--include-dir` options, in order.
2. Current working directory.
3. Package inclusion directory.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/cli.py
barectf/config.py
barectf/config_parse.py
barectf/config_parse_common.py
barectf/config_parse_v2.py
barectf/config_parse_v3.py
This page took 0.024567 seconds and 4 git commands to generate.