Closed bazkiaei closed 5 years ago
Should also improve the tests, to ensure errors of this type will get caught in future. Currently the tests of the pixellated
method in gunagala/tests/test_psf.py
all use square images so that the order doesn't matter. Should make at least some of those rectangular, and check that the returned image is the right shape.
Worse, there are currently no tests of the image simulation features in gunagala/tests/test_imager.py
yet. That's beyond the scope of this PR though, we'll fix that afterwards.
Don't leave blank lines between the @pytest.mark.parameterize
decorator and the test function declaration that follows it. The decorator is effectively part of the function definition so for readability reasons there should be no blank lines here.
Also, don't just use expected
for the argument names for the expected values for all the parameterised test functions. Use more descriptive names, like expected_n_pix
or expected_peak
or image_size
.
Note also that you can have as many arguments as you like, you don't have to use just two and start packing multiple values into them using tuples, and sometimes you might only need one if the only different between tests is which PSF you're testing.
Also, try to get into the habit of running the tests on your own computer first so that you catch typos & other small errors before you commit & push.
I am on it. It is my bad that forgot to run the test.
@AnthonyHorton just checking where this is at. Were you going to sit down with @bazkiaei and finalise this? Is there any way I can help?
@AnthonyHorton just checking where this is at. Were you going to sit down with @bazkiaei and finalise this? Is there any way I can help?
Maybe next Monday or Tuesday I go AAO to work on it?
@lee Yes, would be good to get this merged. Just need to fix up a few of the tests. Shouldn't take long if @bazkiaei and I work on it together. We had discussed working at the AAO on it but Veloce intervened.
@AnthonyHorton is there a good day for @bazkiaei to visit the AAO this week?
Learning how to work with pull request