This project was renamed from 'Turret' to 'Jaffle'.
Jaffle is an automation tool for Python software development, which has the following features:
- Instantiate Python applications in a Jupyter kernel and allows them to interact each other
- Launch external processes
- Combine all log messages and allows filtering and reformatting by regular expressions and functions
- Built-in WatchdogApp watches filesystem events and triggers another app, arbitrary code, and functions, which make it possible to setup various automations.
- Auto-testing with pytest
- Automatic Sphinx Document Build
- Web Development with Tornado and React
- Jupyter Extension Development
They are included in examples directory.
This is an example of jaffle.hcl
for auto-testing.
You can run it by jaffle start
.
kernel "py_kernel" {}
app "watchdog" {
class = "jaffle.app.watchdog.WatchdogApp"
kernel = "py_kernel"
options {
handlers = [{
patterns = ["*.py"]
ignore_directories = true
code_blocks = ["pytest.handle_watchdog_event({event})"]
}]
}
}
app "pytest" {
class = "jaffle.app.pytest.PyTestRunnerApp"
kernel = "py_kernel"
options {
args = ["-s", "-v", "--color=yes"]
auto_test = [
"pytest_example/tests/test_*.py",
]
auto_test_map {
"pytest_example/**/*.py" = "pytest_example/tests/{}/test_{}.py"
}
}
}
- UNIX-like OS
- Windows is not supported
- Python >= 3.4
- Jupyter Notebook >= 5.0
- Tornado >= 4.5, < 5
Jupyter Notebook and Tornado will be installed automatically if they do not exist in your environment. Tornado 5 is not yet supported.
$ pip install jaffle
You will also probably need pytest:
$ pip install pytest
BSD 3-Clause License
Jaffle is intended to be a development tool and does not care much about
security. Arbitrary Python code can be executed in jaffle.hcl
and
you should not use it as a part of production environment. jaffle.hcl
is like a Makefile or a shell script included in a source code repository.
- Watchdog
- Python API and shell utilities to monitor file system events. Jaffle depends on it.
- pytest-testmon
- pytest plugin to select tests affected by recent changes. It looks code coverage to determine which tests should be executed, whereas Jaffle uses simple pattern mapping.
- pytest-watch
- Continuous pytest runner using Watchdog, which also supports notification, before/after hoooks and using a custom runner script. It executes pytest as a subprocess.
- Foreman
- Procfile-based process manager.
- coloredlogcat.py and
PID Cat
- Android logcat modifier. Jaffle's log formatter was inspired by them.