Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for files exported by H.E.S.S. #470

Merged
merged 9 commits into from Feb 26, 2016
Merged

Conversation

joleroi
Copy link
Contributor

@joleroi joleroi commented Feb 24, 2016

This PR introduces
gammapy/irf/tests/test_hess.py

The idea is the following

  • Produces reference files with gammapy-extra/test_datasets/reference/make_reference_files
  • This also creates a YAML file that contain the datastore used to created the reference files
  • test_hess.py read the IRF files from the same datastore that was used to create the reference files and compares the info() output to the reference files.
  • That way all changes in the classes or the reference file immediately catch our eyes

The tests of the functionality of the IRF classes remain in the old test files, e.g. test_effective_area.py. But here only the classes themselves are tested irrespective of real files. Optimally these test would work on simulated IRFs where we know extact numbers

@cdeil cdeil added this to the 0.4 milestone Feb 24, 2016
@joleroi
Copy link
Contributor Author

joleroi commented Feb 24, 2016

FYI ignore changes to gammapy/irf/effective_area_table.py, These are the same as in #467. I continues that branch.

If we all agree on the general procedure I will expand this method to all IRFs

@cdeil
Copy link
Contributor

cdeil commented Feb 24, 2016

Looks good to me.

There's this travis-ci fail though:
https://travis-ci.org/gammapy/gammapy/jobs/111526822#L1897

Can you reproduce and fix or should I have a look?

@joleroi
Copy link
Contributor Author

joleroi commented Feb 25, 2016

You can have a look at
https://travis-ci.org/gammapy/gammapy/jobs/111685918#L443
if you have time

@cdeil
Copy link
Contributor

cdeil commented Feb 25, 2016

That's a timeout that happened when installing the dependencies.

I've restarted build 2038 just now by clicking the restart symbol at the top right here:
https://travis-ci.org/gammapy/gammapy/builds/111685915

If the error is still there I can have a look on what changed on the conda side.

@joleroi
Copy link
Contributor Author

joleroi commented Feb 25, 2016

I don't think this is merely a timeout, after restarting the test it again fails when trying to update setuptools. I will try to fix it ..

@cdeil
Copy link
Contributor

cdeil commented Feb 25, 2016

But you can't reproduce the issue on your machine, right?

@joleroi
Copy link
Contributor Author

joleroi commented Feb 25, 2016

Wait, maybe I screwed up restarting the tests properly ...

But anyway. Locally I don't have to download anything, right?

@joleroi
Copy link
Contributor Author

joleroi commented Feb 26, 2016

Closing this now. I will update the other IRFs in a second PR next week

joleroi added a commit that referenced this pull request Feb 26, 2016
Add test for files exported by H.E.S.S.
@joleroi joleroi merged commit ce9e2d7 into gammapy:master Feb 26, 2016
@joleroi joleroi mentioned this pull request Feb 26, 2016
3 tasks
@joleroi joleroi deleted the test_hess branch August 9, 2018 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants