✔️ Visual, reactive testing library for Julia. Time machine included.

Overview

PlutoTest.jl (alpha release)

Visual, reactive testing library for Julia

A macro @test that you can use to verify your code's correctness. But instead of just saying "Pass" or "Fail", let's try to show you why a test failed.

  • time travel to replay the execution step-by-step
  • ⭐️ multimedia display ⭐️ to make results easy to read

Demo screencap

Try this demo in your browser

Install & use

First, update Pluto to at least 0.15! That's it, Pluto will automatically install the package when you import/using it.

Inside your notebook, use the @test macro to test whether something returns true:

julia> using PlutoTest

julia> @test 1 + 1 == 2

This package is still an alpha release, don't use it to @test is_safe(crazy_new_bike_design).

Reactive

This testing library is designed to be used inside Pluto.jl, a reactive notebook. If you write your tests in the same notebook as your code, then Pluto will automatically re-run the affected tests after you make a change. Tests that are unaffected will not need to re-run. Neat!

Navigation

When a test gets re-run and it fails outside of your viewport, you will be notified with a red dot on the edge of the screen. You can click on a dot to jump to the test, multiple dots indicate multiple tests.

(Only enabled on Chrome and Firefox for now.)

Future: GitHub Action

In the future, it will be easy to run Pluto-based, PlutoTest-based tests automatically on GitHub Actions or Travis CI. In addition to running your tests, it will upload a rendered notebook as artifact to the test run (sample). If a test failed, you can open the notebook and see why.

How does it work?

Take a look at the source code! (It's a Pluto notebook 🌝 )

You might also like...
Pythonic particle-based (super-droplet) warm-rain/aqueous-chemistry cloud microphysics package with box, parcel & 1D/2D prescribed-flow examples in Python, Julia and Matlab
Pythonic particle-based (super-droplet) warm-rain/aqueous-chemistry cloud microphysics package with box, parcel & 1D/2D prescribed-flow examples in Python, Julia and Matlab

PySDM PySDM is a package for simulating the dynamics of population of particles. It is intended to serve as a building block for simulation systems mo

A numpy-based implementation of RANSAC for fundamental matrix and homography estimation. The degeneracy updating and local optimization components are included and optional.
A numpy-based implementation of RANSAC for fundamental matrix and homography estimation. The degeneracy updating and local optimization components are included and optional.

Description A numpy-based implementation of RANSAC for fundamental matrix and homography estimation. The degeneracy updating and local optimization co

Accelerated SMPL operation, commonly used in generate 3D human mesh, STAR included.

SMPL2 An enchanced and accelerated SMPL operation which commonly used in 3D human mesh generation. It takes a poses, shapes, cam_trans as inputs, outp

improvement of CLIP features over the traditional resnet features on the visual question answering, image captioning, navigation and visual entailment tasks.

CLIP-ViL In our paper "How Much Can CLIP Benefit Vision-and-Language Tasks?", we show the improvement of CLIP features over the traditional resnet fea

A set of tools for creating and testing machine learning features, with a scikit-learn compatible API

Feature Forge This library provides a set of tools that can be useful in many machine learning applications (classification, clustering, regression, e

STMTrack: Template-free Visual Tracking with Space-time Memory Networks

STMTrack This is the official implementation of the paper: STMTrack: Template-free Visual Tracking with Space-time Memory Networks. Setup Prepare Anac

This application is the basic of automated online-class-joiner(for YıldızEdu) within the right time. Gets the ZOOM link by scheduled date and time.
This application is the basic of automated online-class-joiner(for YıldızEdu) within the right time. Gets the ZOOM link by scheduled date and time.

This application is the basic of automated online-class-joiner(for YıldızEdu) within the right time. Gets the ZOOM link by scheduled date and time.

Time-series-deep-learning - Developing Deep learning LSTM, BiLSTM models, and NeuralProphet for multi-step time-series forecasting of stock price.
Time-series-deep-learning - Developing Deep learning LSTM, BiLSTM models, and NeuralProphet for multi-step time-series forecasting of stock price.

Stock Price Prediction Using Deep Learning Univariate Time Series Predicting stock price using historical data of a company using Neural networks for

Comments
  • Be more similar to Test.@test interface

    Be more similar to Test.@test interface

    Specifically, and most hard to work around, getting local variables to work:

    let
      i = 10
      @test i == 10
    end
    

    It does, but I'd like to have errors and testsets too (or rather just have the notebook a bit cleaned up)

    opened by dralletje 6
  • Show test pass at first frame

    Show test pass at first frame

    Currently, we always show the second-to-last frame as the default, until you move the timeline:

    This makes sense for test failures, because probably the last function call went from computed results to false, like a == call. But for test passes, it often just shows something trivial.

    This PR makes the first frame the default for test passes. This means that you can hide all code, and sort of quickly see what was being tested:

    But as you see in the screenshot, a large test expression means that it takes up more vertical space...

    opened by fonsp 3
  • allow HyperTextLiteral v0.9

    allow HyperTextLiteral v0.9

    Currently, compat for HypertextLiteral is set to v0.6 to 0.8. The most recent version of HypertextLiteral, 0.9, is not supported. This causes issues when using PlutoTest together with other packages which require HypertextLiteral 0.9.

    I do not think that there are breaking changes, therefore it should be sufficient just to add a compat entry for 0.9.

    opened by lungben 1
  • Be more similar to Test.@test interface

    Be more similar to Test.@test interface

    Specifically, and most hard to work around, getting local variables to work:

    let
      i = 10
      @test i == 10
    end
    

    It does, but I'd like to have errors and testsets too (or rather just have the notebook a bit cleaned up)

    opened by dralletje 0
Releases(v0.2.2)
Owner
Pluto
🎈 Simple reactive notebooks for Julia — https://github.com/fonsp/Pluto.jl
Pluto
MacroTools provides a library of tools for working with Julia code and expressions.

MacroTools.jl MacroTools provides a library of tools for working with Julia code and expressions. This includes a powerful template-matching system an

FluxML 278 Dec 11, 2022
Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

Apache MXNet (incubating) for Deep Learning Apache MXNet is a deep learning framework designed for both efficiency and flexibility. It allows you to m

The Apache Software Foundation 20.2k Jan 8, 2023
Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

Apache MXNet (incubating) for Deep Learning Apache MXNet is a deep learning framework designed for both efficiency and flexibility. It allows you to m

The Apache Software Foundation 20.2k Jan 5, 2023
Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

Apache MXNet (incubating) for Deep Learning Apache MXNet is a deep learning framework designed for both efficiency and flexibility. It allows you to m

The Apache Software Foundation 19.3k Feb 12, 2021
Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

Apache MXNet (incubating) for Deep Learning Master Docs License Apache MXNet (incubating) is a deep learning framework designed for both efficiency an

ROCm Software Platform 29 Nov 16, 2022
Perspective: Julia for Biologists

Perspective: Julia for Biologists 1. Examples Speed: Example 1 - Single cell data and network inference Domain: Single cell data Methodology: Network

Elisabeth Roesch 55 Dec 2, 2022
Calling Julia from Python - an experiment on data loading

Calling Julia from Python - an experiment on data loading See the slides. TLDR After reading Patrick's blog post, we decided to try to replace C++ wit

Abel Siqueira 8 Jun 7, 2022
Numba-accelerated Pythonic implementation of MPDATA with examples in Python, Julia and Matlab

PyMPDATA PyMPDATA is a high-performance Numba-accelerated Pythonic implementation of the MPDATA algorithm of Smolarkiewicz et al. used in geophysical

Atmospheric Cloud Simulation Group @ Jagiellonian University 15 Nov 23, 2022
Python and Julia in harmony.

PythonCall & JuliaCall Bringing Python® and Julia together in seamless harmony: Call Python code from Julia and Julia code from Python via a symmetric

Christopher Rowley 414 Jan 7, 2023
A little software to generate and save Julia or Mandelbrot's Fractals.

Julia-Mandelbrot-s-Fractals A little software to generate and save Julia or Mandelbrot's Fractals. Dependencies : Python 3.7 or more. (Also possible t

Olivier 0 Jul 9, 2022