Please open issues and feature requests on Github. We respond quickly.
- Documentation. Tell us what's missing, what's incorrect or misleading.
- Tests. If you have an example that shows a bug or problem, please file an issue!
- Performance. If you are a C/cython/python hacker and see a way to make the code faster, let us know!
Direct contributions related to these items are welcome, too! If you want to contribute, please fork the project on Github, develop your change and then make a pull request. This allows us to review and discuss the change with you, which makes the integration very smooth.
To hack on iminuit, start by cloning the repository from Github:
git clone --recursive https://github.com/scikit-hep/iminuit.git
cd iminuit
It is a good idea to develop your feature in a separate branch, so that your develop branch remains clean and can follow our develop branch.
git checkout -b my_cool_feature develop
Now you are in a feature branch, commit your edits here.
You have the source code now, but you also want to build and test. We recommend to make a dedicated build environment for iminuit, separate from the Python installation you use for other projects.
One way is to use Python virtual environments and pip to install the development packages listed in requirements-dev.txt
python -m venv py3 # folders called py* are ignored by git
source py3/bin/activate
pip install -r requirements-dev.txt
To delete the virtual environment just delete the folder py3.
Another way is to use conda environments. You need to install a conda first, e.g. miniconda, then do:
conda create -c conda-forge --name iminuit-dev --file requirements-dev.txt
conda activate iminuit-dev
To deactivate or delete the environment, do:
conda deactivate
conda env remove -n iminuit-dev
To simplify hacking on OSX and Linux, we have a Makefile with common commands. To see what commands are available, do:
make help
Build iminuit in-place:
python -m pip install -e .
Run the tests:
python -m pytest
Run the notebook tests:
python -m pytest tutorial
Run the tests and generate a coverage report:
make cov
<your-web-browser> htmlcov/index.htm
Build the docs:
make doc
<your-web-browser> doc/_build/html/index.html
Maintainers that prepare a release, should follow the instructions in doc/README.md
To check your iminuit version number and install location:
$ python
>>> import iminuit
>>> iminuit
# install location is printed
>>> iminuit.__version__
# version number is printed