Skip to content

Commit 28b59bf

Browse files
committed
pip installable, updated docs and readme
1 parent 7efbca9 commit 28b59bf

6 files changed

Lines changed: 74 additions & 45 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ build/
5353
examples/.DS_Store
5454
*.html
5555
CosmoPosteriors.ipynb
56+
dist/

‎README.md‎

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Use BOBE if:
1212
- **You need Bayesian evidence estimates and/or posterior samples efficiently**
1313

1414
BOBE works best for problems with up to 15-20 parameters, although this can vary based on the specific problem and likelihood structure.
15-
It has been tested to work well upto 30 dimensions for simple multivariate Gaussian likelihoods and upto 16 dimensions for cosmological likelihoods (LCDM + curvature) with the Planck Camspec likelihood).
15+
It has been tested to work well upto 30 dimensions for simple multivariate Gaussian likelihoods and upto 16 dimensions for cosmological likelihoods (LCDM + curvature) with the Planck Camspec likelihood.
1616
BOBE may not be necessary if your likelihood already evaluates in milliseconds, as the overhead of training the GP surrogate and running Bayesian optimisation
1717
may not be worth the speedup. For such cases, there is generally no need to go beyond standard MCMC/nested sampling tools.
1818

@@ -42,37 +42,41 @@ See `pyproject.toml` and the [documentation](https://BOBE.readthedocs.io/en/) fo
4242

4343
## Installation
4444

45-
### From source
45+
### From PyPI (Recommended)
4646

47-
```bash
48-
git clone https://github.com/Ameek94/BOBE.git
49-
cd BOBE
50-
python -m pip install .
51-
```
52-
53-
For an editable (dev) install do
47+
BOBE is available on PyPI and can be installed with pip:
5448

5549
```bash
56-
python -m pip install -e .
50+
pip install BOBE
5751
```
5852

59-
from the package directory.
60-
6153
### Optional Dependencies
6254

63-
BOBE has several optional dependencies for extended functionality. When installing from source, you can install them as follows:
55+
BOBE has several optional dependencies for extended functionality:
6456

65-
- **Cosmology Suite**: Install with `pip install -e '.[cosmo]'`
57+
- **Cosmology Suite**: Install with `pip install BOBE[cosmo]`
6658
- This will install Cobaya, needed for several cosmological likelihoods. You will still need to download and install the data for some likelihoods - see the [Cobaya documentation](https://cobaya.readthedocs.io/en/latest/) for more details.
6759
- It will also install mpi4py (you will need to have an MPI implementation such as openmpi or mpich). Enables parallel likelihood evaluation and GP fitting across multiple processes using mpi4py.
6860

69-
- **Cobaya Only**: Install with `pip install -e '.[cobaya]'`
61+
- **Cobaya Only**: Install with `pip install BOBE[cobaya]`
7062

71-
- **MPI Only**: Install with `pip install -e '.[mpi]'`
63+
- **MPI Only**: Install with `pip install BOBE[mpi]`
64+
65+
- **Neural Networks**: Install with `pip install BOBE[nn]`
7266

73-
- **All Optional Dependencies**: Install with `pip install -e '.[all]'`
67+
- **All Optional Dependencies**: Install with `pip install BOBE[all]`
68+
69+
### From Source (Development)
70+
71+
For development or to use the latest unreleased features:
72+
73+
```bash
74+
git clone https://github.com/Ameek94/BOBE.git
75+
cd BOBE
76+
pip install -e .
77+
```
7478

75-
**Note:** The `-e` flag installs in editable mode. For a regular install, use `pip install '.[extra]'` instead (replace extra with name of dependency).
79+
Optional dependencies can be installed with `pip install -e '.[extra]'` (replace `extra` with the desired dependency name).
7680

7781
## Quick Start
7882

854 Bytes
Binary file not shown.

‎docs/build/html/searchindex.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/source/installation.rst‎

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,41 @@ Core Dependencies
5353
Installation Methods
5454
--------------------
5555

56-
From Source (Recommended)
57-
~~~~~~~~~~~~~~~~~~~~~~~~~~
56+
From PyPI (Recommended)
57+
~~~~~~~~~~~~~~~~~~~~~~~
58+
59+
BOBE is available on PyPI and can be installed with pip:
60+
61+
.. code-block:: bash
62+
63+
pip install BOBE
64+
65+
Optional Dependencies
66+
~~~~~~~~~~~~~~~~~~~~~
67+
68+
BOBE has several optional dependencies for extended functionality:
69+
70+
.. code-block:: bash
71+
72+
# For cosmological likelihoods through Cobaya + MPI support
73+
pip install BOBE[cosmo]
74+
75+
# For Cobaya only
76+
pip install BOBE[cobaya]
77+
78+
# For MPI support only
79+
pip install BOBE[mpi]
80+
81+
# For neural network classifiers
82+
pip install BOBE[nn]
83+
84+
# For all optional dependencies
85+
pip install BOBE[all]
86+
87+
From Source (Development)
88+
~~~~~~~~~~~~~~~~~~~~~~~~~
89+
90+
For development or to use the latest unreleased features:
5891

5992
1. Clone the repository:
6093

@@ -63,34 +96,21 @@ From Source (Recommended)
6396
git clone https://github.com/Ameek94/BOBE.git
6497
cd BOBE
6598
66-
2. Install the package:
99+
2. Install in editable mode:
67100

68101
.. code-block:: bash
69102
70-
# For regular install
71-
pip install .
72-
73-
# For development mode
74103
pip install -e .
75104
76105
3. (Optional) Install with additional features:
77106

78107
.. code-block:: bash
79108
80-
# For cosmological likelihoods through Cobaya
81-
pip install -e '.[cobaya]'
82-
83-
# For MPI support
84-
pip install -e '.[mpi]'
85-
86-
# For neural network classifiers
87-
pip install -e '.[nn]'
88-
89-
# For all optional dependencies
90-
pip install -e '.[all]'
91-
92-
.. note::
93-
The ``-e`` flag installs in editable mode. For a regular install, use ``pip install '.[extra]'`` instead (replace extra with desired optional dependency).
109+
pip install -e '.[cosmo]' # Cobaya + MPI
110+
pip install -e '.[cobaya]' # Cobaya only
111+
pip install -e '.[mpi]' # MPI only
112+
pip install -e '.[nn]' # Neural networks
113+
pip install -e '.[all]' # Everything
94114
95115
Virtual Environment Setup
96116
--------------------------
@@ -104,7 +124,7 @@ Using conda
104124
105125
conda create -n BOBE python=3.12
106126
conda activate BOBE
107-
pip install -e .
127+
pip install BOBE
108128
109129
Using venv
110130
~~~~~~~~~~
@@ -113,7 +133,7 @@ Using venv
113133
114134
python -m venv BOBE_env
115135
source BOBE_env/bin/activate
116-
pip install -e .
136+
pip install BOBE
117137
118138
GPU/TPU Support
119139
---------------
@@ -159,6 +179,9 @@ In case of installation issues, you can also create a virtual environment with t
159179

160180
.. code-block:: bash
161181
182+
git clone https://github.com/Ameek94/BOBE.git
183+
cd BOBE
184+
162185
# Create environment from the minimal essential packages
163186
conda env create -f environment.yml
164187

‎pyproject.toml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "BOBE"
10-
version = "0.1.0"
10+
version = "0.1.0"
1111
description = "A Bayesian Optimization package for cosmology using JAX"
1212
readme = "README.md"
1313
requires-python = ">=3.10,<3.14"
@@ -88,5 +88,6 @@ all = [
8888
"cobaya>=3.0.0"
8989
]
9090

91-
[tool.setuptools]
92-
packages = ["BOBE"]
91+
[tool.setuptools.packages.find]
92+
where = ["."]
93+
include = ["BOBE*"]

0 commit comments

Comments
 (0)