We want to generate some code that is removing the linear trend from an arbitray timeseries to obtain a detrended timeseries. This means that we look for
$y - (mx + b)$
whereas $m$ and $b$ are linear slope estimators.
Let's have a look on the example file ...
There are numerous different testing approaches existing. For a summary see here:
Our friend are code testing modules. Probably the most common one is unittest, but others (e.g. pytest) exist as well.
A very good introduction can be found int the Hitchhickers guide to Python. Numerous other online ressources exist however as well.
Typically, we then run tests using nose.
Continuous integration facilitates your life! Code repository platforms like github or bitbucket allow you to link your code to external services. This can be a lot of different (usefull) things.
Some examples from the RT1 project:
In [ ]: