Add more steps to pytest, fully remove behave (#1347)

* update yaml loader to new method

* Add config overrides steps to pytest

This requires some patching around the config object, which now happens
in every test.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>

* udpate docs for new tests

* remove behave from deps

* remove feature dir from flake8 checks

* udpate lock file

* disable pip version check (it keeps spamming the pipeline)

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2021-10-09 12:10:08 -07:00 committed by GitHub
parent a98f3f78af
commit 44edb9bdee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
112 changed files with 264 additions and 4814 deletions

View file

@ -40,9 +40,7 @@ def run(args):
original_config = config.copy()
# Apply config overrides
overrides = args.config_override
if overrides:
config = apply_overrides(overrides, config)
config = apply_overrides(args, config)
args = get_journal_name(args, config)
config = scope_config(config, args.journal_name)

View file

@ -1,7 +1,8 @@
from .config import update_config, make_yaml_valid_dict
from argparse import Namespace
# import logging
def apply_overrides(overrides: list, base_config: dict) -> dict:
def apply_overrides(args: Namespace, base_config: dict) -> dict:
"""Unpack CLI provided overrides into the configuration tree.
:param overrides: List of configuration key-value pairs collected from the CLI
@ -11,6 +12,10 @@ def apply_overrides(overrides: list, base_config: dict) -> dict:
:return: Configuration to be used during runtime with the overrides applied
:rtype: dict
"""
overrides = vars(args).get("config_override", None)
if not overrides:
return base_config
cfg_with_overrides = base_config.copy()
for pairs in overrides: