From 8f377fe40b2c73863d20c4096f5a52d56ebff93e Mon Sep 17 00:00:00 2001 From: Peter Van Dyken Date: Fri, 22 Sep 2023 00:50:15 -0400 Subject: [PATCH] Fix dependency issue blocking pdm test --- ...d_system != 'poetry' %}pyproject.toml{% endif %}.jinja | 4 ++++ snakebids/tests/test_template.py | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/snakebids/project_template/{% if build_system != 'poetry' %}pyproject.toml{% endif %}.jinja b/snakebids/project_template/{% if build_system != 'poetry' %}pyproject.toml{% endif %}.jinja index dc666104..a0f18145 100644 --- a/snakebids/project_template/{% if build_system != 'poetry' %}pyproject.toml{% endif %}.jinja +++ b/snakebids/project_template/{% if build_system != 'poetry' %}pyproject.toml{% endif %}.jinja @@ -30,6 +30,10 @@ requires-python = ">=3.8,<3.12" dependencies = [ "snakemake >= {{ snakemake_version }}", "snakebids >= {{ snakebids_version }}", + {# Explicitely specify numpy version for py38 until snakebids 0.10.x to + work around specification bug causing numpys too high for py38 to be + locked by pdm -#} + "numpy <=1.24.4; python_version < \"3.9\"", ] [project.scripts] diff --git a/snakebids/tests/test_template.py b/snakebids/tests/test_template.py index cb2a3de3..4ca2e846 100644 --- a/snakebids/tests/test_template.py +++ b/snakebids/tests/test_template.py @@ -240,6 +240,12 @@ def test_template_dry_runs_successfully(tmp_path: Path, build: BuildSystems, ven app_name, ], capture_output=True, - check=True, + check=False, ) + try: + cmd.check_returncode() + except Exception as err: + print(cmd.stdout) + print(cmd.stderr, file=sys.stderr) + raise err assert "All set" in cmd.stdout.decode()