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

Raise exception for astropy <4 in __init__.py #1359

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

dlakaplan
Copy link
Contributor

Fixes #1354

astropy >=4 is enforced by requirements.txt

@paulray
Copy link
Member

paulray commented Jul 26, 2022

I guess this is OK, but we've definitely had people install PINT, then upgrade via git pull and never need to run pip again so that requirements.txt doesn't get applied. This happened to many of us with loguru, for example.

@dlakaplan
Copy link
Contributor Author

If that's the case, then probably raising an exception is better than emitting a warning.

@paulray
Copy link
Member

paulray commented Jul 26, 2022

Indeed, especially for something as old as astropy 3.

@dlakaplan dlakaplan changed the title Removed check for astropy <4 in __init__.py Raise exception for astropy <4 in __init__.py Jul 26, 2022
@dlakaplan
Copy link
Contributor Author

Now astropy < 4 raises an exception, and there is a test for that.

@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #1359 (cd72d68) into master (a8daf80) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1359      +/-   ##
==========================================
+ Coverage   61.29%   61.30%   +0.01%     
==========================================
  Files          90       90              
  Lines       20349    20351       +2     
  Branches     3646     3646              
==========================================
+ Hits        12473    12477       +4     
+ Misses       7089     7088       -1     
+ Partials      787      786       -1     
Impacted Files Coverage Δ
src/pint/__init__.py 97.36% <100.00%> (+5.26%) ⬆️
src/pint/models/frequency_dependent.py 83.33% <0.00%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8daf80...cd72d68. Read the comment docs.

@paulray paulray merged commit 471f87f into nanograv:master Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

import pint fails when astropy version is less than 4
2 participants