Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add function to compute exposure cubes #398
In order to make sure everything is working correctly I would be useful to add tests.
My 2 cents on tests:
My experience is that high-level tests are more important than low-level unit tests, so if @tibaldo wants to prefers this now and then add a high-level test that computes an exposure cube and calls this with an array later, I'd say it's OK to merge this without extra test now.
Of course having lots of unit tests is great, but it also slows people down, writing the tests becomes more work than implementing features.
So bottom line: my suggestion for Gammapy would be to encourage / ask contributors to add high-level and unit tests, but it's also OK to say "no, I just want this feature to be merged" or "I'll add tests later".
@cdeil: In principle I agree, but not in this case. An error at this point might be difficult to spot later and is very easy to avoid now, with a 3 line test that was probably made in an IPython notebook or similar anyways. An error at this point might also have implication for several high-level use cases. It also comes with the benefit that another Interpolator that might be added in the future is automatically tested.
Of course I am not keeping anyone from merging their contributions if they want to, it was just a suggestion.
added a commit
this pull request
Dec 9, 2015
Dec 9, 2015
1 check passed
Don't forget to make an entry in https://github.com/gammapy/gammapy/blob/master/CHANGES.rst