From 080a28cd1155c545d04a4d21c968d8219fdcad08 Mon Sep 17 00:00:00 2001 From: Crt Mori Date: Thu, 25 Sep 2025 16:30:56 +0200 Subject: [PATCH] Trying to copy coverage to docs but it does not work (no link produced by sphinx) --- README.rst | 5 +++++ doc/source/conf.py | 3 +-- tox.ini | 11 +++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 84e4bee..8256dbe 100644 --- a/README.rst +++ b/README.rst @@ -59,3 +59,8 @@ Usage Behavior -------- +------------- +Code coverage +------------- + +Small test suite runs pytest and produces a `coverage report ` diff --git a/doc/source/conf.py b/doc/source/conf.py index bbcc21a..8125491 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -90,6 +90,5 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [ -] +html_static_path = [] diff --git a/tox.ini b/tox.ini index b9a68b9..7ba455e 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ basepython = py310: {env:TOXPYTHON:python3.10} py311: {env:TOXPYTHON:python3.11} py312: {env:TOXPYTHON:python3.12} - {clean,check,codecov,doc}: python3 + {clean,check,codecov,doc,report}: python3 passenv = * usedevelop = false @@ -60,8 +60,10 @@ allowlist_externals = mlx-warnings >= 1.3.1 commands= bash -c 'make -C doc clean' + {posargs:py.test --cov=mlx.unity2junit --cov-report=html:doc/source/coverage -vv tests/} mlx-warnings --sphinx --exact-warnings 0 --command make -C doc html + [testenv:codecov] deps = codecov @@ -71,12 +73,9 @@ commands = codecov [testenv:report] -deps = coverage -skip_install = true +deps = {[testenv]deps} commands = - coverage combine --append - coverage report - coverage html + {posargs:py.test --cov=mlx.unity2junit --cov-report=html -vv tests/} [testenv:clean] commands = coverage erase