choderalab/msm-tis — pull request #47 by dwhswenson (2014-10-30 14:17:53+00:00)
Title: Range logic and volume tests

This PR adds general functions for range logic, as well as use of range logic in LambdaVolume and LambdaVolumePeriodic, as well as lots of tests.

By range logic, I mean explicit logic treatment of the intersection ("and"), union ("or"), and relative complement ("sub") of ranges of numbers. This means that, for example, `volume_A & volume_B` will always generate a **single** volume object (assuming `volume_A` and `volume_B` use the same order parameter) instead of a `VolumeCombination` object which might have to check both of its component volumes.

**Important:** different order parameters need to return different responses to `op.__str__()`, otherwise they’re treated as the same. Is that already guaranteed in the current implementation of order parameters as storable, @jhprinz?

In addition, this PR includes tons of tests. The new range_logic.py has 100% test coverage. The file volume.py has 94% coverage, only missing tests for JHP’s VoronoiVolume class.

I still have a few test stubs to fill in to double check certain things. These are marked by having the test `raise SkipTest`. I should also probably add some docs. But I think it's worth merging this stuff in sooner rather than later.