You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On this page, it says to fork, clone and get to hacking away. On this page (in "Obtaining the source") it says to clone directly from the unforked repo to be able to run tests. How do run tests on your own fork if the unforked repo is the one that is set up for testing?
What am I missing here? Also, is this the right way to ask questions?
So in order to use pytest, you would do pip install -e on your cloned, forked copy and NOT a copy cloned directly from statsmodels?
As a developer, would you need to be building whenever any change is made or do you only worry about invoking the compiler when a change is made to a C/Cython file?
from the repo root. This assumes the environment you are working in has the core requirements already installed, but is much faster than using build isolation.
You will always need a compiler to develop, even if you don't touch C or Cython. It is pretty easy to get one installed on any of the big 3 platforms these days though.
What should an Anaconda environment look like for developing statsmodels? Should you just worry about installing dependencies before working on a branch?
Something like a conda create -n sm_dev numpy scipy pandas patsy cython? Is it a good idea to declare versions for all of these packages to ensure that you meet the minimum dependencies?
@bashtage It looks like the flag is --no-build-isolation.
Also it looks like conda uninstall statsmodels uninstalls scipy which caused me big errors come build time. Running conda install scipy after sm uninstallation fixed the problem.
Activity
bashtage commentedon Jul 1, 2020
To develop you should
git clone [email protected]:bashtage/statsmodels.gitfor mecd statsmodelsgit remote add upstream https://github.com/statsmodels/statsmodels.gitget fetch --allgit checkout -b meaningful-name-for-new-featurepip install -e . --no-build-isolationpipor usingpython setup.py build_ext -ipytest statsmodelsor a specific test location or file, e.g.,pytest statsmodels/discrete/tests/Edited with a few more steps.
bashtage commentedon Jul 1, 2020
Your fork will be identical to the repo when you fork. Over time it will diverge. I frequently run
to keep my fork's master in sync with statsmodels.
rluedde commentedon Jul 1, 2020
So in order to use pytest, you would do
pip install -eon your cloned, forked copy and NOT a copy cloned directly from statsmodels?As a developer, would you need to be building whenever any change is made or do you only worry about invoking the compiler when a change is made to a C/Cython file?
bashtage commentedon Jul 1, 2020
I use
from the repo root. This assumes the environment you are working in has the core requirements already installed, but is much faster than using build isolation.
You will always need a compiler to develop, even if you don't touch C or Cython. It is pretty easy to get one installed on any of the big 3 platforms these days though.
rluedde commentedon Jul 1, 2020
The core requirements being NumPy, SciPy, pandas, etc?
Will you ever have to do anything with the compiler directly or will it just run in the background whenever you run something?
Everything is falling into place. Thanks, Kevin.
bashtage commentedon Jul 1, 2020
Yes, plus Cython and patsy.
Should always be automatic.
[-]Installation for contributing[/-][+]FAQ: Installation for contributing[/+]bashtage commentedon Jul 2, 2020
I'm going to close this as answered; please feel free to post more here if needed.
rluedde commentedon Jul 6, 2020
What should an Anaconda environment look like for developing statsmodels? Should you just worry about installing dependencies before working on a branch?
Something like a
conda create -n sm_dev numpy scipy pandas patsy cython? Is it a good idea to declare versions for all of these packages to ensure that you meet the minimum dependencies?bashtage commentedon Jul 6, 2020
Install anaconda (I use miniconda personally).
rluedde commentedon Jul 7, 2020
@bashtage It looks like the flag is
--no-build-isolation.Also it looks like
conda uninstall statsmodelsuninstalls scipy which caused me big errors come build time. Runningconda install scipyafter sm uninstallation fixed the problem.bashtage commentedon Jul 7, 2020
That is right.
josef-pkt commentedon Aug 3, 2023
We keep it open as FAQ
(I need it once a year)