cook-build 0.4.2__tar.gz → 0.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cook-build-0.4.2 → cook-build-0.4.3}/PKG-INFO +1 -1
- {cook-build-0.4.2 → cook-build-0.4.3}/cook/__main__.py +4 -2
- {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/PKG-INFO +1 -1
- {cook-build-0.4.2 → cook-build-0.4.3}/setup.py +1 -1
- {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_main.py +1 -1
- {cook-build-0.4.2 → cook-build-0.4.3}/LICENSE +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/README.rst +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook/__init__.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook/actions.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook/contexts.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook/controller.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook/manager.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook/task.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook/util.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/SOURCES.txt +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/dependency_links.txt +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/entry_points.txt +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/requires.txt +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/top_level.txt +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/setup.cfg +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_actions.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_contexts.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_controller.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_examples.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_manager.py +0 -0
- {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_util.py +0 -0
|
@@ -45,14 +45,15 @@ class Command:
|
|
|
45
45
|
Abstract base class for commands.
|
|
46
46
|
"""
|
|
47
47
|
NAME: Optional[str] = None
|
|
48
|
+
ALLOW_EMPTY_PATTERN: bool = False
|
|
48
49
|
|
|
49
50
|
def configure_parser(self, parser: argparse.ArgumentParser) -> None:
|
|
50
51
|
parser.add_argument("--re", "-r", action="store_true",
|
|
51
52
|
help="use regular expressions for pattern matching instead of glob")
|
|
52
53
|
parser.add_argument("--all", "-a", action="store_true",
|
|
53
54
|
help="include tasks starting with `_` prefix")
|
|
54
|
-
parser.add_argument("tasks", nargs="*",
|
|
55
|
-
help="task or tasks to execute as regular expressions")
|
|
55
|
+
parser.add_argument("tasks", nargs="*" if self.ALLOW_EMPTY_PATTERN else "+",
|
|
56
|
+
help="task or tasks to execute as regular expressions or glob patterns")
|
|
56
57
|
|
|
57
58
|
def execute(self, controller: Controller, args: argparse.Namespace) -> None:
|
|
58
59
|
raise NotImplementedError
|
|
@@ -103,6 +104,7 @@ class LsCommand(Command):
|
|
|
103
104
|
List tasks.
|
|
104
105
|
"""
|
|
105
106
|
NAME = "ls"
|
|
107
|
+
ALLOW_EMPTY_PATTERN = True
|
|
106
108
|
|
|
107
109
|
def configure_parser(self, parser: argparse.ArgumentParser) -> None:
|
|
108
110
|
parser.add_argument("--stale", "-s", action="store_true", help="only show stale tasks")
|
|
@@ -15,7 +15,7 @@ def test_blah_recipe_run(tmp_wd: Path) -> None:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
@pytest.mark.parametrize("patterns, expected", [
|
|
18
|
-
([], ["create_source", "compile", "link", "run"]),
|
|
18
|
+
(["*"], ["create_source", "compile", "link", "run"]),
|
|
19
19
|
(["c*"], ["create_source", "compile"]),
|
|
20
20
|
(["--re", r"^\w{3}\w?$"], ["link", "run"]),
|
|
21
21
|
(["run"], ["run"]),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|