neurostuff / PyMARE

PyMARE: Python Meta-Analysis & Regression Engine
https://pymare.readthedocs.io
MIT License
50 stars 11 forks source link

Fix StanMetaRegression estimator #108

Closed JulioAPeraza closed 5 months ago

JulioAPeraza commented 2 years ago

Closes #67.

Changes proposed in this pull request:

codecov-commenter commented 2 years ago

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.85%. Comparing base (1402199) to head (e56e294). Report is 7 commits behind head on master.

Files Patch % Lines
pymare/estimators/estimators.py 80.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #108 +/- ## ========================================== + Coverage 87.79% 90.85% +3.06% ========================================== Files 13 13 Lines 893 897 +4 ========================================== + Hits 784 815 +31 + Misses 109 82 -27 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

JulioAPeraza commented 2 years ago

Tests on Python 3.6 are failing because PyStan 3 only works for Python 3.7+. @tsalo, do you think we should remove the test on 3.6 completely, or there is a way to just skip 3.6 for test_stan_estimators?

The other tests on ubuntu-latest (20.04.4) failed with an error that was already reported here: https://discourse.mc-stan.org/t/schools-example-not-compiling-pystan-3-4-on-ubuntu-20-04-4/27812.

tsalo commented 2 years ago

I'm thinking that we should (1) mark the pystan tests with a decorator and try to skip them with 3.6, (2) ensure that pystan is an optional dependency, (3) include in our documentation that users should not try using pystan with PyMARE and Python 3.6, and (4) add some type of warning based on the import and Python version within the StanMetaRegression estimator at initialization.

JulioAPeraza commented 2 years ago

Thanks! I have added the decorators and included pystan as an optional dependency and the tests are now passing. I still need to find what's happening to the test on ubuntu-latest (20.04.4).

JulioAPeraza commented 1 year ago

Now all tests are passing after switching to ubuntu 20.04 for Python 3.6. @tsalo Is there anything else you would like to see in this PR?