Giter Site home page Giter Site logo

pyconsk18_testing's Introduction

Testing Essentials for Scientists and Engineers

Interactive vs? Test Driven Development

A PyCon SK 2018 Workshop by Claus Aichinger.

If you find any issues or have ideas for improvement, please to not hesitate to file an Issue or Pull request, I appreciate your feedback! :)

Even easier, there is a feedback form, thanks!

Installation & Setup

Please make sure you have the environment specified in environment.yml set up prior to the workshop.

If you use conda, you can do

on Linux

conda env create --file environment.yml
source activate testing

on Windows

conda env create --file environment.yml
activate testing

or use your preferred way to create a (virtual) coding environment.

conda is a package and environment manager (like pip and virtualenv combined), you do not have to use it; but we do require the packages listed in environment.yml.

Outline

  • General introduction
  • Useful tools and their application (exercise based)
  • Interactive exploration of a computation problem (live coding, all together)
    • Specification & discussion
    • How to approach it?
    • How to devise tests?

Description

Goals

Primary Goal: How can I integrate testing in my interactive development process?

Non-Goal: How can I do this or that kind of test or how does this particular feature of *test work?

Motivation

Software testing is an undisputed cornerstone of software development. However, as I know from my personal experience, Python users with a non-software-engineering or otherwise scientific background are often not so familiar with the concept of testing.

Computational problems are regularly approached by means of interactive development, which is both fast and fun and one of the reasons why Python is so successful in a wide range of scientific/engineering areas. The widespread adoption of the IPython and Jupyter project are living proof of that.

When carrying out computations, “testing” is implicitly carried out by “looking at the result” - which, on a small range, works pretty well. Yet, this is not what is meant automatic tests. Writing tests beforehand, as suggested by Test Driven Development (TDD), is sometimes considered clumsy and an approach that does not align very well with the experimental nature of interactive development. Yet, without tests one may quickly get lost in the complexity of even rather small problems.

In this workshop I want to share my personal experience with testing in scientific/engineering applications and how testing works for me.

On one hand side this includes tools like

and on the other hand side requires test-affine development workflow as well as system design.

Hence, to deal with the question "How can I integrate testing in my interactive development process?" we first take a look at above libraries and then approach together a small computational problem while keeping testability in mind.

Target audience

Engineers/Scientists doing interactive development who would like to pay more attention to automatic testing.

This workshop is not aimed at people who already know their way around above libraries.

pyconsk18_testing's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.