This package is aimed at removing the manual aspects of the typical programming change-check cycle, usually invoked by
- edit
- save
<alt-tab>
<up-arrow><enter>
- curse/scream/yell/despair
<alt-tab>
- Continue from step 1...
Invoke the macro @observe
on a function call. The documentation is:
@observe func(args... ; kwds...)
Use Revise
to "observe" changes to a functions behaviour. This will track the
return values and the stdout/stderr of the function.
Notes:
- This only tracks stdout, stderr output using
redirect_stdxxx
. Many functions (e.g.display
) will not output to the current stdout and so will not be captured. - "Repeats" are recorded. Two calls repeat, when they have the same output.
- Currently, any change to the function's module will cause the function to be retested.
- This will probably only work on linux at the moment...
- Diffs of output and returned values.
- Multiple input arguments to test several cases at once.
- Option to focus on failures or focus on successes.
- Quick option to save tests as unit tests in package.
- Option to load tests from
runtest.jl
.
This idea was inspired by Brett Victor's talk "Inventing on Principle": https://www.youtube.com/watch?v=8QiPFmIMxFc
See the emacs package julia-funcobs
for an IDE-like interface with julia-repl
. Includes image support from
Plots.jl
.
Why "Eye of Ra"?
- Watches over.
- Protective.
- Can get "out of control".
- Horus always gets the attention.