summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/for_maintainers/tests_strategy.md28
-rw-r--r--.github/how_to_compile_gudhi_in_a_conda_env.md93
2 files changed, 107 insertions, 14 deletions
diff --git a/.github/for_maintainers/tests_strategy.md b/.github/for_maintainers/tests_strategy.md
index c25acf9b..338d4282 100644
--- a/.github/for_maintainers/tests_strategy.md
+++ b/.github/for_maintainers/tests_strategy.md
@@ -8,13 +8,13 @@ The aim is to help maintainers to anticipate third parties modifications, update
### Linux
-As all the third parties are already installed (thanks to docker), the compilations has been seperated by categories to be parallelized:
+As all the third parties are already installed (thanks to docker), the compilations have been separated in categories to be parallelized:
* examples (C++)
* tests (C++)
* utils (C++)
* doxygen (C++ documentation that is available in the artefacts)
-* python (including documentation and code coverage that are available in the artefacts)
+* python (including documentation and code coverage that are available in the artefacts; here the WITH_GUDHI_REMOTE_TEST option is enabled which adds datasets fetching test)
(cf. `.circleci/config.yml`)
@@ -25,9 +25,9 @@ Without CGAL, and, with or without Eigen builds are performed inside the docker
#### Update docker images
-C++ third parties installation are done thanks to apt on Ubuntu latest LTS.
+C++ third parties installation is done thanks to apt on Ubuntu latest LTS.
-Docker images need to be rebuild and push each time `.github/build-requirements`, `.github/test-requirements`, when a new third party is added, when a new CGAL version improves gudhi performances, ...
+Docker images need to be rebuilt and pushed each time `.github/build-requirements`, `.github/test-requirements`, when a new third party is added, when a new CGAL version improves gudhi performances, ...
```bash
docker build -f Dockerfile_for_circleci_image -t gudhi/ci_for_gudhi:latest .
@@ -39,35 +39,35 @@ docker push gudhi/ci_for_gudhi_wo_cgal:latest
### Windows
-The compilations are not parallelized, as installation time (about 30 minutes) is too much compare to
+The compilations are not parallelized, as installation time (about 30 minutes) is too much compared to
build and tests timings (about 30 minutes). Builds and tests include:
* examples (C++)
* tests (C++)
* utils (C++)
-* python
+* python (here the WITH_GUDHI_REMOTE_TEST option is enabled which adds datasets fetching test)
Doxygen (C++) is not generated.
(cf. `azure-pipelines.yml`)
-C++ third parties installation are done thanks to [vcpkg](https://github.com/microsoft/vcpkg/).
-In case of installation issue, check in [vcpkg issues](https://github.com/microsoft/vcpkg/issues).
+C++ third parties installation is done thanks to [vcpkg](https://github.com/microsoft/vcpkg/).
+In case of an installation issue, check in [vcpkg issues](https://github.com/microsoft/vcpkg/issues).
### OSx
The compilations are not parallelized, but they should, as installation time (about 4 minutes) is
-negligeable compare to build and tests timings (about 30 minutes). Builds and tests include:
+negligible compared to build and tests timings (about 30 minutes). Builds and tests include:
* examples (C++)
* tests (C++)
* utils (C++)
-* python
+* python (here the WITH_GUDHI_REMOTE_TEST option is enabled which adds datasets fetching test)
* Doxygen (C++)
(cf. `azure-pipelines.yml`)
-C++ third parties installation are done thanks to [brew](https://formulae.brew.sh/formula/).
-In case of installation issue, check in formula issues.
+C++ third parties installation is done thanks to [brew](https://formulae.brew.sh/formula/).
+In case of an installation issue, check in formula issues.
## Pip packaging
@@ -80,9 +80,9 @@ Only the Linux pip package is based on a docker image (`gudhi/pip_for_gudhi` bas
### Update docker image
-C++ third parties installation are done thanks to yum on an image based on `quay.io/pypa/manylinux2014_x86_64`.
+C++ third parties installation is done thanks to yum on an image based on `quay.io/pypa/manylinux2014_x86_64`.
-Docker image need to be rebuild and push each time `.github/build-requirements`, when a new third party is added, when a new CGAL version improves gudhi performances, ...
+Docker image needs to be rebuilt and pushed each time `.github/build-requirements`, when a new third party is added, when a new CGAL version improves gudhi performances, ...
As `.github/test-requirements` is not installed, no need to rebuild image when this file is modified.
```bash
diff --git a/.github/how_to_compile_gudhi_in_a_conda_env.md b/.github/how_to_compile_gudhi_in_a_conda_env.md
new file mode 100644
index 00000000..4acfca2e
--- /dev/null
+++ b/.github/how_to_compile_gudhi_in_a_conda_env.md
@@ -0,0 +1,93 @@
+# Install a conda development environment to compile GUDHI
+
+## Install miniconda
+
+Download the [installer](https://docs.conda.io/en/latest/miniconda.html) required by your system and follow the [instructions](https://conda.io/projects/conda/en/latest/user-guide/install/index.html).
+
+## Create a dedicated environment
+
+```bash
+conda install -c conda-forge mamba # installation with mamba is faster
+conda create --name gudhi
+conda activate gudhi
+mamba install -c conda-forge python cmake doxygen eigen cgal-cpp
+```
+
+Some of the requirements are in the gudhi-devel repository (please refer to
+[how to use github to contribute to gudhi](how_to_use_github_to_contribute_to_gudhi.md)).
+Once the gudhi-devel repository is cloned on your machine (`git clone...`) - let's call it `/workdir/gudhi-devel` i.e. -
+and once the submodules are initialised (`git submodule update --init`):
+
+```bash
+pip install -r ext/gudhi-deploy/build-requirements.txt
+pip install -r ext/gudhi-deploy/test-requirements.txt # pytorch can be painful to install - not mandatory
+```
+
+## Compilation
+
+In order to compile all c++ utilities, examples, benchmarks, unitary tests, and python module:
+```bash
+cd /workdir/gudhi-devel
+rm -rf build; mkdir build # /!\ any existing build folder will be removed
+cd build
+# To build all even examples and benchmarks
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_BENCHMARK=ON ..
+```
+
+### Specific python compilation
+
+In order to compile only python module
+```bash
+cd /workdir/gudhi-devel
+rm -rf build; mkdir build # /!\ any existing build folder will be removed
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$CONDA_PREFIX ..
+cd src/python
+# To build python module in parallel
+python setup.py build_ext -j 16 --inplace # 16 is the number of CPU that are used to compile the python module. Can be any other value.
+# to clean the build
+# python setup.py clean --all
+```
+
+In order to use freshly compiled gudhi python module:
+```bash
+PYTHONPATH=/workdir/gudhi-devel/build/src/python python # or ipython, jupyter, ...
+```
+
+### Specific C++ documentation generation
+
+```bash
+cd /workdir/gudhi-devel
+rm -rf build; mkdir build # /!\ any existing build folder will be removed
+cd build
+# python OFF to prevent python modules search makes cmake faster
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DWITH_GUDHI_PYTHON=OFF -DUSER_VERSION_DIR=version ..
+make user_version;
+cd version
+mkdir build
+cd build
+# python OFF to prevent python modules search makes cmake faster
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DWITH_GUDHI_PYTHON=OFF ..
+make doxygen 2>&1 | tee dox.log
+grep warning dox.log # Warnings can be lost with parallel doxygen
+firefox html/index.html # [optional] To display the c++ documentation. Anything else than firefox can be used.
+```
+
+### Specific python documentation generation
+
+```bash
+cd /workdir/gudhi-devel
+rm -rf build; mkdir build # /!\ any existing build folder will be removed
+cd build
+# python OFF to prevent python modules search makes cmake faster - it is the next cmake call in user version that matters
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DWITH_GUDHI_PYTHON=OFF -DUSER_VERSION_DIR=version ..
+make user_version;
+cd version
+mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$CONDA_PREFIX ..
+cd python
+# To build python module in parallel
+python setup.py build_ext -j 16 --inplace # 16 is the number of CPU that are used to compile the python module. Can be any other value.
+firefox sphinx/index.html # [optional] To display the python documentation. Anything else than firefox can be used.
+``` \ No newline at end of file