Skip to content

Commit

Permalink
Documentation on requirements, removed Numba.
Browse files Browse the repository at this point in the history
I removed the now unused dependency on Numba.

Added description of requirements and testing in the README file.
  • Loading branch information
rlabbe committed Sep 1, 2014
1 parent 5329108 commit 20d5dd4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,45 @@ from filterpy.memory import FadingMemoryFilter
my_filter = KalmanFilter(3,4)
```

Requirements
--
numpy and scipy
Python 2 or 3
matplotlib

I haven't extensively tested backwards compatibility - I use the Anaconda
distribution, and so I am on Python 3.4 and 2.7.5, along with whatever
version of numpy, scipy, and matplotlib they provide. But I am using pretty
basic Python - numpy.array, maybe a list comprehension in my tests.

I import from __future__ to ensure the code works in Python 2 and 3.

The matplotlib library is required because, *for now*, 'tests' are very
visual. Meaning I generate some data, plot the data against the filtered
results, and eyeball it. That is great for my personal development, and
terrible as a foundation for regression testing. If you don't have
matplotlib installed you won't be able to run the tests, but I'm not sure
the tests will have a lot of meaning to you anyway.

There is one import from the code from my book to plot ellipses. That
dependency needs to be removed. This only affects the tests.


Testing
--

All tests are written to work with py.test. Just type _py.text_ at the
command line.

As explained above, the tests are not robust. I'm still at the stage where
visual plots are the best way to see how things are working. Apologies, but
I think it is a sound choice for development. It is easy for a filter to
perform within theoretical limits (which we can write a non-visual test for)
yet be 'off' in some way. The code itself contains tests in the form of
asserts and properties that ensure that arrays are of the proper dimension,
etc.


References
--

Expand Down
2 changes: 0 additions & 2 deletions leastsq/least_squares.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import numpy as np
from math import sqrt

from numba import jit, void


class LeastSquaresFilter(object):
"""Implements a Least Squares recursive filter. Formulation is per
Expand Down
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
here = path.abspath(path.dirname(__file__))

# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

setup(
Expand All @@ -14,17 +14,17 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# http://packaging.python.org/en/latest/tutorial.html#version
version='1.2.0',
version='0.0.1dev',

description='A sample Python project',
description='Kalman filtering and optimal estimation library',
long_description=long_description,

# The project's main homepage.
url='https://github.com/pypa/sampleproject',
url='https://github.com/rlabbe/filterpy',

# Author details
author='The Python Packaging Authority',
author_email='pypa-dev@googlegroups.com',
author='Roger Labbe',
author_email='rlabbejr@gmail.com',

# Choose your license
license='MIT',
Expand All @@ -38,7 +38,7 @@
'Development Status :: 3 - Alpha',

# Indicate who your project is intended for
'Intended Audience :: Developers',
'Intended Audience :: Developers, Engineers',
'Topic :: Software Development :: Build Tools',

# Pick your license as you wish (should match "license" above)
Expand All @@ -56,7 +56,7 @@
],

# What does your project relate to?
keywords='sample setuptools development',
keywords='Kalman filters filtering optimal estimation tracking',

# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
Expand Down

0 comments on commit 20d5dd4

Please sign in to comment.