rhiza 0.8.8__tar.gz → 0.9.0__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 (124) hide show
  1. {rhiza-0.8.8 → rhiza-0.9.0}/.editorconfig +5 -0
  2. rhiza-0.8.8/.rhiza/agentic/Makefile.agentic → rhiza-0.9.0/.github/agents/agentic.mk +4 -4
  3. {rhiza-0.8.8 → rhiza-0.9.0}/.github/copilot-instructions.md +2 -2
  4. rhiza-0.8.8/.github/Makefile.gh → rhiza-0.9.0/.github/github.mk +1 -1
  5. rhiza-0.9.0/.github/workflows/rhiza_benchmarks.yml +51 -0
  6. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_book.yml +4 -4
  7. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_ci.yml +5 -5
  8. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_codeql.yml +25 -2
  9. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_deptry.yml +4 -4
  10. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_marimo.yml +5 -3
  11. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_pre-commit.yml +2 -2
  12. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_release.yml +3 -3
  13. rhiza-0.9.0/.github/workflows/rhiza_security.yml +36 -0
  14. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_sync.yml +5 -5
  15. {rhiza-0.8.8 → rhiza-0.9.0}/.github/workflows/rhiza_validate.yml +2 -2
  16. {rhiza-0.8.8 → rhiza-0.9.0}/.gitignore +4 -2
  17. {rhiza-0.8.8 → rhiza-0.9.0}/.pre-commit-config.yaml +15 -2
  18. rhiza-0.9.0/.rhiza/.gitignore +2 -0
  19. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/docs/CONFIG.md +1 -1
  20. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/history +19 -17
  21. rhiza-0.9.0/.rhiza/make.d/01-custom-env.mk +9 -0
  22. rhiza-0.9.0/.rhiza/make.d/10-custom-task.mk +12 -0
  23. rhiza-0.9.0/.rhiza/make.d/README.md +82 -0
  24. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/requirements/docs.txt +1 -0
  25. rhiza-0.9.0/.rhiza/requirements/tests.txt +12 -0
  26. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/requirements/tools.txt +3 -0
  27. rhiza-0.8.8/Makefile → rhiza-0.9.0/.rhiza/rhiza.mk +102 -45
  28. rhiza-0.9.0/.rhiza/scripts/check_workflow_names.py +73 -0
  29. {rhiza-0.8.8 → rhiza-0.9.0}/CLI.md +22 -11
  30. {rhiza-0.8.8 → rhiza-0.9.0}/CODE_OF_CONDUCT.md +3 -3
  31. rhiza-0.9.0/Makefile +8 -0
  32. {rhiza-0.8.8 → rhiza-0.9.0}/PKG-INFO +46 -26
  33. {rhiza-0.8.8 → rhiza-0.9.0}/README.md +45 -25
  34. {rhiza-0.8.8 → rhiza-0.9.0}/USAGE.md +50 -20
  35. rhiza-0.9.0/book/README.md +45 -0
  36. rhiza-0.9.0/book/book.mk +111 -0
  37. {rhiza-0.8.8 → rhiza-0.9.0}/book/marimo/README.md +2 -2
  38. rhiza-0.9.0/book/marimo/marimo.mk +67 -0
  39. {rhiza-0.8.8/book/marimo → rhiza-0.9.0/book/marimo/notebooks}/rhiza.py +56 -95
  40. {rhiza-0.8.8 → rhiza-0.9.0}/presentation/README.md +5 -5
  41. rhiza-0.8.8/presentation/Makefile.presentation → rhiza-0.9.0/presentation/presentation.mk +1 -1
  42. {rhiza-0.8.8 → rhiza-0.9.0}/pyproject.toml +1 -1
  43. {rhiza-0.8.8 → rhiza-0.9.0}/ruff.toml +50 -14
  44. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/__init__.py +4 -4
  45. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/cli.py +113 -40
  46. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/commands/__init__.py +2 -2
  47. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/commands/init.py +32 -9
  48. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/commands/materialize.py +9 -9
  49. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/commands/migrate.py +1 -1
  50. rhiza-0.9.0/src/rhiza/commands/summarise.py +416 -0
  51. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/commands/uninstall.py +2 -1
  52. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/commands/validate.py +1 -1
  53. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/commands/welcome.py +1 -1
  54. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/models.py +2 -2
  55. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_cli_commands.py +51 -1
  56. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_commands/test_init.py +51 -0
  57. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_commands/test_materialize.py +2 -2
  58. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_commands/test_migrate.py +1 -1
  59. rhiza-0.9.0/tests/test_commands/test_summarise.py +101 -0
  60. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_commands/test_uninstall.py +3 -3
  61. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_models.py +1 -1
  62. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/README.md +1 -1
  63. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/benchmarks/analyze_benchmarks.py +2 -2
  64. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/conftest.py +7 -29
  65. rhiza-0.9.0/tests/test_rhiza/test_check_workflow_names.py +115 -0
  66. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_makefile.py +27 -19
  67. rhiza-0.9.0/tests/test_rhiza/test_makefile_api.py +266 -0
  68. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_makefile_gh.py +11 -3
  69. rhiza-0.9.0/tests/test_rhiza/test_marimushka_target.py +92 -0
  70. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_notebooks.py +7 -5
  71. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_readme.py +2 -2
  72. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_release_script.py +4 -3
  73. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_structure.py +2 -3
  74. rhiza-0.9.0/tests/test_rhiza/test_version_matrix.py +137 -0
  75. rhiza-0.9.0/tests/tests.mk +86 -0
  76. {rhiza-0.8.8 → rhiza-0.9.0}/uv.lock +145 -128
  77. rhiza-0.8.8/.rhiza/.env +0 -14
  78. rhiza-0.8.8/.rhiza/Makefile.rhiza +0 -38
  79. rhiza-0.8.8/.rhiza/customisations/Makefile.customisations +0 -29
  80. rhiza-0.8.8/.rhiza/customisations/scripts/build-extras.sh +0 -48
  81. rhiza-0.8.8/.rhiza/customisations/scripts/post-release.sh +0 -46
  82. rhiza-0.8.8/.rhiza/requirements/tests.txt +0 -9
  83. rhiza-0.8.8/.rhiza/scripts/book.sh +0 -99
  84. rhiza-0.8.8/.rhiza/scripts/generate-coverage-badge.sh +0 -79
  85. rhiza-0.8.8/.rhiza/scripts/marimushka.sh +0 -77
  86. rhiza-0.8.8/.rhiza/scripts/update-readme-help.sh +0 -110
  87. rhiza-0.8.8/.rhiza.env +0 -11
  88. rhiza-0.8.8/book/Makefile.book +0 -55
  89. rhiza-0.8.8/book/README.md +0 -23
  90. rhiza-0.8.8/tests/Makefile.tests +0 -31
  91. rhiza-0.8.8/tests/test_rhiza/test_coverage_badge.py +0 -94
  92. rhiza-0.8.8/tests/test_rhiza/test_marimushka_script.py +0 -76
  93. rhiza-0.8.8/tests/test_rhiza/test_updatereadme_script.py +0 -98
  94. {rhiza-0.8.8 → rhiza-0.9.0}/.github/ISSUE_TEMPLATE/assign_ui_implementation.md +0 -0
  95. {rhiza-0.8.8 → rhiza-0.9.0}/.github/agents/analyser.md +0 -0
  96. {rhiza-0.8.8 → rhiza-0.9.0}/.github/agents/summarise.md +0 -0
  97. {rhiza-0.8.8 → rhiza-0.9.0}/.python-version +0 -0
  98. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/.cfg.toml +0 -0
  99. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/docs/TOKEN_SETUP.md +0 -0
  100. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/requirements/README.md +0 -0
  101. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/requirements/marimo.txt +0 -0
  102. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/scripts/release.sh +0 -0
  103. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/template.yml +0 -0
  104. {rhiza-0.8.8 → rhiza-0.9.0}/.rhiza/utils/version_matrix.py +0 -0
  105. {rhiza-0.8.8 → rhiza-0.9.0}/CONTRIBUTING.md +0 -0
  106. {rhiza-0.8.8 → rhiza-0.9.0}/GETTING_STARTED.md +0 -0
  107. {rhiza-0.8.8 → rhiza-0.9.0}/LICENSE +0 -0
  108. {rhiza-0.8.8 → rhiza-0.9.0}/book/marimo/.gitkeep +0 -0
  109. {rhiza-0.8.8 → rhiza-0.9.0}/book/minibook-templates/custom.html.jinja2 +0 -0
  110. {rhiza-0.8.8 → rhiza-0.9.0}/book/pdoc-templates/module.html.jinja2 +0 -0
  111. {rhiza-0.8.8 → rhiza-0.9.0}/pytest.ini +0 -0
  112. {rhiza-0.8.8 → rhiza-0.9.0}/renovate.json +0 -0
  113. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/__main__.py +0 -0
  114. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/_templates/basic/__init__.py.jinja2 +0 -0
  115. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/_templates/basic/main.py.jinja2 +0 -0
  116. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/_templates/basic/pyproject.toml.jinja2 +0 -0
  117. {rhiza-0.8.8 → rhiza-0.9.0}/src/rhiza/subprocess_utils.py +0 -0
  118. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_commands/test_validate.py +0 -0
  119. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_package.py +0 -0
  120. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/benchmarks/.gitignore +0 -0
  121. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/benchmarks/README.md +0 -0
  122. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_docstrings.py +0 -0
  123. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_git_repo_fixture.py +0 -0
  124. {rhiza-0.8.8 → rhiza-0.9.0}/tests/test_rhiza/test_requirements_folder.py +0 -0
@@ -24,6 +24,11 @@ indent_size = 2
24
24
  # [*.{md,markdown}]
25
25
  # trim_trailing_whitespace = false
26
26
 
27
+ # Makefiles require tabs
28
+ [{Makefile,*.mk,*.make}]
29
+ indent_style = tab
30
+ indent_size = 4
31
+
27
32
  # Don't apply editorconfig rules to vendor/ resources
28
33
  # This is a "defensive" rule for the day we may have
29
34
  # the vendor folder
@@ -1,8 +1,8 @@
1
- ## Makefile.customisations - User-defined scripts and overrides
1
+ ## customisations.mk - User-defined scripts and overrides
2
2
  # This file is included by the main Makefile
3
3
 
4
4
  # Declare phony targets
5
- .PHONY: install-copilot analyse-repo summarize-changes
5
+ .PHONY: install-copilot analyse-repo summarise-changes
6
6
 
7
7
  COPILOT_BIN ?= $(shell command -v copilot 2>/dev/null || echo "$(INSTALL_DIR)/copilot")
8
8
  ##@ Agentic Workflows
@@ -17,8 +17,8 @@ analyse-repo: install-copilot ## run the analyser agent to update REPOSITORY_ANA
17
17
  --allow-tool 'write' --deny-tool 'remove' \
18
18
  --allow-all-paths
19
19
 
20
- summarize-changes: install-copilot ## summarize changes since the most recent release/tag
21
- @"$(COPILOT_BIN)" -p "Show me the commits since the last release/tag and summarize them" --allow-tool 'shell(git)' --model "$(DEFAULT_AI_MODEL)" --agent summarise
20
+ summarise-changes: install-copilot ## summarise changes since the most recent release/tag
21
+ @"$(COPILOT_BIN)" -p "Show me the commits since the last release/tag and summarise them" --allow-tool 'shell(git)' --model "$(DEFAULT_AI_MODEL)" --agent summarise
22
22
 
23
23
  install-copilot: ## checks for copilot and prompts to install
24
24
  @if command -v copilot >/dev/null 2>&1; then \
@@ -1,7 +1,7 @@
1
1
  # Rhiza Copilot Instructions
2
2
 
3
- You are working in a project that utilizes the `rhiza` framework. Rhiza is a collection of reusable
4
- configuration templates and tooling designed to standardize and streamline modern Python development.
3
+ You are working in a project that utilises the `rhiza` framework. Rhiza is a collection of reusable
4
+ configuration templates and tooling designed to standardise and streamline modern Python development.
5
5
 
6
6
  As a Rhiza-based project, this workspace adheres to specific conventions for structure, dependency management, and automation.
7
7
 
@@ -1,4 +1,4 @@
1
- ## Makefile.gh - github repo maintenance and helpers
1
+ ## github.mk - github repo maintenance and helpers
2
2
  # This file is included by the main Makefile
3
3
 
4
4
  # Declare phony targets
@@ -0,0 +1,51 @@
1
+ # This file is part of the jebel-quant/rhiza repository
2
+ # (https://github.com/jebel-quant/rhiza).
3
+ #
4
+ # Workflow: Performance Benchmarks
5
+ #
6
+ # Purpose: Run performance benchmarks to track regressions.
7
+ #
8
+ # Trigger: On push to main/master branches and manual trigger.
9
+
10
+ name: (RHIZA) Benchmarks
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ on:
16
+ push:
17
+ branches: [ main, master ]
18
+ pull_request:
19
+ branches: [ main, master ]
20
+ workflow_dispatch:
21
+
22
+ jobs:
23
+ benchmark:
24
+ runs-on: ubuntu-latest
25
+
26
+ steps:
27
+ - name: Checkout repository
28
+ uses: actions/checkout@v6
29
+ with:
30
+ lfs: true
31
+
32
+ - name: Install uv
33
+ uses: astral-sh/setup-uv@v7
34
+ with:
35
+ version: "0.9.26"
36
+ python-version: "3.12"
37
+
38
+ - name: Run benchmarks
39
+ run: |
40
+ make install
41
+ make benchmark
42
+
43
+ - name: Upload benchmark results
44
+ uses: actions/upload-artifact@v6
45
+ if: always()
46
+ with:
47
+ name: benchmark-results
48
+ path: |
49
+ tests/test_rhiza/benchmarks/benchmarks.json
50
+ tests/test_rhiza/benchmarks/benchmarks.svg
51
+ tests/test_rhiza/benchmarks/benchmarks.html
@@ -14,7 +14,7 @@
14
14
  # - 🧪 Run tests and generate coverage reports
15
15
  # - 🚀 Deploy combined documentation to GitHub Pages
16
16
 
17
- name: "BOOK"
17
+ name: "(RHIZA) BOOK"
18
18
 
19
19
  on:
20
20
  push:
@@ -43,7 +43,7 @@ jobs:
43
43
  - name: Install uv
44
44
  uses: astral-sh/setup-uv@v7
45
45
  with:
46
- version: "0.9.24"
46
+ version: "0.9.26"
47
47
 
48
48
  - name: "Sync the virtual environment for ${{ github.repository }}"
49
49
  shell: bash
@@ -54,7 +54,7 @@ jobs:
54
54
 
55
55
  - name: "Make the book"
56
56
  run: |
57
- make book
57
+ make -f .rhiza/rhiza.mk book
58
58
 
59
59
  # Step 5: Package all artifacts for GitHub Pages deployment
60
60
  # This prepares the combined outputs for deployment by creating a single artifact
@@ -66,7 +66,7 @@ jobs:
66
66
  # Step 6: Deploy the packaged artifacts to GitHub Pages
67
67
  # This step publishes the content to GitHub Pages
68
68
  # The deployment is conditional based on whether the repository is a fork and the PUBLISH_COMPANION_BOOK variable is set
69
- # If the repository is a fork, deployment is skipped to avoid unauthorized publishing
69
+ # If the repository is a fork, deployment is skipped to avoid unauthorised publishing
70
70
  # If PUBLISH_COMPANION_BOOK is not set, it defaults to allowing deployment
71
71
  - name: Deploy to GitHub Pages
72
72
  if: ${{ !github.event.repository.fork && (vars.PUBLISH_COMPANION_BOOK == 'true' || vars.PUBLISH_COMPANION_BOOK == '') }}
@@ -7,7 +7,7 @@
7
7
  #
8
8
  # Trigger: On push and pull requests to main/master branches.
9
9
 
10
- name: CI
10
+ name: (RHIZA) CI
11
11
 
12
12
  permissions:
13
13
  contents: read
@@ -29,12 +29,12 @@ jobs:
29
29
  - name: Install uv
30
30
  uses: astral-sh/setup-uv@v7
31
31
  with:
32
- version: "0.9.24"
32
+ version: "0.9.26"
33
33
 
34
34
  - id: versions
35
35
  run: |
36
36
  # Generate Python versions JSON from the script
37
- JSON=$(make -s version-matrix)
37
+ JSON=$(make -f .rhiza/rhiza.mk -s version-matrix)
38
38
  echo "list=$JSON" >> "$GITHUB_OUTPUT"
39
39
 
40
40
  - name: Debug matrix
@@ -58,9 +58,9 @@ jobs:
58
58
  - name: Install uv
59
59
  uses: astral-sh/setup-uv@v7
60
60
  with:
61
- version: "0.9.24"
61
+ version: "0.9.26"
62
62
  python-version: ${{ matrix.python-version }}
63
63
 
64
64
  - name: Run tests
65
65
  run: |
66
- make test
66
+ make -f .rhiza/rhiza.mk test
@@ -9,7 +9,22 @@
9
9
  # the `language` matrix defined below to confirm you have the correct set of
10
10
  # supported CodeQL languages.
11
11
  #
12
- name: "CodeQL Advanced"
12
+ # ******** IMPORTANT: GitHub Advanced Security Required ********
13
+ # CodeQL is FREE for public repositories, but requires GitHub Advanced Security
14
+ # (part of GitHub Enterprise) for private repositories.
15
+ #
16
+ # This workflow automatically:
17
+ # - Runs on public repositories
18
+ # - Skips on private repositories (unless Advanced Security is available)
19
+ #
20
+ # To control this behavior, set the CODEQL_ENABLED repository variable:
21
+ # - Set to 'true' to force enable (if you have Advanced Security on private repos)
22
+ # - Set to 'false' to disable entirely
23
+ # - Leave unset for automatic behavior (recommended)
24
+ #
25
+ # For more information, see docs/CUSTOMIZATION.md
26
+ #
27
+ name: "(RHIZA) CODEQL"
13
28
 
14
29
  on:
15
30
  push:
@@ -28,7 +43,15 @@ jobs:
28
43
  # - https://gh.io/using-larger-runners (GitHub.com only)
29
44
  # Consider using larger runners or machines with greater resources for possible analysis time improvements.
30
45
  runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31
- if: ${{ !github.event.repository.private }}
46
+ # CodeQL requires GitHub Advanced Security (part of GitHub Enterprise).
47
+ # For users without Enterprise license:
48
+ # - Public repositories: CodeQL is available for free
49
+ # - Private repositories: Requires GitHub Advanced Security
50
+ # To disable this workflow, set CODEQL_ENABLED repository variable to 'false'
51
+ # To enable this workflow for private repos with Advanced Security, set CODEQL_ENABLED to 'true'
52
+ if: |
53
+ vars.CODEQL_ENABLED == 'true' ||
54
+ (vars.CODEQL_ENABLED != 'false' && github.event.repository.visibility == 'public')
32
55
  permissions:
33
56
  # required for all workflows
34
57
  security-events: write
@@ -10,7 +10,7 @@
10
10
  # Trigger: This workflow runs on every push and on pull requests to main/master
11
11
  # branches (including from forks)
12
12
 
13
- name: "DEPTRY"
13
+ name: "(RHIZA) DEPTRY"
14
14
 
15
15
  # Permissions: Only read access to repository contents is needed
16
16
  permissions:
@@ -27,14 +27,14 @@ jobs:
27
27
  name: Check dependencies with deptry
28
28
  runs-on: ubuntu-latest
29
29
  container:
30
- image: ghcr.io/astral-sh/uv:0.9.24-python3.12-trixie
30
+ image: ghcr.io/astral-sh/uv:0.9.26-python3.12-trixie
31
31
 
32
32
  steps:
33
33
  - uses: actions/checkout@v6
34
34
 
35
35
  - name: Run deptry
36
- run: make deptry
36
+ run: make -f .rhiza/rhiza.mk deptry
37
37
  # NOTE: make deptry is good style because it encapsulates the folders to check
38
38
  # (e.g. src and book/marimo) and keeps CI in sync with local development.
39
- # Since we use a 'uv' container, the Makefile is optimized to use the
39
+ # Since we use a 'uv' container, the Makefile is optimised to use the
40
40
  # pre-installed 'uv' and 'uvx' from the system PATH.
@@ -15,7 +15,7 @@
15
15
  # - 🧪 Run each notebook in parallel using a matrix strategy
16
16
  # - ✅ Fail-fast disabled to report all failing notebooks
17
17
 
18
- name: "MARIMO"
18
+ name: "(RHIZA) MARIMO"
19
19
 
20
20
  permissions:
21
21
  contents: read
@@ -40,7 +40,9 @@ jobs:
40
40
  - name: Find notebooks and build matrix
41
41
  id: notebooks
42
42
  run: |
43
- NOTEBOOK_DIR="book/marimo"
43
+ # Extract MARIMO_FOLDER from the project configuration (via Makefile)
44
+ NOTEBOOK_DIR=$(make -s -f Makefile -f - <<< 'print: ; @echo $(or $(MARIMO_FOLDER),marimo)' print)
45
+
44
46
  echo "Searching notebooks in: $NOTEBOOK_DIR"
45
47
  # Check if directory exists
46
48
  if [ ! -d "$NOTEBOOK_DIR" ]; then
@@ -80,7 +82,7 @@ jobs:
80
82
  - name: Install uv
81
83
  uses: astral-sh/setup-uv@v7
82
84
  with:
83
- version: "0.9.24"
85
+ version: "0.9.26"
84
86
 
85
87
  # Execute the notebook with the appropriate runner based on its content
86
88
  - name: Run notebook
@@ -14,7 +14,7 @@
14
14
  # Components:
15
15
  # - 🔍 Run pre-commit checks using reusable action
16
16
 
17
- name: "PRE-COMMIT"
17
+ name: "(RHIZA) PRE-COMMIT"
18
18
  permissions:
19
19
  contents: read
20
20
 
@@ -34,4 +34,4 @@ jobs:
34
34
  # Run pre-commit
35
35
  - name: Run pre-commit
36
36
  run: |
37
- make fmt
37
+ make -f .rhiza/rhiza.mk fmt
@@ -53,7 +53,7 @@
53
53
  # set to "true" or .devcontainer directory doesn't exist.
54
54
 
55
55
 
56
- name: RELEASE
56
+ name: (RHIZA) RELEASE
57
57
 
58
58
  on:
59
59
  push:
@@ -111,7 +111,7 @@ jobs:
111
111
  - name: Install uv
112
112
  uses: astral-sh/setup-uv@v7
113
113
  with:
114
- version: "0.9.24"
114
+ version: "0.9.26"
115
115
 
116
116
  - name: "Sync the virtual environment for ${{ github.repository }}"
117
117
  shell: bash
@@ -322,7 +322,7 @@ jobs:
322
322
  - name: Install uv
323
323
  uses: astral-sh/setup-uv@v7
324
324
  with:
325
- version: "0.9.24"
325
+ version: "0.9.26"
326
326
 
327
327
  - name: "Sync the virtual environment for ${{ github.repository }}"
328
328
  shell: bash
@@ -0,0 +1,36 @@
1
+ # This file is part of the jebel-quant/rhiza repository
2
+ # (https://github.com/jebel-quant/rhiza).
3
+ #
4
+ # Workflow: Security
5
+ #
6
+ # Purpose: This workflow runs security scans on the project including:
7
+ # - pip-audit: Check for known vulnerabilities in dependencies
8
+ # - bandit: Static analysis for common security issues in Python code
9
+ #
10
+ # Trigger: This workflow runs on every push and on pull requests to main/master
11
+ # branches (including from forks)
12
+
13
+ name: "(RHIZA) SECURITY"
14
+
15
+ # Permissions: Only read access to repository contents is needed
16
+ permissions:
17
+ contents: read
18
+
19
+ on:
20
+ push:
21
+ branches: [ main, master ]
22
+ pull_request:
23
+ branches: [ main, master ]
24
+
25
+ jobs:
26
+ security:
27
+ name: Security scanning
28
+ runs-on: ubuntu-latest
29
+ container:
30
+ image: ghcr.io/astral-sh/uv:0.9.26-python3.12-trixie
31
+
32
+ steps:
33
+ - uses: actions/checkout@v6
34
+
35
+ - name: Run security scans
36
+ run: make security
@@ -1,4 +1,4 @@
1
- name: RHIZA SYNC
1
+ name: (RHIZA) SYNC
2
2
  # This workflow synchronizes the repository with its template.
3
3
  # IMPORTANT: When workflow files (.github/workflows/rhiza_*.yml) are modified,
4
4
  # a Personal Access Token (PAT) with 'workflow' scope is required.
@@ -69,6 +69,9 @@ jobs:
69
69
 
70
70
  echo "changes_detected=true" >> "$GITHUB_OUTPUT"
71
71
 
72
+ # Generate PR description based on staged changes
73
+ uvx rhiza summarise --output pr-description.md
74
+
72
75
  git config user.name "github-actions[bot]"
73
76
  git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
74
77
 
@@ -85,7 +88,4 @@ jobs:
85
88
  branch: ${{ steps.branch.outputs.name }}
86
89
  delete-branch: true
87
90
  title: "chore: Sync with rhiza"
88
- body: |
89
- This pull request synchronizes the repository with its template.
90
-
91
- Changes were generated automatically using **rhiza**.
91
+ body-path: pr-description.md
@@ -1,4 +1,4 @@
1
- name: RHIZA VALIDATE
1
+ name: (RHIZA) VALIDATE
2
2
 
3
3
  permissions:
4
4
  contents: read
@@ -15,7 +15,7 @@ jobs:
15
15
  # don't run this in rhiza itself. Rhiza has no template.yml file.
16
16
  if: ${{ github.repository != 'jebel-quant/rhiza' }}
17
17
  container:
18
- image: ghcr.io/astral-sh/uv:0.9.24-python3.12-trixie
18
+ image: ghcr.io/astral-sh/uv:0.9.26-python3.12-trixie
19
19
 
20
20
  steps:
21
21
  - name: Checkout repository
@@ -5,7 +5,6 @@
5
5
 
6
6
  ### Don't expose API keys, etc.
7
7
  .env
8
- !.rhiza/.env
9
8
 
10
9
  __marimo__
11
10
 
@@ -13,11 +12,12 @@ _tests
13
12
  _book
14
13
  _pdoc
15
14
  _marimushka
15
+ _benchmarks
16
16
 
17
17
  # temp file used by Junie
18
18
  .output.txt
19
19
 
20
- # folder used for task
20
+ # folder used for programs, e.g. uv, uvx, task, etc.
21
21
  bin
22
22
 
23
23
  # Byte-compiled / optimized / DLL files
@@ -93,4 +93,6 @@ instance/
93
93
  # Cython debug symbols
94
94
  cython_debug/
95
95
 
96
+ # Makefile
97
+ local.mk
96
98
 
@@ -9,7 +9,7 @@ repos:
9
9
  - id: check-yaml
10
10
 
11
11
  - repo: https://github.com/astral-sh/ruff-pre-commit
12
- rev: 'v0.14.11'
12
+ rev: 'v0.14.13'
13
13
  hooks:
14
14
  - id: ruff
15
15
  args: [ --fix, --exit-non-zero-on-fix, --unsafe-fixes ]
@@ -43,11 +43,24 @@ repos:
43
43
  hooks:
44
44
  - id: validate-pyproject
45
45
 
46
+ - repo: https://github.com/PyCQA/bandit
47
+ rev: 1.9.2
48
+ hooks:
49
+ - id: bandit
50
+ args: ["--skip", "B101", "--exclude", ".venv,tests,.git,.pytest_cache"]
51
+
46
52
  - repo: local
47
53
  hooks:
48
54
  - id: update-readme-help
49
55
  name: Update README with Makefile help output
50
- entry: /bin/sh .rhiza/scripts/update-readme-help.sh
56
+ entry: make readme
51
57
  language: system
52
58
  files: '^Makefile$'
53
59
  pass_filenames: false
60
+
61
+ - id: check-rhiza-workflow-names
62
+ name: Check and Fix Rhiza workflow names
63
+ entry: python .rhiza/scripts/check_workflow_names.py
64
+ language: python
65
+ additional_dependencies: [PyYAML]
66
+ files: ^\.github/workflows/rhiza_.*\.ya?ml$
@@ -0,0 +1,2 @@
1
+ # Dedicated rhiza ignore rules
2
+ !.env
@@ -9,7 +9,7 @@ This directory contains platform-agnostic scripts and utilities for the reposito
9
9
  ## Structure
10
10
 
11
11
  - **scripts/** - Shell scripts for common tasks (book generation, release, etc.)
12
- - **scripts/customisations/** - Repository-specific customization hooks
12
+ - **scripts/customisations/** - Repository-specific customisation hooks
13
13
  - **utils/** - Python utilities for version management
14
14
 
15
15
  GitHub-specific composite actions are located in `.github/rhiza/actions/`.
@@ -5,10 +5,12 @@
5
5
  #
6
6
  # Files under template control:
7
7
  .editorconfig
8
- .github/Makefile.gh
8
+ .github/agents/agentic.mk
9
9
  .github/agents/analyser.md
10
10
  .github/agents/summarise.md
11
11
  .github/copilot-instructions.md
12
+ .github/github.mk
13
+ .github/workflows/rhiza_benchmarks.yml
12
14
  .github/workflows/rhiza_book.yml
13
15
  .github/workflows/rhiza_ci.yml
14
16
  .github/workflows/rhiza_codeql.yml
@@ -16,6 +18,7 @@
16
18
  .github/workflows/rhiza_marimo.yml
17
19
  .github/workflows/rhiza_pre-commit.yml
18
20
  .github/workflows/rhiza_release.yml
21
+ .github/workflows/rhiza_security.yml
19
22
  .github/workflows/rhiza_sync.yml
20
23
  .github/workflows/rhiza_validate.yml
21
24
  .gitignore
@@ -23,53 +26,52 @@
23
26
  .python-version
24
27
  .rhiza/.cfg.toml
25
28
  .rhiza/.env
26
- .rhiza/Makefile.rhiza
27
- .rhiza/agentic/Makefile.agentic
28
- .rhiza/customisations/Makefile.customisations
29
- .rhiza/customisations/scripts/build-extras.sh
30
- .rhiza/customisations/scripts/post-release.sh
29
+ .rhiza/.gitignore
31
30
  .rhiza/docs/CONFIG.md
32
31
  .rhiza/docs/TOKEN_SETUP.md
32
+ .rhiza/make.d/01-custom-env.mk
33
+ .rhiza/make.d/10-custom-task.mk
34
+ .rhiza/make.d/README.md
33
35
  .rhiza/requirements/README.md
34
36
  .rhiza/requirements/docs.txt
35
37
  .rhiza/requirements/marimo.txt
36
38
  .rhiza/requirements/tests.txt
37
39
  .rhiza/requirements/tools.txt
38
- .rhiza/scripts/book.sh
39
- .rhiza/scripts/generate-coverage-badge.sh
40
- .rhiza/scripts/marimushka.sh
40
+ .rhiza/rhiza.mk
41
+ .rhiza/scripts/check_workflow_names.py
41
42
  .rhiza/scripts/release.sh
42
- .rhiza/scripts/update-readme-help.sh
43
43
  .rhiza/utils/version_matrix.py
44
44
  CODE_OF_CONDUCT.md
45
45
  CONTRIBUTING.md
46
46
  Makefile
47
- book/Makefile.book
48
47
  book/README.md
48
+ book/book.mk
49
49
  book/marimo/README.md
50
- book/marimo/rhiza.py
50
+ book/marimo/marimo.mk
51
+ book/marimo/notebooks/rhiza.py
51
52
  book/minibook-templates/custom.html.jinja2
52
53
  book/pdoc-templates/module.html.jinja2
53
- presentation/Makefile.presentation
54
54
  presentation/README.md
55
+ presentation/presentation.mk
55
56
  pytest.ini
56
57
  renovate.json
57
58
  ruff.toml
58
- tests/Makefile.tests
59
59
  tests/test_rhiza/README.md
60
60
  tests/test_rhiza/benchmarks/.gitignore
61
61
  tests/test_rhiza/benchmarks/README.md
62
62
  tests/test_rhiza/benchmarks/analyze_benchmarks.py
63
63
  tests/test_rhiza/conftest.py
64
- tests/test_rhiza/test_coverage_badge.py
64
+ tests/test_rhiza/test_check_workflow_names.py
65
65
  tests/test_rhiza/test_docstrings.py
66
66
  tests/test_rhiza/test_git_repo_fixture.py
67
67
  tests/test_rhiza/test_makefile.py
68
+ tests/test_rhiza/test_makefile_api.py
68
69
  tests/test_rhiza/test_makefile_gh.py
69
- tests/test_rhiza/test_marimushka_script.py
70
+ tests/test_rhiza/test_marimushka_target.py
70
71
  tests/test_rhiza/test_notebooks.py
71
72
  tests/test_rhiza/test_readme.py
72
73
  tests/test_rhiza/test_release_script.py
73
74
  tests/test_rhiza/test_requirements_folder.py
74
75
  tests/test_rhiza/test_structure.py
75
- tests/test_rhiza/test_updatereadme_script.py
76
+ tests/test_rhiza/test_version_matrix.py
77
+ tests/tests.mk
@@ -0,0 +1,9 @@
1
+ ## .rhiza/make.d/01-custom-env.mk - Custom Environment Configuration
2
+ # This file example shows how to set variables for the project.
3
+
4
+ # Custom variables for this repository
5
+ PROJECT_NAME_EXTRA := Rhiza Platform
6
+ LOG_LEVEL ?= INFO
7
+
8
+ # Overriding core variables (be careful)
9
+ # VENV := .venv_custom
@@ -0,0 +1,12 @@
1
+ ## .rhiza/make.d/10-custom-task.mk - Custom Repository Tasks
2
+ # This file example shows how to add new targets.
3
+
4
+ .PHONY: hello-rhiza
5
+
6
+ ##@ Custom Tasks
7
+ hello-rhiza: ## a custom greeting task
8
+ @printf "${GREEN}[INFO] Hello from the customised Rhiza project!${RESET}\n"
9
+
10
+ # Adding logic to existing hooks
11
+ post-install:: ## run custom logic after core install
12
+ @printf "${BLUE}[INFO] Running custom post-install steps...${RESET}\n"
@@ -0,0 +1,82 @@
1
+ # Makefile Cookbook
2
+
3
+ This directory (`.rhiza/make.d/`) is the designated place for **repository-specific build logic**. Any `.mk` file added here is automatically absorbed by the main Makefile.
4
+
5
+ Use this cookbook to find copy-paste patterns for common development needs.
6
+
7
+ ## 🥘 Recipes
8
+
9
+ ### 1. Add a Simple Task
10
+ **Goal**: Run a script with `make train-model`.
11
+
12
+ Create `.rhiza/make.d/50-model.mk`:
13
+ ```makefile
14
+ ##@ Machine Learning
15
+ train: ## Train the model using local data
16
+ @echo "Training model..."
17
+ @uv run python scripts/train.py
18
+ ```
19
+
20
+ ### 2. Inject Code into Standard Workflows (Hooks)
21
+ **Goal**: Apply task after `make sync`.
22
+
23
+ Create `.rhiza/make.d/90-hooks.mk`:
24
+ ```makefile
25
+ post-sync::
26
+ @echo "Applying something..."
27
+ ```
28
+ *Note: Use double-colons (`::`) for hooks to avoid conflicts.*
29
+
30
+ ### 3. Define Global Variables
31
+ **Goal**: Set a default timeout for all test runs.
32
+
33
+ Create `.rhiza/make.d/01-config.mk`:
34
+ ```makefile
35
+ # Override default timeout (defaults to 60s)
36
+ export TEST_TIMEOUT := 120
37
+ ```
38
+
39
+ ### 4. Create a Private Shortcut
40
+ **Goal**: Create a command that only exists on my machine (not committed).
41
+
42
+ Do not use `.rhiza/make.d/`. Instead, create a `local.mk` in the project root:
43
+ ```makefile
44
+ deploy-dev:
45
+ @./scripts/deploy-to-my-sandbox.sh
46
+ ```
47
+
48
+ ### 5. Install System Dependencies
49
+ **Goal**: Ensure `graphviz` is installed for Marimo notebooks using a hook.
50
+
51
+ Create `.rhiza/make.d/20-dependencies.mk`:
52
+ ```makefile
53
+ pre-install::
54
+ @if ! command -v dot >/dev/null 2>&1; then \
55
+ echo "Graphviz not found. Installing..."; \
56
+ if command -v brew >/dev/null 2>&1; then \
57
+ brew install graphviz; \
58
+ elif command -v apt-get >/dev/null 2>&1; then \
59
+ sudo apt-get install -y graphviz; \
60
+ else \
61
+ echo "Please install graphviz manually."; \
62
+ exit 1; \
63
+ fi \
64
+ fi
65
+ ```
66
+
67
+ ---
68
+
69
+ ## ℹ️ Reference
70
+
71
+ ### Execution Order
72
+ Files are loaded alphabetically. We use numeric prefixes to ensure dependencies resolve correctly:
73
+ - `00-19`: Configuration & Variables
74
+ - `20-79`: Custom Tasks & Rules
75
+ - `80-99`: Hooks & Lifecycle logic
76
+
77
+ ### Available Hooks
78
+ - `pre-install` / `post-install`: Runs around `make install`.
79
+ - `pre-sync` / `post-sync`: Runs around repository synchronization.
80
+ - `pre-validate` / `post-validate`: Runs around validation checks.
81
+ - `pre-release` / `post-release`: Runs around release process.
82
+ - `pre-bump` / `post-bump`: Runs around version bumping.