From 9e9889148bc895aae5474c4b67515e111c557a89 Mon Sep 17 00:00:00 2001 From: Simone Balducci <93096843+sbaldu@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:56:04 +0200 Subject: [PATCH] Add installation instructions in README (#64) * Add instructions on how to install * Separate cloning commands * Temporarily remove Windows from supported OS * Separate source and PyPi sections --- README.md | 27 +++++++++++++++++++++++++-- setup.py | 3 +-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a5bd6b97..ea28c605 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,29 @@ clust.cluster_plotter()

+## 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: @@ -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. diff --git a/setup.py b/setup.py index 0dec7f26..eb9a2310 100644 --- a/setup.py +++ b/setup.py @@ -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' ] )