Skip to content

Commit b432962

Browse files
committed
sync
1 parent 39d8994 commit b432962

File tree

20 files changed

+108
-89
lines changed

20 files changed

+108
-89
lines changed

.github/workflows/rhiza_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: ./.github/actions/configure-git-auth
3838
with:
3939
token: ${{ secrets.GH_PAT }}
40-
40+
4141
- id: versions
4242
env:
4343
UV_EXTRA_INDEX_URL: ${{ secrets.UV_EXTRA_INDEX_URL }}

.rhiza/.cfg.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ filename = "pyproject.toml"
3131
search = 'version = "{current_version}"'
3232
replace = 'version = "{new_version}"'
3333

34-
[[tool.bumpversion.files]]
35-
filename = ".rhiza/template-bundles.yml"
36-
search = 'version: "{current_version}"'
37-
replace = 'version: "{new_version}"'
34+
# [[tool.bumpversion.files]]
35+
# filename = ".rhiza/template-bundles.yml"
36+
# search = 'version: "{current_version}"'
37+
# replace = 'version: "{new_version}"'

.rhiza/history

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,29 +48,23 @@
4848
.rhiza/scripts/release.sh
4949
.rhiza/templates/minibook/custom.html.jinja2
5050
.rhiza/tests/README.md
51-
.rhiza/tests/__init__.py
52-
.rhiza/tests/api/__init__.py
5351
.rhiza/tests/api/conftest.py
5452
.rhiza/tests/api/test_github_targets.py
5553
.rhiza/tests/api/test_makefile_api.py
5654
.rhiza/tests/api/test_makefile_targets.py
5755
.rhiza/tests/conftest.py
58-
.rhiza/tests/deps/__init__.py
5956
.rhiza/tests/deps/test_dependency_health.py
60-
.rhiza/tests/integration/__init__.py
6157
.rhiza/tests/integration/test_book_targets.py
6258
.rhiza/tests/integration/test_marimushka.py
6359
.rhiza/tests/integration/test_notebook_execution.py
6460
.rhiza/tests/integration/test_release.py
65-
.rhiza/tests/structure/__init__.py
6661
.rhiza/tests/structure/test_project_layout.py
6762
.rhiza/tests/structure/test_requirements.py
68-
.rhiza/tests/sync/__init__.py
6963
.rhiza/tests/sync/conftest.py
7064
.rhiza/tests/sync/test_docstrings.py
7165
.rhiza/tests/sync/test_readme_validation.py
7266
.rhiza/tests/sync/test_rhiza_version.py
73-
.rhiza/tests/utils/__init__.py
67+
.rhiza/tests/test_utils.py
7468
.rhiza/tests/utils/conftest.py
7569
.rhiza/tests/utils/test_git_repo_fixture.py
7670
.rhiza/tests/utils/test_version_matrix.py

.rhiza/tests/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,14 @@ uv run pytest .rhiza/tests/ --cov
102102

103103
### Import Patterns
104104
```python
105-
# Import from root conftest
106-
from ..conftest import strip_ansi, run_make
105+
# Import shared helpers from test_utils
106+
from test_utils import strip_ansi, run_make, setup_rhiza_git_repo
107107

108-
# Import from category conftest
109-
from .conftest import setup_tmp_makefile
108+
# Import from local category conftest (for fixtures and category-specific helpers)
109+
from api.conftest import SPLIT_MAKEFILES, setup_tmp_makefile
110+
111+
# Note: Fixtures defined in conftest.py are automatically available in tests
112+
# and don't need to be explicitly imported
110113
```
111114

112115
## Test Coverage

.rhiza/tests/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

.rhiza/tests/api/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

.rhiza/tests/api/conftest.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
This conftest provides:
44
- setup_tmp_makefile: Copies Makefile and split files to temp dir for isolated testing
5-
- run_make: Helper to execute make commands with dry-run support
6-
- setup_rhiza_git_repo: Initialize a git repo configured as rhiza origin
5+
- run_make: Helper to execute make commands with dry-run support (imported from test_utils)
6+
- setup_rhiza_git_repo: Initialize a git repo configured as rhiza origin (imported from test_utils)
77
- SPLIT_MAKEFILES: List of split Makefile paths
88
"""
99

@@ -16,8 +16,9 @@
1616

1717
import pytest
1818

19-
# Get absolute paths for executables to avoid S607 warnings from CodeFactor/Bandit
20-
MAKE = shutil.which("make") or "/usr/bin/make"
19+
# Import shared utilities (no __init__.py needed with new structure)
20+
# Note: we define our own run_make and setup_rhiza_git_repo here with enhanced functionality
21+
from test_utils import MAKE
2122

2223
# Split Makefile paths that are included in the main Makefile
2324
# These are now located in .rhiza/make.d/ directory

.rhiza/tests/api/test_github_targets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from __future__ import annotations
88

99
# Import run_make from local conftest (setup_tmp_makefile is autouse)
10-
from .conftest import run_make
10+
from api.conftest import run_make
1111

1212

1313
def test_gh_targets_exist(logger):

.rhiza/tests/api/test_makefile_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def setup_api_env(logger, root, tmp_path: Path):
9191

9292

9393
# Import run_make from local conftest
94-
from .conftest import run_make # noqa: E402
94+
from api.conftest import run_make # noqa: E402
9595

9696

9797
def test_api_delegation(logger, setup_api_env):

.rhiza/tests/api/test_makefile_targets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
import os
1616

1717
import pytest
18+
from api.conftest import SPLIT_MAKEFILES, run_make, setup_rhiza_git_repo
1819

19-
# Import shared helpers from parent and local conftest
20-
from ..conftest import strip_ansi
21-
from .conftest import SPLIT_MAKEFILES, run_make, setup_rhiza_git_repo
20+
# Import shared helpers from test_utils and local conftest
21+
from test_utils import strip_ansi
2222

2323

2424
class TestMakefile:

0 commit comments

Comments
 (0)