bakefile 0.0.8__tar.gz → 0.0.9__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 (67) hide show
  1. {bakefile-0.0.8 → bakefile-0.0.9}/PKG-INFO +1 -1
  2. {bakefile-0.0.8 → bakefile-0.0.9}/pyproject.toml +1 -1
  3. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/splitter.py +9 -1
  4. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/space/python.py +17 -8
  5. {bakefile-0.0.8 → bakefile-0.0.9}/README.md +0 -0
  6. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/__init__.py +0 -0
  7. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/bakebook/__init__.py +0 -0
  8. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/bakebook/bakebook.py +0 -0
  9. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/bakebook/decorator.py +0 -0
  10. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/bakebook/get.py +0 -0
  11. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/__init__.py +0 -0
  12. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bake/__init__.py +0 -0
  13. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bake/__main__.py +0 -0
  14. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bake/main.py +0 -0
  15. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bake/reinvocation.py +0 -0
  16. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/__init__.py +0 -0
  17. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/__main__.py +0 -0
  18. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/add_inline.py +0 -0
  19. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/export.py +0 -0
  20. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/find_python.py +0 -0
  21. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/init.py +0 -0
  22. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/lint.py +0 -0
  23. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/main.py +0 -0
  24. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/uv.py +0 -0
  25. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/__init__.py +0 -0
  26. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/app.py +0 -0
  27. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/callback.py +0 -0
  28. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/context.py +0 -0
  29. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/exception_handler.py +0 -0
  30. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/obj.py +0 -0
  31. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/params.py +0 -0
  32. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/utils/__init__.py +0 -0
  33. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/utils/version.py +0 -0
  34. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/__init__.py +0 -0
  35. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/add_inline.py +0 -0
  36. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/find_python.py +0 -0
  37. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/lint.py +0 -0
  38. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/run_uv.py +0 -0
  39. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/write_bakefile.py +0 -0
  40. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/py.typed +0 -0
  41. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/samples/__init__.py +0 -0
  42. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/samples/simple.py +0 -0
  43. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/__init__.py +0 -0
  44. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/console.py +0 -0
  45. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/logger/__init__.py +0 -0
  46. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/logger/capsys.py +0 -0
  47. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/logger/setup.py +0 -0
  48. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/logger/utils.py +0 -0
  49. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/params.py +0 -0
  50. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/__init__.py +0 -0
  51. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/run.py +0 -0
  52. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/script.py +0 -0
  53. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/uv.py +0 -0
  54. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/style.py +0 -0
  55. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/utils/__init__.py +0 -0
  56. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/utils/constants.py +0 -0
  57. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/utils/env.py +0 -0
  58. {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/utils/exceptions.py +0 -0
  59. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/__init__.py +0 -0
  60. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/__init__.py +0 -0
  61. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/bakebook.py +0 -0
  62. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/base.py +0 -0
  63. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/get_bakebook.py +0 -0
  64. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/presets.py +0 -0
  65. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/space/__init__.py +0 -0
  66. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/space/base.py +0 -0
  67. {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/space/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bakefile
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: Add your description here
5
5
  Author: Wisaroot Lertthaweedech
6
6
  Author-email: Wisaroot Lertthaweedech <l.wisaroot@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "bakefile"
3
- version = "0.0.8" # use git tag
3
+ version = "0.0.9" # use git tag
4
4
  description = "Add your description here"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,3 +1,4 @@
1
+ import errno
1
2
  import os
2
3
  import select
3
4
  import subprocess
@@ -72,7 +73,14 @@ class OutputSplitter:
72
73
  ready, _, _ = select.select([pty_fd], [], [], 0.1)
73
74
 
74
75
  if ready:
75
- data = os.read(pty_fd, 4096)
76
+ try:
77
+ data = os.read(pty_fd, 4096)
78
+ except OSError as e:
79
+ # EIO (errno 5) means PTY slave closed - treat as EOF
80
+ # This can happen in CI environments when process exits
81
+ if e.errno == errno.EIO:
82
+ break
83
+ raise
76
84
  if not self._handle_data(data, target, output_list):
77
85
  break
78
86
 
@@ -34,11 +34,20 @@ class PythonSpace(BaseSpace):
34
34
  ctx.run("uv run ty check --error-on-warning --no-progress .")
35
35
  ctx.run("uv run deptry .")
36
36
 
37
- def _test(self, ctx: Context, *, tests_path: str, verbose: bool = False) -> None:
38
- cmd = (
39
- f"uv run pytest {tests_path} --cov=src --cov-report=html"
40
- " --cov-report=term-missing --cov-report=xml"
41
- )
37
+ def _test(
38
+ self,
39
+ ctx: Context,
40
+ *,
41
+ tests_paths: str | list[str],
42
+ verbose: bool = False,
43
+ coverage_report: bool = True,
44
+ ) -> None:
45
+ paths = tests_paths if isinstance(tests_paths, str) else " ".join(tests_paths)
46
+
47
+ cmd = f"uv run pytest {paths}"
48
+
49
+ if coverage_report:
50
+ cmd += " --cov=src --cov-report=html --cov-report=term-missing --cov-report=xml"
42
51
 
43
52
  if verbose:
44
53
  cmd += " -s -v"
@@ -53,20 +62,20 @@ class PythonSpace(BaseSpace):
53
62
  integration_tests_path = "tests/integration/"
54
63
  if Path(integration_tests_path).exists():
55
64
  tests_path = integration_tests_path
56
- self._test(ctx, tests_path=tests_path, verbose=verbose)
65
+ self._test(ctx, tests_paths=tests_path, verbose=verbose)
57
66
  else:
58
67
  self._no_implementation(ctx)
59
68
 
60
69
  def test(self, ctx: Context) -> None:
61
70
  unit_tests_path = "tests/unit/"
62
71
  tests_path = unit_tests_path if Path(unit_tests_path).exists() else "tests/"
63
- self._test(ctx, tests_path=tests_path)
72
+ self._test(ctx, tests_paths=tests_path)
64
73
 
65
74
  def test_all(self, ctx: Context) -> None:
66
75
  unit_tests_path = "tests/unit/"
67
76
  if Path(unit_tests_path).exists():
68
77
  tests_path = "tests/"
69
- self._test(ctx, tests_path=tests_path)
78
+ self._test(ctx, tests_paths=tests_path)
70
79
  else:
71
80
  self._no_implementation(ctx)
72
81
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes