rhiza 0.6.1__tar.gz → 0.7.1__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 (81) hide show
  1. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/security.yml +1 -1
  2. {rhiza-0.6.1 → rhiza-0.7.1}/.rhiza.history +2 -2
  3. {rhiza-0.6.1 → rhiza-0.7.1}/CLI.md +2 -0
  4. {rhiza-0.6.1 → rhiza-0.7.1}/PKG-INFO +1 -1
  5. {rhiza-0.6.1 → rhiza-0.7.1}/USAGE.md +2 -1
  6. rhiza-0.7.1/book/marimo/README.md +142 -0
  7. rhiza-0.7.1/book/marimo/rhiza.py +668 -0
  8. {rhiza-0.6.1 → rhiza-0.7.1}/pyproject.toml +1 -1
  9. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/commands/init.py +2 -2
  10. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/commands/materialize.py +41 -2
  11. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_commands/test_materialize.py +176 -0
  12. {rhiza-0.6.1 → rhiza-0.7.1}/uv.lock +1 -1
  13. {rhiza-0.6.1 → rhiza-0.7.1}/.editorconfig +0 -0
  14. {rhiza-0.6.1 → rhiza-0.7.1}/.github/actions/setup-project/action.yml +0 -0
  15. {rhiza-0.6.1 → rhiza-0.7.1}/.github/dependabot.yml +0 -0
  16. {rhiza-0.6.1 → rhiza-0.7.1}/.github/renovate.json +0 -0
  17. {rhiza-0.6.1 → rhiza-0.7.1}/.github/rhiza/CONFIG.md +0 -0
  18. {rhiza-0.6.1 → rhiza-0.7.1}/.github/rhiza/TOKEN_SETUP.md +0 -0
  19. {rhiza-0.6.1 → rhiza-0.7.1}/.github/rhiza/copilot-instructions.md +0 -0
  20. {rhiza-0.6.1 → rhiza-0.7.1}/.github/rhiza/template.yml +0 -0
  21. {rhiza-0.6.1 → rhiza-0.7.1}/.github/scripts/book.sh +0 -0
  22. {rhiza-0.6.1 → rhiza-0.7.1}/.github/scripts/bump.sh +0 -0
  23. {rhiza-0.6.1 → rhiza-0.7.1}/.github/scripts/customisations/build-extras.sh +0 -0
  24. {rhiza-0.6.1 → rhiza-0.7.1}/.github/scripts/customisations/post-release.sh +0 -0
  25. {rhiza-0.6.1 → rhiza-0.7.1}/.github/scripts/marimushka.sh +0 -0
  26. {rhiza-0.6.1 → rhiza-0.7.1}/.github/scripts/release.sh +0 -0
  27. {rhiza-0.6.1 → rhiza-0.7.1}/.github/scripts/update-readme-help.sh +0 -0
  28. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/book.yml +0 -0
  29. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/ci.yml +0 -0
  30. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/deptry.yml +0 -0
  31. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/marimo.yml +0 -0
  32. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/pre-commit.yml +0 -0
  33. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/release.yml +0 -0
  34. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/rhiza.yml +0 -0
  35. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/scripts/version_matrix.py +0 -0
  36. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/scripts/version_max.py +0 -0
  37. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/structure.yml +0 -0
  38. {rhiza-0.6.1 → rhiza-0.7.1}/.github/workflows/sync.yml +0 -0
  39. {rhiza-0.6.1 → rhiza-0.7.1}/.gitignore +0 -0
  40. {rhiza-0.6.1 → rhiza-0.7.1}/.pre-commit-config.yaml +0 -0
  41. {rhiza-0.6.1 → rhiza-0.7.1}/CODE_OF_CONDUCT.md +0 -0
  42. {rhiza-0.6.1 → rhiza-0.7.1}/CONTRIBUTING.md +0 -0
  43. {rhiza-0.6.1 → rhiza-0.7.1}/GETTING_STARTED.md +0 -0
  44. {rhiza-0.6.1 → rhiza-0.7.1}/LICENSE +0 -0
  45. {rhiza-0.6.1 → rhiza-0.7.1}/Makefile +0 -0
  46. {rhiza-0.6.1 → rhiza-0.7.1}/README.md +0 -0
  47. {rhiza-0.6.1 → rhiza-0.7.1}/book/Makefile.book +0 -0
  48. {rhiza-0.6.1 → rhiza-0.7.1}/book/marimo/.gitkeep +0 -0
  49. {rhiza-0.6.1 → rhiza-0.7.1}/book/minibook-templates/custom.html.jinja2 +0 -0
  50. {rhiza-0.6.1 → rhiza-0.7.1}/book/pdoc-templates/module.html.jinja2 +0 -0
  51. {rhiza-0.6.1 → rhiza-0.7.1}/presentation/Makefile.presentation +0 -0
  52. {rhiza-0.6.1 → rhiza-0.7.1}/presentation/README.md +0 -0
  53. {rhiza-0.6.1 → rhiza-0.7.1}/pytest.ini +0 -0
  54. {rhiza-0.6.1 → rhiza-0.7.1}/ruff.toml +0 -0
  55. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/__init__.py +0 -0
  56. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/__main__.py +0 -0
  57. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/cli.py +0 -0
  58. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/commands/__init__.py +0 -0
  59. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/commands/validate.py +0 -0
  60. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/commands/welcome.py +0 -0
  61. {rhiza-0.6.1 → rhiza-0.7.1}/src/rhiza/models.py +0 -0
  62. {rhiza-0.6.1 → rhiza-0.7.1}/tests/Makefile.tests +0 -0
  63. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_cli_commands.py +0 -0
  64. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_commands/test_init.py +0 -0
  65. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_commands/test_validate.py +0 -0
  66. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_models.py +0 -0
  67. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_package.py +0 -0
  68. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/README.md +0 -0
  69. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/benchmarks/.gitignore +0 -0
  70. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/benchmarks/README.md +0 -0
  71. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/benchmarks/analyze_benchmarks.py +0 -0
  72. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/conftest.py +0 -0
  73. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_bump_script.py +0 -0
  74. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_docstrings.py +0 -0
  75. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_git_repo_fixture.py +0 -0
  76. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_makefile.py +0 -0
  77. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_marimushka_script.py +0 -0
  78. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_readme.py +0 -0
  79. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_release_script.py +0 -0
  80. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_structure.py +0 -0
  81. {rhiza-0.6.1 → rhiza-0.7.1}/tests/test_rhiza/test_updatereadme_script.py +0 -0
@@ -9,7 +9,7 @@ on:
9
9
  branches: [ main, master ]
10
10
  pull_request:
11
11
  branches: [ main, master ]
12
- # Add to .github/workflows/security.yml (partial example)
12
+
13
13
  jobs:
14
14
  security:
15
15
  runs-on: ubuntu-latest
@@ -34,10 +34,10 @@ CODE_OF_CONDUCT.md
34
34
  CONTRIBUTING.md
35
35
  Makefile
36
36
  book/Makefile.book
37
+ book/marimo/README.md
38
+ book/marimo/rhiza.py
37
39
  book/minibook-templates/custom.html.jinja2
38
40
  book/pdoc-templates/module.html.jinja2
39
- presentation/Makefile.presentation
40
- presentation/README.md
41
41
  pytest.ini
42
42
  ruff.toml
43
43
  tests/Makefile.tests
@@ -84,6 +84,7 @@ rhiza materialize -b main -y # Short form
84
84
  - Respects exclude patterns
85
85
  - Skips existing files unless `--force` is used
86
86
  - Creates `.rhiza.history` file listing all files under template control
87
+ - **Automatically removes orphaned files** - files that were previously managed by the template but are no longer in the current `include` list
87
88
 
88
89
  ---
89
90
 
@@ -130,6 +131,7 @@ After running `rhiza materialize`, a `.rhiza.history` file is created in the pro
130
131
  - Includes metadata about the template repository and branch
131
132
  - Is regenerated each time `rhiza materialize` runs
132
133
  - Should be committed to version control
134
+ - Is used to detect and remove orphaned files (files that were previously managed but are no longer in the current template configuration)
133
135
 
134
136
  **Example:**
135
137
  ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rhiza
3
- Version: 0.6.1
3
+ Version: 0.7.1
4
4
  Summary: Reusable configuration templates for modern Python projects
5
5
  Project-URL: Homepage, https://github.com/jebel-quant/rhiza-cli
6
6
  Project-URL: Repository, https://github.com/jebel-quant/rhiza-cli
@@ -129,8 +129,9 @@ This file helps you:
129
129
  - Track which files are managed by the template
130
130
  - Understand what will be updated when you re-run `rhiza materialize`
131
131
  - Identify which files to be careful with when making local modifications
132
+ - **Detect orphaned files** - when you re-run `rhiza materialize`, any files listed in `.rhiza.history` but no longer in the current template configuration will be automatically deleted
132
133
 
133
- **Important:** The `.rhiza.history` file is regenerated each time you run `rhiza materialize`, so you should commit it along with your other template files.
134
+ **Important:** The `.rhiza.history` file is regenerated each time you run `rhiza materialize`, so you should commit it along with your other template files. When re-running materialize, Rhiza will compare the old history with the new configuration and remove any files that are no longer being managed.
134
135
 
135
136
  ## Basic Workflows
136
137
 
@@ -0,0 +1,142 @@
1
+ # Marimo Notebooks
2
+
3
+ This directory contains interactive [Marimo](https://marimo.io/) notebooks for the Rhiza project.
4
+
5
+ ## Available Notebooks
6
+
7
+ ### 📊 rhiza.py - Marimo Feature Showcase
8
+
9
+ A comprehensive demonstration of Marimo's most useful features, including:
10
+
11
+ - **Interactive UI Elements**: Sliders, dropdowns, text inputs, checkboxes, and multiselect
12
+ - **Reactive Programming**: Automatic cell updates when dependencies change
13
+ - **Data Visualization**: Interactive plots using Plotly
14
+ - **DataFrames**: Working with Pandas data
15
+ - **Layout Components**: Columns, tabs, and accordions for organized content
16
+ - **Forms**: Dictionary-based forms for collecting user input
17
+ - **Rich Text**: Markdown and LaTeX support for documentation
18
+ - **Advanced Features**: Callouts, collapsible accordions, and more
19
+
20
+ This notebook is perfect for:
21
+ - Learning Marimo's capabilities
22
+ - Understanding reactive programming in notebooks
23
+ - Seeing real examples of interactive UI components
24
+ - Getting started with Marimo in your own projects
25
+
26
+ ## Running the Notebooks
27
+
28
+ ### Using the Makefile
29
+
30
+ From the repository root:
31
+
32
+ ```bash
33
+ make marimo
34
+ ```
35
+
36
+ This will start the Marimo server and open all notebooks in the `book/marimo` directory.
37
+
38
+ ### Running a Specific Notebook
39
+
40
+ To run a single notebook:
41
+
42
+ ```bash
43
+ marimo edit book/marimo/rhiza.py
44
+ ```
45
+
46
+ ### Using uv (Recommended)
47
+
48
+ The notebooks include inline dependency metadata, making them self-contained:
49
+
50
+ ```bash
51
+ uv run book/marimo/rhiza.py
52
+ ```
53
+
54
+ This will automatically install the required dependencies and run the notebook.
55
+
56
+ ## Notebook Structure
57
+
58
+ Marimo notebooks are **pure Python files** (`.py`), not JSON. This means:
59
+
60
+ - ✅ Easy version control with Git
61
+ - ✅ Standard code review workflows
62
+ - ✅ No hidden metadata
63
+ - ✅ Compatible with all Python tools
64
+
65
+ Each notebook includes inline metadata that specifies its dependencies:
66
+
67
+ ```python
68
+ # /// script
69
+ # requires-python = ">=3.11"
70
+ # dependencies = [
71
+ # "marimo==0.18.4",
72
+ # "numpy>=1.24.0",
73
+ # ]
74
+ # ///
75
+ ```
76
+
77
+ ## Configuration
78
+
79
+ Marimo is configured in `pyproject.toml` to properly import the local package:
80
+
81
+ ```toml
82
+ [tool.marimo.runtime]
83
+ pythonpath = ["src"]
84
+ ```
85
+
86
+ ## CI/CD Integration
87
+
88
+ The `.github/workflows/marimo.yml` workflow automatically:
89
+
90
+ 1. Discovers all `.py` files in this directory
91
+ 2. Runs each notebook in a fresh environment
92
+ 3. Verifies that notebooks can bootstrap themselves
93
+ 4. Ensures reproducibility
94
+
95
+ This guarantees that all notebooks remain functional and up-to-date.
96
+
97
+ ## Creating New Notebooks
98
+
99
+ To create a new Marimo notebook:
100
+
101
+ 1. Create a new `.py` file in this directory:
102
+ ```bash
103
+ marimo edit book/marimo/my_notebook.py
104
+ ```
105
+
106
+ 2. Add inline metadata at the top:
107
+ ```python
108
+ # /// script
109
+ # requires-python = ">=3.11"
110
+ # dependencies = [
111
+ # "marimo==0.18.4",
112
+ # # ... other dependencies
113
+ # ]
114
+ # ///
115
+ ```
116
+
117
+ 3. Start building your notebook with cells
118
+
119
+ 4. Test it runs in a clean environment:
120
+ ```bash
121
+ uv run book/marimo/my_notebook.py
122
+ ```
123
+
124
+ 5. Commit and push - the CI will validate it automatically
125
+
126
+ ## Learn More
127
+
128
+ - **Marimo Documentation**: [https://docs.marimo.io/](https://docs.marimo.io/)
129
+ - **Example Gallery**: [https://marimo.io/examples](https://marimo.io/examples)
130
+ - **Community Discord**: [https://discord.gg/JE7nhX6mD8](https://discord.gg/JE7nhX6mD8)
131
+
132
+ ## Tips
133
+
134
+ - **Reactivity**: Remember that cells automatically re-run when their dependencies change
135
+ - **Pure Python**: Edit notebooks in any text editor, not just Marimo's UI
136
+ - **Git-Friendly**: Notebooks diff and merge like regular Python files
137
+ - **Self-Contained**: Use inline metadata to make notebooks reproducible
138
+ - **Interactive**: Take advantage of Marimo's rich UI components for better user experience
139
+
140
+ ---
141
+
142
+ *Happy exploring with Marimo! 🚀*