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
CI with python 3.11 and removal of some deprecation warnings #577
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #577 +/- ##
==========================================
- Coverage 96.21% 96.20% -0.02%
==========================================
Files 261 261
Lines 22118 22134 +16
==========================================
+ Hits 21281 21293 +12
- Misses 837 841 +4
|
@ajshajib can you review this PR such that I can merge it and make sure the build is not failing in newer PRs? |
@@ -11,7 +11,7 @@ | |||
|
|||
|
|||
class TestKinBin(object): | |||
def setup(self): | |||
def setup_method(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to here, setup_method()
should be for setting up for testing a specific method and not for everything in the class, and it should take an argument method
. I think, in most cases of test classes in lenstronomy
, setup()
can be replaced with __init__()
. The other option setup_class()
is a class method, and it would not then be usable to create instance-level variables as in __init__()
, I think.
test/test_Sampling/test_Likelihoods/test_kinematic_2D_likelihood.py
Outdated
Show resolved
Hide resolved
@sibirrer, looks good to me overall. I have changed all the |
@ajshajib it seems that init() does not work for test, as there are warnings like these appearing: ```
|
test/test_Sampling/test_Likelihoods/test_kinematic_2D_likelihood.py
Outdated
Show resolved
Hide resolved
@sibirrer, ok, thanks for the clarification! I have changed back all the |
@sibirrer, looks good to me, and I approved the PR! Please proceed with merging. |
this PR updates the CI to python version 3.11, replaces scipy interp2d with a non-deprecated version, and updates all the setup(self) to setup_method(self) for testing