#917 - Integrated the PrimaiteSession into all tests.

- Ran a full pre-commit hook and thus encountered tons of fixes required
This commit is contained in:
Chris McCarthy
2023-06-30 09:08:13 +01:00
parent b6d93ad33f
commit 7b1f889415
62 changed files with 1880 additions and 802 deletions

View File

@@ -5,7 +5,7 @@ from pathlib import Path
import pkg_resources
from primaite import USERS_CONFIG_DIR, getLogger
from primaite import getLogger, USERS_CONFIG_DIR
_LOGGER = getLogger(__name__)
@@ -24,7 +24,9 @@ def run(overwrite_existing=True):
for subdir, dirs, files in os.walk(configs_package_data_root):
for file in files:
fp = os.path.join(subdir, file)
path_split = os.path.relpath(fp, configs_package_data_root).split(os.sep)
path_split = os.path.relpath(fp, configs_package_data_root).split(
os.sep
)
target_fp = USERS_CONFIG_DIR / "example_config" / Path(*path_split)
target_fp.parent.mkdir(exist_ok=True, parents=True)
copy_file = not target_fp.is_file()