Browse Source

Add some doc about CLI option and better informative message

merge-requests/8/head
Lucas Verney 5 years ago
parent
commit
6e12490fbd
  1. 3
      doc/0.getting_started.md
  2. 4
      flatisfy/config.py

3
doc/0.getting_started.md

@ -53,6 +53,9 @@ You can pass some command-line arguments to Flatisfy commands, common to all the @@ -53,6 +53,9 @@ You can pass some command-line arguments to Flatisfy commands, common to all the
* `--max-entries N` to overload the `max_entries` value from config.
* `-v` to enable verbose output.
* `-vv` to enable debug output.
* `--constraints` to specify a list of constraints to use (e.g. to restrict
import to a subset of available constraints from the config). This list
should be passed as a comma-separated list.
## Configuration

4
flatisfy/config.py

@ -231,7 +231,9 @@ def load_config(args=None): @@ -231,7 +231,9 @@ def load_config(args=None):
# Handle constraints filtering
if args and getattr(args, "constraints", None) is not None:
LOGGER.info(
"Filtering constraints from config according to CLI argument."
("Filtering constraints from config according to CLI argument. "
"Using only the following constraints: %s."),
args.constraints.replace(",", ", ")
)
constraints_filter = args.constraints.split(",")
config_data["constraints"] = {

Loading…
Cancel
Save