Skip to content

Commit

Permalink
Add installation instructions in README (#64)
Browse files Browse the repository at this point in the history
* Add instructions on how to install

* Separate cloning commands

* Temporarily remove Windows from supported OS

* Separate source and PyPi sections
  • Loading branch information
sbaldu authored Oct 22, 2024
1 parent afa6b0c commit 9e98891
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ clust.cluster_plotter()
<img width="380" height="380" src="https://raw.githubusercontent.com/cms-patatrack/CLUEstering/main/images/blobwithnoise.png">
</p>

## Installation
### From source
To install the library, first clone the repository recursively:
```shell
git clone --recursive https://github.com/cms-patatrack/CLUEstering.git
```
alternatively, clone and update the submodules manually:
```shell
git clone https://github.com/cms-patatrack/CLUEstering.git
git submodule update --init --recursive
```
Then, inside the root directory install the library with pip:
```shell
pip install -v .
```
where the `-v` flag is optional but suggested because provides more details during the compilation process.

### From PyPi
The library is also available on the PyPi repository, and can be installed with:
```shell
pip install -v CLUEstering
```

## Heterogeneous backend support with `Alpaka`
Since version `2.0.0` the pybind module is compiled for all the supported backends using the `Alpaka` portability library (https://github.com/alpaka-group/alpaka).
Currently the supported backends include:
Expand Down Expand Up @@ -81,9 +104,9 @@ The class has several methods:
Data is read with the `read_data` method.
For the data to be acceptable, it must contain the values of at least one coordinate for all the points, and their `weights`. The `weights` of the points represent their relative importance in the dataset, so in most cases they can all be set to 1. There are several accepted formats for providing the data:
* `string`, where the string contains the relative path to a `csv` file. The file must contain at least one column for the coordinates, which must be named as `x*` (`x0`, `x1`, ecc.) and one column for the `weight`
* `pandas.DataFrame`, where the columns for the coordinates must be named `x*` (`x1`, `x2`, ecc.) and one column should contain the `weight`
* `pandas.DataFrame`, where the columns for the coordinates must be named `x*` (`x0`, `x1`, ecc.) and one column should contain the `weight`
* `list` or `np.ndarray`, where the coordinate data should be provided as a list of lists (or array of arrays), and the weights inserted in a second, separate list/array
* `dictionary`, where the coordinate data must be contained in lists, each with key `x*` (``, ``, ecc.) and the weights in another list with key `weight`
* `dictionary`, where the coordinate data must be contained in lists, each with key `x*` (`x0`, `x1`, ecc.) and the weights in another list with key `weight`

## Generating a test dataset with `test_blobs`
If a user wants to test the library without using real data, they can easily do so using the `test_blobs` method.
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
'Operating System :: Unix',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X'
]
)

0 comments on commit 9e98891

Please sign in to comment.