Skip to content

Commit 9bef9fc

Browse files
committed
added and started to debug pkg gen
1 parent 6c76ea6 commit 9bef9fc

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

nipype2pydra/pkg_gen/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ def _fields_stub(cls, name, category_class, values=None):
563563

564564
def download_tasks_template(output_path: Path):
565565
"""Downloads the latest pydra-template to the output path"""
566+
output_path.parent.mkdir(parents=True, exist_ok=True)
566567

567568
release_url = (
568569
"https://api.github.com/repos/nipype/pydra-tasks-template/releases/latest"

nipype2pydra/tests/test_pkg_gen.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from nipype2pydra.cli.pkg_gen import pkg_gen
2+
from conftest import show_cli_trace
3+
4+
5+
def test_pkg_gen(cli_runner, tmp_path):
6+
outputs_dir = tmp_path / "output-dir"
7+
examples_dir = tmp_path / "export-dir"
8+
outputs_dir.mkdir()
9+
10+
result = cli_runner(
11+
pkg_gen,
12+
[
13+
str(outputs_dir),
14+
"--work-dir",
15+
str(tmp_path / "work-dir"),
16+
"--example-packages",
17+
str(examples_dir),
18+
],
19+
)
20+
assert result.exit_code == 0, show_cli_trace(result)

0 commit comments

Comments
 (0)