Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .mise/config.coverage.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,20 @@ shell = "bash -euo pipefail -c"
[tasks.pytest-cov]
description = "Combined Python coverage (pytest + web-runner Pyodide runs) -> Cobertura for Codecov/DeepSource"
# One Python report is combined from several data sources: the pytest runs plus the web-runner Pyodide runs.
# The pyface1 + pyeye1 + pyspeech1 pytest runs and the web-runner integration test (which drops the modules'
# .coverage files into target/pycov/ when ET_TEST_COVERAGE is set) all feed `coverage combine`, which merges
# them via config/coverage.toml's `[paths]` remap into a single Cobertura file. pytest-cov is a plugin, so it
# rides in each module's uv `dev` group -- the same venv as pytest -- and `uv run` (a mise-managed tool) installs
# both into the one project venv. UV_PYTHON mirrors test-pyface1's mise-CPython pin.
# The Python workflow pytest runs and the web-runner integration test (which drops the modules' .coverage files
# into target/pycov/ when ET_TEST_COVERAGE is set) all feed `coverage combine`. The paths in
# config/coverage.toml remap them into a single Cobertura report.
run = """
pyface=services/ws-modules/pyface1
pydemo=services/ws-modules/pydemo1
pyeye=services/ws-modules/pyeye1
pyspeech=services/ws-modules/pyspeech1
pycov=target/pycov
mkdir -p "$pycov"
uv run --directory "$pyface" pytest --cov=pyface1 --cov-report=
cp "$pyface/.coverage" "$pycov/.coverage.pyface1_pytest"
uv run --directory "$pydemo" pytest --cov=pydemo1 --cov-report=
cp "$pydemo/.coverage" "$pycov/.coverage.pydemo1_pytest"
uv run --directory "$pyeye" pytest --cov=pyeye1 --cov-report=
cp "$pyeye/.coverage" "$pycov/.coverage.pyeye1_pytest"
uv run --directory "$pyspeech" pytest --cov=pyspeech1 --cov-report=
Expand Down
19 changes: 18 additions & 1 deletion .mise/config.python.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ depends = ["ruff-fix"]
description = "Apply Python lint-fix passes"

[tasks."test:python"]
depends = ["test-pyeye1", "test-pyface1", "test-pyspeech1"]
depends = ["test-pydemo1", "test-pyeye1", "test-pyface1", "test-pyspeech1"]
description = "Run Python tests"

[tasks.test-pyeye1]
Expand All @@ -76,6 +76,11 @@ dir = "services/ws-modules/pyface1"
env = { UV_PYTHON = "{% if os() == 'windows' %}{{ vars.py3_win }}{% else %}{{ vars.py3_unix }}{% endif %}" }
run = "uv run pytest"

[tasks.test-pydemo1]
dir = "services/ws-modules/pydemo1"
env = { UV_PYTHON = "{% if os() == 'windows' %}{{ vars.py3_win }}{% else %}{{ vars.py3_unix }}{% endif %}" }
run = "uv run pytest"

[tasks.test-pyspeech1]
dir = "services/ws-modules/pyspeech1"
env = { UV_PYTHON = "{% if os() == 'windows' %}{{ vars.py3_win }}{% else %}{{ vars.py3_unix }}{% endif %}" }
Expand Down Expand Up @@ -159,6 +164,17 @@ uv build --wheel --out-dir pkg
"""
shell = "bash -euo pipefail -c"

[tasks.build-ws-pydemo1-module]
depends = ["build-ws-pyeye1-module", "build-ws-pyspeech1-module"]
description = "Build the combined pydemo1 Python eye and speech workflow module"
dir = "services/ws-modules/pydemo1"
run = """
rm -f pkg/*.whl
uv build --wheel --out-dir pkg
{{ vars.et_cli }} module-package-json
"""
shell = "bash -euo pipefail -c"

[tasks.build-ws-wasi-graphics-info-module]
depends = ["build-et-cli"]
description = "Build the WASI graphics-info Python module as a WASI Preview 2 component"
Expand Down Expand Up @@ -189,6 +205,7 @@ description = "Prefetch Python (uv) dependencies"
env = { UV_PYTHON = "{% if os() == 'windows' %}{{ vars.py3_win }}{% else %}{{ vars.py3_unix }}{% endif %}" }
run = """
uv sync --directory services/ws-modules/pydata1
uv sync --directory services/ws-modules/pydemo1
uv sync --directory services/ws-modules/pyeye1
uv sync --directory services/ws-modules/pyface1
uv sync --directory services/ws-modules/pyspeech1
Expand Down
10 changes: 4 additions & 6 deletions config/coverage.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# coverage.py config for the combined Python report (referenced via COVERAGE_RCFILE by the pytest-cov task).
# Data sources feed one report: the pytest runs, and the web-runner Pyodide runs of pydata1 + pyface1 + pyeye1
# (whose .coverage files the web-runner integration test drops into target/pycov/). `[tool.coverage.paths]` remaps
# each source's recorded path to the repo-relative one so `coverage combine` merges them into a single file entry:
# pytest records relative paths (pyface1/...); the Pyodide runs record absolute in-interpreter paths
# (/tmp/<wheel>/<pkg>/...), matched by the `**/<pkg>` alias. First entry in each list is the canonical result and
# must be a real on-disk path so `coverage xml` can read source.
# Data sources feed one report: pytest plus web-runner Pyodide runs. The web runner drops its .coverage files
# into target/pycov/. `[tool.coverage.paths]` remaps each source's recorded path to the repo-relative one so
# `coverage combine` merges them into a single file entry. The first entry is the canonical on-disk source.

[tool.coverage.run]
# Branch coverage must be enabled identically on every data source `coverage combine` merges.
Expand All @@ -16,6 +13,7 @@ relative_files = true

[tool.coverage.paths]
pydata1 = ["services/ws-modules/pydata1/pydata1", "pydata1", "**/pydata1"]
pydemo1 = ["services/ws-modules/pydemo1/pydemo1", "pydemo1", "**/pydemo1"]
pyeye1 = ["services/ws-modules/pyeye1/pyeye1", "pyeye1", "**/pyeye1"]
pyface1 = ["services/ws-modules/pyface1/pyface1", "pyface1", "**/pyface1"]
pyspeech1 = ["services/ws-modules/pyspeech1/pyspeech1", "pyspeech1", "**/pyspeech1"]
1 change: 1 addition & 0 deletions config/pyrefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ project-excludes = [
# Package roots so intra-package imports (`pyface1.face_detection`) resolve as real modules, not `__unknown__.*`.
search-path = [
"../services/ws-modules/pydata1",
"../services/ws-modules/pydemo1",
"../services/ws-modules/pyeye1",
"../services/ws-modules/pyface1",
"../services/ws-modules/pyspeech1",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"generated/python-rest",
"generated/python-ws",
"services/ws-modules/pydata1",
"services/ws-modules/pydemo1",
"services/ws-modules/pyeye1",
"services/ws-modules/pyface1",
"services/ws-modules/pyspeech1",
Expand Down
1 change: 1 addition & 0 deletions services/ws-modules/pydemo1/pkg/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.whl
Loading
Loading