From 5aaeb1298987265e312cd4318bea82cade39f085 Mon Sep 17 00:00:00 2001 From: Tsunenobu Kai Date: Sat, 26 Dec 2020 00:51:33 +0900 Subject: Find a parent pyproject.toml from a child directory (#28) Enable running tasks defined in parent pyproject.toml from a child directory. --- .../child_with_pyproject/pyproject.toml | 6 ++++++ .../project_with_tasks_from_child/child_without_pyproject/.gitkeep | 0 tests/fixtures/project_with_tasks_from_child/pyproject.toml | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 tests/fixtures/project_with_tasks_from_child/child_with_pyproject/pyproject.toml create mode 100644 tests/fixtures/project_with_tasks_from_child/child_without_pyproject/.gitkeep create mode 100644 tests/fixtures/project_with_tasks_from_child/pyproject.toml (limited to 'tests/fixtures') diff --git a/tests/fixtures/project_with_tasks_from_child/child_with_pyproject/pyproject.toml b/tests/fixtures/project_with_tasks_from_child/child_with_pyproject/pyproject.toml new file mode 100644 index 0000000..0f5b4a1 --- /dev/null +++ b/tests/fixtures/project_with_tasks_from_child/child_with_pyproject/pyproject.toml @@ -0,0 +1,6 @@ +[tool.poetry] +name = "taskipy" +description = "tasks runner for python projects" + +[tool.taskipy.tasks] +hello = 'echo "hello from child"' diff --git a/tests/fixtures/project_with_tasks_from_child/child_without_pyproject/.gitkeep b/tests/fixtures/project_with_tasks_from_child/child_without_pyproject/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/project_with_tasks_from_child/pyproject.toml b/tests/fixtures/project_with_tasks_from_child/pyproject.toml new file mode 100644 index 0000000..1f29837 --- /dev/null +++ b/tests/fixtures/project_with_tasks_from_child/pyproject.toml @@ -0,0 +1,6 @@ +[tool.poetry] +name = "taskipy" +description = "tasks runner for python projects" + +[tool.taskipy.tasks] +print_current_dir_name = 'python -c "from pathlib import Path; print(Path.cwd().name)"' -- cgit v1.2.3