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

Remove gammapy.extern.validator and validate_physical_type #2197

Merged
merged 2 commits into from May 29, 2019

Conversation

cdeil
Copy link
Contributor

@cdeil cdeil commented May 29, 2019

This PR removes gammapy.extern.validator. The only function from there that we used was validate_physical_type. I replaced this with a call to Quantity in psf_gauss.py, just like I already did for gammapy.astro earlier today in #2192 .

This brings us towards internal consistency for quantity handling in Gammapy, we already were using Quantity, not validate_physical_type in 99% of our code.

I'm sure there are many places in Gammapy where we should improve unit and quantity handling. But I believe Astropy core has good solutions for this since many years, and a separate gammapy.extern.validator is not the way to go.

Discussed offline with @adonath who agreed - so I'll merge this right away as a small cleanup PR without discussion.

@cdeil cdeil added the cleanup label May 29, 2019
@cdeil cdeil added this to the 0.12 milestone May 29, 2019
@cdeil cdeil self-assigned this May 29, 2019
@cdeil cdeil merged commit 0110cc3 into gammapy:master May 29, 2019
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

1 participant