-
Notifications
You must be signed in to change notification settings - Fork 9
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
replace mpl.normpdf with scipy.stats.norm.pdf #33
Conversation
|
I have done a small test comparing Should I try to add a test to |
@mayeshh, yes test_burstlib.py will work. |
I put the test in Is this expected? |
All tests should run with no errors. Some warning are possible but no test fail. All test pass online as you ca see from the green checkmarks. |
will you merge this PR? |
@mayeshh, yes, I'll merge it. Please fix the test. It seems you duplicated an old test and gave it a new name. Instead, inside the test function you should define the function assert np.allclose(normpdf(x, mu=mu, sigma=sigma), norm.pdf(x, loc=mu, scale=sigma)) for some mu and sigma != 1. Let me know if you have questions or doubts. Also, please put the test in test_burstlib.py. The file you use is specific for exponential fittings used for background estimation. |
I am not sure how to fix the failed checks... I also have some questions:
|
Perfect. To answer your questions:
I also have a question. I see you added After you move the |
I had a look at the failing tests:
Also, there is a DeprecationWarning:
Maybe you are trying to fix this warning and now you have the error? I think the easiest fix may be using the second option suggested in the warning, i.e. replace |
Yes, I was trying to fix the deprecation warning. I replaced with The last commit 5ac3153 failed becuase I did not define local variables in I don't understand how the test |
@mayeshh, I agree this last test fail is weird. All test passed for python 3.6 on Appveyor (windows) at least. I restarted the tests in case it was only a temporary fluke. |
Did you guys get anywhere with this? I'd be keen to help out in some way if I can because people in my lab keep running into difficulties trying to install older versions of fretbursts/matplotlib that work properly. |
I couldn't solve the failed checks... seems to be something to do with python 3.7, maybe @tritemio has some insight? |
I don't have time to look into it. You can open a PR and fix the issue. For the merge, I am willing to grant commit rights to anybody who wants to manage the repo. |
Okay I will pick up from where mayeshh left off and see if I can get to the bottom of it. In the meantime can you advise on the best way to install an older version of fretbursts (so we can just use a downgraded matplotlib)? I cannot get it to work consistently, and this is also important for reproducibility anyway |
@BenjaminAmbrose, in my papers I generally save a conda env with all the packages and package versions used, not only FRETBursts. You can export the conda env with As secondary measure, I generally print the versions of the packages used at the beginning of each notebook. This is less robust and redundant if you save the full env, but is an additional layer of safety. Now, if you did some analysis 1-2 years ago and didn't save the env it would be much harder now after the fact to recover the env. Installing an old version of FRETBursts will likely require install old version of numpy, scipy matplotlib ... you need to figure out which versions were availbale at that time. |
@BenjaminAmbrose do you want commit rights? If not, it seems like I might be the only other option... I am not an expert and I would happily relinquish commit rights to someone more experienced that wants to maintain the repo. |
I'm not sure I'm any more of an expert than you are, managing these build
check things is new to me. I don't know how useful it would be for me to be
in charge of it
…On Thu, 7 May 2020 at 19:38, mayeshh ***@***.***> wrote:
I don't have time to look into it. You can open a PR and fix the issue.
For the merge, I am willing to grant commit rights to anybody who wants to
manage the repo.
@BenjaminAmbrose <https://github.com/BenjaminAmbrose> do you want commit
rights? If not, it seems like I might be the only other option... I am not
an expert and I would happily relinquish commit rights to someone more
experienced that wants to maintain the repo.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI24HXW2K2FIUP4BJGR73RLRQL5ZBANCNFSM4JIBNC2Q>
.
|
…gration to travis-ci.com from travis-ci.org
Since these same changes have been made in my other pull requests, I'm closing this pull request. |
Attempting to fix the issue reported in #30.
Error seems to be resolved, but I now get the following AttributeError:
Traceback (most recent call last)
<ipython-input-2-e7d4478a60c7> in <module>
----> 1 from fretbursts import *
AttributeError: module 'fretbursts' has no attribute 'bg_cache'
I see that the checks have failed, and I am doing my best to understand them. The offending code returns a
ValueError
that does not arise from any changes I have made.