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.
Files changed (26) hide show
  1. {cook-build-0.4.2 → cook-build-0.4.3}/PKG-INFO +1 -1
  2. {cook-build-0.4.2 → cook-build-0.4.3}/cook/__main__.py +4 -2
  3. {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/PKG-INFO +1 -1
  4. {cook-build-0.4.2 → cook-build-0.4.3}/setup.py +1 -1
  5. {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_main.py +1 -1
  6. {cook-build-0.4.2 → cook-build-0.4.3}/LICENSE +0 -0
  7. {cook-build-0.4.2 → cook-build-0.4.3}/README.rst +0 -0
  8. {cook-build-0.4.2 → cook-build-0.4.3}/cook/__init__.py +0 -0
  9. {cook-build-0.4.2 → cook-build-0.4.3}/cook/actions.py +0 -0
  10. {cook-build-0.4.2 → cook-build-0.4.3}/cook/contexts.py +0 -0
  11. {cook-build-0.4.2 → cook-build-0.4.3}/cook/controller.py +0 -0
  12. {cook-build-0.4.2 → cook-build-0.4.3}/cook/manager.py +0 -0
  13. {cook-build-0.4.2 → cook-build-0.4.3}/cook/task.py +0 -0
  14. {cook-build-0.4.2 → cook-build-0.4.3}/cook/util.py +0 -0
  15. {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/SOURCES.txt +0 -0
  16. {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/dependency_links.txt +0 -0
  17. {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/entry_points.txt +0 -0
  18. {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/requires.txt +0 -0
  19. {cook-build-0.4.2 → cook-build-0.4.3}/cook_build.egg-info/top_level.txt +0 -0
  20. {cook-build-0.4.2 → cook-build-0.4.3}/setup.cfg +0 -0
  21. {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_actions.py +0 -0
  22. {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_contexts.py +0 -0
  23. {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_controller.py +0 -0
  24. {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_examples.py +0 -0
  25. {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_manager.py +0 -0
  26. {cook-build-0.4.2 → cook-build-0.4.3}/tests/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cook-build
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Requires-Python: >=3.8
5
5
  Description-Content-Type: text/x-rst
6
6
  License-File: LICENSE
@@ -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")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cook-build
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Requires-Python: >=3.8
5
5
  Description-Content-Type: text/x-rst
6
6
  License-File: LICENSE
@@ -14,7 +14,7 @@ long_description = long_description \
14
14
 
15
15
  setup(
16
16
  name="cook-build",
17
- version="0.4.2",
17
+ version="0.4.3",
18
18
  long_description=long_description,
19
19
  long_description_content_type="text/x-rst",
20
20
  python_requires=">=3.8",
@@ -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