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.
- {bakefile-0.0.8 → bakefile-0.0.9}/PKG-INFO +1 -1
- {bakefile-0.0.8 → bakefile-0.0.9}/pyproject.toml +1 -1
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/splitter.py +9 -1
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/space/python.py +17 -8
- {bakefile-0.0.8 → bakefile-0.0.9}/README.md +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/bakebook/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/bakebook/bakebook.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/bakebook/decorator.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/bakebook/get.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bake/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bake/__main__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bake/main.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bake/reinvocation.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/__main__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/add_inline.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/export.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/find_python.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/init.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/lint.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/main.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/bakefile/uv.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/app.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/callback.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/context.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/exception_handler.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/obj.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/common/params.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/utils/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/cli/utils/version.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/add_inline.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/find_python.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/lint.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/run_uv.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/manage/write_bakefile.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/py.typed +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/samples/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/samples/simple.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/console.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/logger/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/logger/capsys.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/logger/setup.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/logger/utils.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/params.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/run.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/script.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/run/uv.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/ui/style.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/utils/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/utils/constants.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/utils/env.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bake/utils/exceptions.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/bakebook.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/base.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/get_bakebook.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/environ/presets.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/space/__init__.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/space/base.py +0 -0
- {bakefile-0.0.8 → bakefile-0.0.9}/src/bakelib/space/utils.py +0 -0
|
@@ -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
|
-
|
|
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(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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
|