|
| 1 | +# Installing multibind |
| 2 | + |
| 3 | +## Requirements |
| 4 | + |
| 5 | +- **Python** 3.10, 3.11, 3.12, 3.13, or 3.14 (see `pyproject.toml` for the exact supported range). |
| 6 | +- **Dependencies** (installed automatically with the methods below): NumPy, pandas, SciPy, NetworkX, and xarray. NumPy 1.x is allowed on older Pythons; very new interpreters (for example 3.14) typically need a **NumPy 2.x** build that provides wheels for that version. |
| 7 | + |
| 8 | +## Install with Poetry (recommended for development) |
| 9 | + |
| 10 | +[Poetry](https://python-poetry.org/docs/#installation) manages the environment and resolves versions from `pyproject.toml`. |
| 11 | + |
| 12 | +From the root of a clone of this repository: |
| 13 | + |
| 14 | +```bash |
| 15 | +poetry install |
| 16 | +``` |
| 17 | + |
| 18 | +This installs **multibind** in editable mode plus **dev** tools (pytest, Sphinx, IPython, etc.). |
| 19 | + |
| 20 | +To install only runtime dependencies (no dev extras): |
| 21 | + |
| 22 | +```bash |
| 23 | +poetry install --without dev |
| 24 | +``` |
| 25 | + |
| 26 | +Run the test suite (paths in the tests assume the working directory is `tests/`): |
| 27 | + |
| 28 | +```bash |
| 29 | +cd tests |
| 30 | +poetry run pytest -v |
| 31 | +``` |
| 32 | + |
| 33 | +## Install with pip |
| 34 | + |
| 35 | +### From a local checkout |
| 36 | + |
| 37 | +Create and activate a virtual environment, then from the repository root: |
| 38 | + |
| 39 | +```bash |
| 40 | +python -m pip install --upgrade pip |
| 41 | +pip install . |
| 42 | +``` |
| 43 | + |
| 44 | +Editable install while you change the code: |
| 45 | + |
| 46 | +```bash |
| 47 | +pip install -e . |
| 48 | +``` |
| 49 | + |
| 50 | +### From GitHub |
| 51 | + |
| 52 | +Replace the URL if you use a fork: |
| 53 | + |
| 54 | +```bash |
| 55 | +pip install "multibind @ git+https://github.com/BecksteinLab/multibind.git" |
| 56 | +``` |
| 57 | + |
| 58 | +For a specific branch or tag, use the corresponding revision in the URL (see [pip VCS support](https://pip.pypa.io/en/stable/topics/vcs-support/)). |
| 59 | + |
| 60 | +### From PyPI |
| 61 | + |
| 62 | +If a release is published on PyPI: |
| 63 | + |
| 64 | +```bash |
| 65 | +pip install multibind |
| 66 | +``` |
| 67 | + |
| 68 | +## Conda or Mamba environments |
| 69 | + |
| 70 | +Create an environment with a suitable Python version, activate it, then use **pip** inside that environment as above (from a clone or from Git/PyPI). Avoid mixing Poetry and conda installs of the same package in one environment unless you know how they interact. |
| 71 | + |
| 72 | +## Documentation |
| 73 | + |
| 74 | +To build the HTML docs locally, install dev dependencies (e.g. `poetry install`), then: |
| 75 | + |
| 76 | +```bash |
| 77 | +cd docs |
| 78 | +sphinx-build -b html . _build/html |
| 79 | +``` |
| 80 | + |
| 81 | +Online documentation: [multibind.readthedocs.io](https://multibind.readthedocs.io/). |
0 commit comments