iminuit works with Python 2.7 as well as 3.4 or later.
Like most Python packages, iminuit installation requires setuptools.
The following dependencies are optional:
- pytest, pytest-cov
- Sphinx, sphinx-rtd
TODO: describe better where which dependency is used.
To install the latest stable version:
$ pip install iminuit
Conda packages for iminuit are available via the
astropy channel at https://anaconda.org/astropy/iminuit
$ conda install -c astropy iminuit
For Windows, Christoph Gohlke made a nice windows binary to save you all from Windows compilation nightmare:
To install the latest development version clone the repository from Github:
$ git clone https://github.com/iminuit/iminuit.git $ cd iminuit $ python setup.py install
You will need
They can be installed via
$ pip install sphinx $ pip install sphinx_rtd_theme
To generate html docs locally,
iminuit has to be available.
To check if that is the case, and which version you’re using, you can use this command:
$ python -c 'import iminuit; print(iminuit)'
One way to achieve this is to do this:
$ python setup.py build_ext --inplace $ python setup.py develop
Another is to just install
$ python setup.py install
Once you have
iminuit available, use these commands to build the docs:
$ cd doc $ make html
The HTML output is here:
$ open _build/html/index.html
To run the tests you need to install pytest.
To run the iminuit tests for an installed version of the package:
python -m pytest --pyargs iminuit
To run the tests from the source folder (e.g. during pytest development), use this command:
$ make test
To get a coverage report from the tests:
$ make coverage