-
Notifications
You must be signed in to change notification settings - Fork 14
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
fixing mflike test and fixing np.float error #104
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #104 +/- ##
===========================================
+ Coverage 60.33% 73.12% +12.79%
===========================================
Files 30 30
Lines 1931 1935 +4
===========================================
+ Hits 1165 1415 +250
+ Misses 766 520 -246
|
…into fix_mflike_test
I am having an issue with overwriting the default installation url of soliket.mflike.MFLike. I have tried to do that:
It does not recognize Sorry @cmbant, do you have an idea why this is not working? |
The inheriting/overriding of attributes currently only works at the component instance level, but the install system works on uninstantiated classes, so your input dictionary is not used. It's more intended that you make a new class inheriting from the old one, set new install attributes as needed, and then install the new class. To allow passing install_options, would have to modify install(), is_installed() and install.py to pass around input parameters. (possibly tricky to maintain consistent version tracking though). |
"could not be found as internal component" means that it is not an internal component, but presumably found OK as an external component since the install check passes (i.e. can ignore that line). I would agree some of these install output lines are not super helpful... |
Thanks @cmbant. I followed your advice and created a new class Is there a better way to override the installation path for |
I don't think you should have to put it in init (ref to soliket.mflike.TestMFLike I think should load it anyway). If you just want to be able to dynamically change the path, I guess you could implement get_install_options() in the base likelihood, with the option to change the path via an environment or global variable. Raise a cobaya issue with a feature request if you think overriding install-time options from inputs would be useful. |
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.
Ok, we are getting |
* renamed TestLike to CheckLike in test_ccl.py * replaced distutils.version.Looseversion with packaging.version.Version * replaced deprecated interp2d with RegularGridInterpolator in clusters * flake8 compliant * removed python3.7 from env list in tox.ini * removed py3.7 from conda reqs * upgraded latest version to py3.8 * correct data types in shearkappa test file * edits to setup.cfg for pyversion bump and fgspectra from pip * mflike actually still required before #104 merged --------- Co-authored-by: Martina Gerbino <bradamante@martina.local> Co-authored-by: Ian Harrison <itrharrison@gmail.com>
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.
fixing the test and the np.float error (even though I reversed the correction in the clusters/survey.py module)
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.
fgspectra now pip installable and TestMFLike class created not to download mflike data
* renamed TestLike to CheckLike in test_ccl.py * replaced distutils.version.Looseversion with packaging.version.Version * replaced deprecated interp2d with RegularGridInterpolator in clusters * flake8 compliant * removed python3.7 from env list in tox.ini * removed py3.7 from conda reqs * upgraded latest version to py3.8 * correct data types in shearkappa test file * edits to setup.cfg for pyversion bump and fgspectra from pip * mflike actually still required before #104 merged --------- Co-authored-by: Martina Gerbino <bradamante@martina.local> Co-authored-by: Ian Harrison <itrharrison@gmail.com>
* fixing mflike test and fixing np.float error * fix code style * temporary changes before I mess up this file again * it somehow works if I download the datafile by myself * test installable likelihood in mflike.py * installable file lighter and change in chi2 values * removed TestMFLike from __init__ * remove mflike dep * added gspectra version and syslib deps * removed planck data install from removed test * put planck install back (associated with cosmopower test) --------- Co-authored-by: Ian Harrison <itrharrison@gmail.com>
Fixing mflike test to remove the dependence from simonsobs/mflike
Also substituting
np.float
withfloat
, because of python complaining about that