This repository was archived by the owner on Apr 28, 2026. It is now read-only.
Description 馃殌 The feature, motivation and pitch
Overview
Automate testing for notebooks in examples/notebooks/ to ensure they remain executable and up-to-date.
Current Notebooks
Cybersecurity_demo.ipynb
LlamaGuard.ipynb
LlamaGuardMM.ipynb
Recommended Approach
Use nbmake for execution testing + testbook for detailed unit tests.
nbmake (execution testing)
pytest --nbmake examples/notebooks/* .ipynb
testbook (unit testing)
@testbook('examples/notebooks/LlamaGuard.ipynb', execute=True)
def test_llamaguard_notebook(tb):
tb.execute_cell([0, 1, 2])
assert tb.ref('some_variable') is not None
Dependencies to Add
nbmake>=1.4.0
testbook>=0.4.2
jupyter>=1.0.0
Implementation Notes
Mock external API calls
Set appropriate cell timeouts
Create fixtures for common test data
Configure in pytest.ini
Success Criteria
Dependencies added
All notebooks execute successfully
Test configuration in pytest.ini
Mock fixtures for external dependencies
Documentation updated
Alternatives
No response
Additional context
No response
Reactions are currently unavailable
馃殌 The feature, motivation and pitch
Overview
Automate testing for notebooks in
examples/notebooks/to ensure they remain executable and up-to-date.Current Notebooks
Cybersecurity_demo.ipynbLlamaGuard.ipynbLlamaGuardMM.ipynbRecommended Approach
Use nbmake for execution testing + testbook for detailed unit tests.
nbmake (execution testing)
pytest --nbmake examples/notebooks/*.ipynbtestbook (unit testing)
Dependencies to Add
nbmake>=1.4.0
testbook>=0.4.2
jupyter>=1.0.0
Implementation Notes
Success Criteria
Alternatives
No response
Additional context
No response