Add your description here
Project description
📓 NotebookTester
A fast, reliable, and parallel Jupyter notebook testing tool with caching support! Test your notebooks with confidence.
🌟 Features
- 🚀 Parallel Execution: Test multiple notebooks simultaneously
- ⏱️ Configurable Timeouts: Set custom timeouts for notebook execution
- 💾 Smart Caching: Cache test results to avoid unnecessary re-runs
- 🎯 Selective Testing: Only test modified notebooks
- 📊 Detailed Logging: Comprehensive logs with test results and errors
- 🛠️ CLI Support: Easy to use command-line interface
🔧 Installation
Choose your preferred package manager:
Using pip (slow legacy)
pip install notebooktester
Using uv (10-100x faster)
see uv docs for more info.
uv add notebooktester
🚀 Quick Start
Test a single notebook:
notebooktester path/to/your/notebook.ipynb
Test all notebooks in a directory:
notebooktester path/to/notebooks/directory
🎮 Command Line Options
notebooktester [OPTIONS] PATH
Options:
-t, --timeout SECONDS: Timeout in seconds for each notebook (default: 60)-w, --workers NUMBER: Number of parallel workers (default: CPU count)-c, --cache-dir PATH: Cache directory for test results (default: .notebookcache)-v, --verbose: Enable verbose output-f, --force: Ignore cache and force test execution
📋 Example Usage
Basic usage:
notebooktester notebooks/
With custom timeout and workers:
notebooktester notebooks/ -t 120 -w 4
Force re-run all tests:
notebooktester notebooks/ --force
🔍 Cache Behavior
NotebookTester maintains a cache of test results to optimize performance:
- Only notebooks modified since their last test run are re-tested
- If the notebook timed out, and the current timeout has not been increased, notebook is skipped
- Cached results include success/failure status and error messages
- Force flag (
-f) bypasses the cache
📊 Output
The tool provides:
- Progress bar for test execution
- Colored console output for test results
- Detailed logs in the
logs/directory - Summary of passed and failed tests
Example output:
>>notebooktester notebooks/ -t 120 -w 4
Running tests with 4 workers
Starting notebook tests - found 10 notebooks
✅ PASSED - notebook1.ipynb: Success
❌ FAILED - notebook2.ipynb: Cell execution error
⏰ TIMEOUT - notebook3.ipynb: A cell timed out
Test Summary: 8 passed, 2 failed
🤝 Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
👤 Author
Raoul Grouls (Raoul.Grouls@han.nl)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notebooktester-0.1.1.tar.gz.
File metadata
- Download URL: notebooktester-0.1.1.tar.gz
- Upload date:
- Size: 54.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79841ef43bcbb75d70971f66862642d66bf819f623d70a2255acd9c648cc051b
|
|
| MD5 |
bd49dd174e163b030125fb55feb1cfc8
|
|
| BLAKE2b-256 |
37a12fa2b3e5a1de16fbfac5f7c85f53e6be99ff5dd9b2dc7916b02b42c3118d
|
File details
Details for the file notebooktester-0.1.1-py3-none-any.whl.
File metadata
- Download URL: notebooktester-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df8dcd6259379445d6004bba75ebd46b4ec217e5879428b0defaa99957073ca3
|
|
| MD5 |
93af744b387ec0be6c971e84b04a8632
|
|
| BLAKE2b-256 |
5e8d0a212fc28ae7d9118a06411cd60f60b63e696daf6771a934cb7374d37b2c
|