From 1f7a87cc30bfe5ed8529137c646128cc041b7d8d Mon Sep 17 00:00:00 2001 From: AliceMazzoleni99 Date: Thu, 19 Feb 2026 11:22:35 +0100 Subject: [PATCH] updated Documentation and README (#274) --- README.md | 11 +++++++---- docs/src/Installation.rst | 29 +++++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2bfdade..9a88f0a 100644 --- a/README.md +++ b/README.md @@ -25,27 +25,30 @@ mkdir build cd build #configure using cmake -cmake ../aare +cmake ../aare -DAARE_PYTHON_BINDINGS=ON #build (replace 4 with the number of threads you want to use) make -j4 ``` -Now you can use the Python module from your build directory +Now you can use the Python module from your build directory ```python import aare f = aare.File('Some/File/I/Want_to_open_master_0.json') ``` -To run form other folders either add the path to your conda environment using conda-build or add it to your PYTHONPATH +To run from other folders either add the path to your conda environment using conda-build or add the module to your PYTHONPATH +```bash +export PYTHONPATH=path_to_aare/aare/build:$PYTHONPATH +``` ### Install using conda/mamba ```bash #enable your env first! -conda install aare=2024.10.29.dev0 -c slsdetectorgroup +conda install aare -c slsdetectorgroup # installs latest version ``` ### Install to a custom location and use in your project diff --git a/docs/src/Installation.rst b/docs/src/Installation.rst index 4e2e706..2cd8c68 100644 --- a/docs/src/Installation.rst +++ b/docs/src/Installation.rst @@ -15,9 +15,16 @@ dependencies on older distributions. .. note :: - aare is developing rapidly. Check for the latest release by + aare is developing rapidly. Check for available releases by using: **conda search aare -c slsdetectorgroup** +To install the latest version of aare using conda, run: + +.. code-block:: bash + + conda install aare -c slsdetectorgroup + +To install a specific version of aare, run: .. code-block:: bash @@ -28,7 +35,7 @@ dependencies on older distributions. cmake build (development install) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you are working on aare or want to test our a version that doesn't yet have +If you are working on aare or want to test out a version that doesn't yet have a conda package. Build using cmake and then run from the build folder. .. code-block:: bash @@ -47,6 +54,20 @@ a conda package. Build using cmake and then run from the build folder. # add the build folder to your PYTHONPATH and then you should be able to # import aare in python +To build the python bindings and use aare in python compile with option ``-DAARE_PYTHON_BINDINGS=ON``. + +.. code-block:: bash + + #in build folder + cmake ../aare -DAARE_PYTHON_BINDINGS=ON + make -j4 + +Make sure to add the build folder to your PYTHONPATH and then you should be able to import aare in python. + +.. code-block:: bash + + export PYTHONPATH=/path/to/aare/build:$PYTHONPATH + cmake build + install and use in your C++ project ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -79,9 +100,9 @@ For detailed options see the CMakeLists.txt file in the root directory of the pr Use system libraries instead of using FetchContent to pull in dependencies. Default option is off. -**AARE_PYTHON_BINDINGS "Build python bindings" ON** +**AARE_PYTHON_BINDINGS "Build python bindings" OFF** -Build the Python bindings. Default option is on. +Build the Python bindings. Default option is off. .. warning ::