diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/build-requirements.txt | 5 | ||||
-rw-r--r-- | .github/for_maintainers/new_gudhi_version_creation.md | 71 | ||||
-rw-r--r-- | .github/for_maintainers/next_release_template.md | 10 | ||||
-rw-r--r-- | .github/for_maintainers/tests_strategy.md | 97 | ||||
-rw-r--r-- | .github/how_to_compile_gudhi_in_a_conda_env.md | 93 | ||||
-rw-r--r-- | .github/how_to_use_github_to_contribute_to_gudhi.md | 14 | ||||
-rw-r--r-- | .github/next_release.md | 28 | ||||
-rw-r--r-- | .github/test-requirements.txt | 15 | ||||
-rw-r--r-- | .github/workflows/pip-build-linux.yml | 29 | ||||
-rw-r--r-- | .github/workflows/pip-build-osx.yml | 34 | ||||
-rw-r--r-- | .github/workflows/pip-build-windows.yml | 45 | ||||
-rw-r--r-- | .github/workflows/pip-packaging-linux.yml | 86 | ||||
-rw-r--r-- | .github/workflows/pip-packaging-osx.yml | 34 | ||||
-rw-r--r-- | .github/workflows/pip-packaging-windows.yml | 38 |
14 files changed, 446 insertions, 153 deletions
diff --git a/.github/build-requirements.txt b/.github/build-requirements.txt deleted file mode 100644 index 7de60d23..00000000 --- a/.github/build-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -setuptools -wheel -numpy -Cython -pybind11
\ No newline at end of file diff --git a/.github/for_maintainers/new_gudhi_version_creation.md b/.github/for_maintainers/new_gudhi_version_creation.md index 4de81b8a..de8d0aa5 100644 --- a/.github/for_maintainers/new_gudhi_version_creation.md +++ b/.github/for_maintainers/new_gudhi_version_creation.md @@ -18,15 +18,14 @@ Checkin the modifications, build and test the version: ```bash git submodule update --init rm -rf build; mkdir build; cd build -cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_DIR=/your/path/to/CGAL -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_BENCHMARK=ON -DUSER_VERSION_DIR=gudhi.@GUDHI_VERSION@ -DPython_ADDITIONAL_VERSIONS=3 .. +cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_DIR=/your/path/to/CGAL -DWITH_GUDHI_REMOTE_TEST=ON -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_BENCHMARK=ON -DUSER_VERSION_DIR=gudhi.@GUDHI_VERSION@ -DPython_ADDITIONAL_VERSIONS=3 .. make user_version date +"%d-%m-%Y-%T" > gudhi.@GUDHI_VERSION@/timestamp.txt tar -czvf gudhi.@GUDHI_VERSION@.tar.gz gudhi.@GUDHI_VERSION@ -md5sum gudhi.@GUDHI_VERSION@.tar.gz > md5sum.txt sha256sum gudhi.@GUDHI_VERSION@.tar.gz > sha256sum.txt sha512sum gudhi.@GUDHI_VERSION@.tar.gz > sha512sum.txt -make -j 4 all && ctest -j 4 --output-on-failure +make && ctest --output-on-failure ``` ***[Check there are no error]*** @@ -34,16 +33,21 @@ make -j 4 all && ctest -j 4 --output-on-failure ## Create the documentation ```bash mkdir gudhi.doc.@GUDHI_VERSION@ -make doxygen 2>&1 | tee dox.log && grep warning dox.log ``` ***[Check there are no error and the warnings]*** ```bash -cp -R gudhi.@GUDHI_VERSION@/doc/html gudhi.doc.@GUDHI_VERSION@/cpp cd gudhi.@GUDHI_VERSION@ rm -rf build; mkdir build; cd build cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_DIR=/your/path/to/CGAL -DWITH_GUDHI_EXAMPLE=ON -DPython_ADDITIONAL_VERSIONS=3 .. +make doxygen 2>&1 | tee dox.log && grep warning dox.log +``` + +***[Check there are no error and the warnings]*** + +```bash +cp -R html ../../gudhi.doc.@GUDHI_VERSION@/cpp export LC_ALL=en_US.UTF-8 # cf. bug https://github.com/GUDHI/gudhi-devel/issues/111 make sphinx ``` @@ -56,27 +60,25 @@ cd ../.. tar -czvf gudhi.doc.@GUDHI_VERSION@.tar.gz gudhi.doc.@GUDHI_VERSION@ cd gudhi.@GUDHI_VERSION@/build -make -j 4 all && ctest -j 4 --output-on-failure +make && ctest --output-on-failure ``` ***[Check there are no error]*** ## Upload the documentation -Upload by ftp the content of the directory gudhi.doc.@GUDHI_VERSION@/cpp in a new directory on ForgeLogin@scm.gforge.inria.fr:/home/groups/gudhi/htdocs/doc/@GUDHI_VERSION@ +[GUDHI GitHub pages](https://gudhi.github.io/) is only used as a _"qualification"_ web hosting service. +The _"production"_ web hosting service is https://files.inria.fr (cf. [this doc](https://doc-si.inria.fr/display/SU/Espace+web) +or [this one](https://www.nextinpact.com/article/30325/109058-se-connecter-a-serveur-webdav-sous-linux-macos-ou-windows)). -Upload by ftp the content of the directory gudhi.doc.@GUDHI_VERSION@/python in a new directory on ForgeLogin@scm.gforge.inria.fr:/home/groups/gudhi/htdocs/python/@GUDHI_VERSION@ +Upload the content of the directory gudhi.doc.@GUDHI_VERSION@/cpp in a new directory on gudhi WebDAV in doc/@GUDHI_VERSION@ +Delete the directory doc/latest on gudhi WebDAV. +Copy gudhi WebDAV doc/@GUDHI_VERSION@ as doc/latest (no symbolic link with WebDAV). + +Upload the content of the directory gudhi.doc.@GUDHI_VERSION@/python in a new directory on gudhi WebDAV in python/@GUDHI_VERSION@ +Delete the directory python/latest on gudhi WebDAV. +Copy gudhi WebDAV python/@GUDHI_VERSION@ as python/latest (no symbolic link with WebDAV). -Through ssh, make the **latest** link to your new version of the documentation: -```bash -ssh ForgeLogin@scm.gforge.inria.fr -cd /home/groups/gudhi/htdocs/doc -rm latest -ln -s @GUDHI_VERSION@ latest -cd /home/groups/gudhi/htdocs/python -rm latest -ln -s @GUDHI_VERSION@ latest -``` ## Put a version label on files @@ -84,13 +86,14 @@ ln -s @GUDHI_VERSION@ latest * Name the tag: tags/gudhi-release-@GUDHI_VERSION@ * Name the release GUDHI @GUDHI_VERSION@ release * Write the release note -* Drag'n drop *gudhi.@GUDHI_VERSION@.tar.gz*, *md5sum.txt*, *sha256sum.txt*, *sha512sum.txt* files +* Drag'n drop *gudhi.@GUDHI_VERSION@.tar.gz*, *sha256sum.txt*, *sha512sum.txt* files * Tick the *This is a pre-release* check button if this is a release candidate (untick if this is an official version) * Click the *Publish the release* button ## Pip package -The pip package construction shall be started on release creation, you just have to check [gudhi github actions](https://github.com/GUDHI/gudhi-devel/actions) results. +The pip package construction shall be started on release creation, you just have to check +[gudhi github actions](https://github.com/GUDHI/gudhi-devel/actions) results. The version number must be conform to [pep440](https://www.python.org/dev/peps/pep-0440/#pre-releases) ## Conda package @@ -105,30 +108,22 @@ If you need to update conda tools (conda-build, conda-smithy, ...), add a commen ## Docker image -You have to modify the `Dockerfile_gudhi_installation` at the root of this repository in order to use the last release, cf. lines: +You have to modify the +[Dockerfile_gudhi_installation](https://github.com/GUDHI/gudhi-deploy/blob/main/Dockerfile_for_gudhi_installation) +in gudhi-deploy repository in order to use the last release, cf. lines: ``` ... -RUN curl -LO "https://github.com/GUDHI/gudhi-devel/releases/download/tags%2Fgudhi-release-@GUDHI_VERSION@/gudhi.@GUDHI_VERSION@.tar.gz" \ -&& tar xf gudhi.@GUDHI_VERSION@.tar.gz \ -&& cd gudhi.@GUDHI_VERSION@ \ +ARG GUDHI_VERSION="3.X.X" ... ``` -Build and push images to docker hub: -``` -docker build -f Dockerfile_gudhi_installation -t gudhi/latest_gudhi_version:@GUDHI_VERSION@ . -docker run --rm -it gudhi/latest_gudhi_version:@GUDHI_VERSION@ -``` - -***[Check there are no error with utils and python version]*** +After pushing the changes the docker image build will be automatically performed for +[latest_gudhi_version](https://hub.docker.com/repository/docker/gudhi/latest_gudhi_version) +docker image on docker hub. -``` -docker tag gudhi/latest_gudhi_version:@GUDHI_VERSION@ gudhi/latest_gudhi_version:latest -docker push gudhi/latest_gudhi_version:latest -docker push gudhi/latest_gudhi_version:@GUDHI_VERSION@ -``` +***[Check there are no error]*** ## Mail sending Send version mail to the following lists : -* gudhi-devel@lists.gforge.inria.fr -* gudhi-users@lists.gforge.inria.fr (not for release candidate) +* gudhi-devel@inria.fr +* gudhi-users@inria.fr (not for release candidate) diff --git a/.github/for_maintainers/next_release_template.md b/.github/for_maintainers/next_release_template.md index a2805a55..c57ae4eb 100644 --- a/.github/for_maintainers/next_release_template.md +++ b/.github/for_maintainers/next_release_template.md @@ -1,16 +1,16 @@ We are pleased to announce the release 3.X.X of the GUDHI library. -As a major new feature, the GUDHI library now offers ... +As a major new feature, the GUDHI library now offers **...** We are now using GitHub to develop the GUDHI library, do not hesitate to [fork the GUDHI project on GitHub](https://github.com/GUDHI/gudhi-devel). From a user point of view, we recommend to download GUDHI user version (gudhi.3.X.X.tar.gz). Below is a list of changes made since GUDHI 3.X-1.X-1: - [Module](link) - - ... + - **...** - [Module](link) - - ... + - **...** - Miscellaneous - The [list of bugs that were solved since GUDHI-3.X-1.X-1](https://github.com/GUDHI/gudhi-devel/issues?q=label%3A3.1.1+is%3Aclosed) is available on GitHub. @@ -26,3 +26,7 @@ Feel free to [contact us](https://gudhi.inria.fr/contact/) in case you have any For further information about downloading and installing the library ([C++](https://gudhi.inria.fr/doc/latest/installation.html) or [Python](https://gudhi.inria.fr/python/latest/installation.html)), please visit the [GUDHI web site](https://gudhi.inria.fr/). +## Contributors + +- **...** +- **...**
\ No newline at end of file diff --git a/.github/for_maintainers/tests_strategy.md b/.github/for_maintainers/tests_strategy.md new file mode 100644 index 00000000..d0ae76ef --- /dev/null +++ b/.github/for_maintainers/tests_strategy.md @@ -0,0 +1,97 @@ +# Tests strategy + +This document tries to sum up the tests strategy that has been put in place for gudhi continuous integration. + +The aim is to help maintainers to anticipate third parties modifications, updates. + +## CMake options + +[CMake GUDHI options](../../src/cmake/modules/GUDHI_options.cmake) allows to activate/deactivate what should be built and tested. +Note the special option `WITH_GUDHI_THIRD_PARTY` that, when set to `OFF`, accelerates doxygen documentation generation or `user_version` for instance. + +## Builds + +### Linux + +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; here the WITH_GUDHI_REMOTE_TEST option is enabled which adds datasets fetching test) + +(cf. `.circleci/config.yml`) + +These build categories are done with and without CGAL, and, with and without Eigen to be sure the users won't be annoyed if a third party is missing. + +With CGAL and with Eigen builds are performed inside the docker image `gudhi/ci_for_gudhi` based on `Dockerfile_for_circleci_image` file. +Without CGAL, and, with or without Eigen builds are performed inside the docker image `gudhi/ci_for_gudhi_wo_cgal` based on `Dockerfile_for_circleci_image_without_cgal` file. + +#### Update docker images + +C++ third parties installation is done thanks to apt on Ubuntu latest LTS. + +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 . +docker build -f Dockerfile_for_circleci_image_without_cgal -t gudhi/ci_for_gudhi_wo_cgal:latest . +docker login # requires some specific rights on https://hub.docker.com/u/gudhi/repository/docker/gudhi +docker push gudhi/ci_for_gudhi:latest +docker push gudhi/ci_for_gudhi_wo_cgal:latest +``` + +### Windows + +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 (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 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 +negligible compared to build and tests timings (about 30 minutes). Builds and tests include: + +* examples (C++) +* tests (C++) +* utils (C++) +* 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 is done thanks to [brew](https://formulae.brew.sh/formula/). +In case of an installation issue, check in formula issues. + +## Pip packaging + +Pip packaging is done in 2 parts: + +* on push and pull requests, the wheels are built (pip package dry-run) +* on releases, the wheels are built and sent to pypi.org (package) + +Only the Linux pip package is based on a docker image (`gudhi/pip_for_gudhi` based on `Dockerfile_for_pip` file) to make it faster. + +### Update docker image + +C++ third parties installation is done thanks to yum on an image based on `quay.io/pypa/manylinux2014_x86_64`. + +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 +docker build -f Dockerfile_for_pip -t gudhi/pip_for_gudhi:latest . +docker login # requires some specific rights on https://hub.docker.com/u/gudhi/repository/docker/gudhi +docker push gudhi/pip_for_gudhi:latest +``` 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 diff --git a/.github/how_to_use_github_to_contribute_to_gudhi.md b/.github/how_to_use_github_to_contribute_to_gudhi.md index 747ca39b..f72bb9d6 100644 --- a/.github/how_to_use_github_to_contribute_to_gudhi.md +++ b/.github/how_to_use_github_to_contribute_to_gudhi.md @@ -17,7 +17,7 @@ You can see your fork at https://github.com/LOGIN/gudhi-devel ## Create a local clone on your computer ```bash -git clone https://github.com/LOGIN/gudhi-devel.git +git clone --recurse-submodules https://github.com/LOGIN/gudhi-devel.git ``` This creates a directory gudhi-devel, which you are free to move around or rename. For the following, change to that directory: @@ -25,14 +25,15 @@ This creates a directory gudhi-devel, which you are free to move around or renam cd gudhi-devel ``` -When you clone the repository, you also need to download the *submodules*. - ## Submodules -Hera, used for Wasserstein distance, is available on an external git repository. To download it: +When you clone the repository, you also need to download the *submodules*. This is done automatically thanks to `--recurse-submodules`. +If you forgot this option, you can still download them with ```bash git submodule update --init ``` +The submodules appear in the `ext/` subdirectory. There are currently 2, [Hera](https://github.com/anigmetov/hera) for distances between persistence diagrams, and [gudhi-deploy](https://github.com/GUDHI/gudhi-deploy) for Continuous Integration. + ## Configuring a remote for a fork ```bash git remote add upstream https://github.com/GUDHI/gudhi-devel.git @@ -65,6 +66,11 @@ It is safe, it will not mess with your files. git submodule sync git submodule update --init ``` +You can configure `git` to do this automatically with +```bash +git config submodule.recurse true +``` +(add `--global` if you want it to apply to other projects as well) ## Create a branch, based on the current master ```bash diff --git a/.github/next_release.md b/.github/next_release.md index 5a74966d..f27af825 100644 --- a/.github/next_release.md +++ b/.github/next_release.md @@ -1,23 +1,22 @@ -We are pleased to announce the release 3.4.0 of the GUDHI library. +We are pleased to announce the release 3.8.0 of the GUDHI library. -As a major new feature, the GUDHI library now offers dD weighted alpha complex, pip and conda packages for Python 3.9. +As a major new feature, the GUDHI library now offers Perslay, a Tensorflow model for the representations module. -We are now using GitHub to develop the GUDHI library, do not hesitate to [fork the GUDHI project on GitHub](https://github.com/GUDHI/gudhi-devel). From a user point of view, we recommend to download GUDHI user version (gudhi.3.4.0.tar.gz). +We are now using GitHub to develop the GUDHI library, do not hesitate to [fork the GUDHI project on GitHub](https://github.com/GUDHI/gudhi-devel). From a user point of view, we recommend to download GUDHI user version (gudhi.3.X.X.tar.gz). -Below is a list of changes made since GUDHI 3.3.0: +Below is a list of changes made since GUDHI 3.7.1: -- [Alpha complex](https://gudhi.inria.fr/doc/latest/group__alpha__complex.html) - - the C++ weighted version for alpha complex is now available in any dimension D. +- [Perslay](https://gudhi.inria.fr/python/latest/representations_tflow_itf_ref.html) + - Tensorflow model for the representations module -- Simplex tree [C++](https://gudhi.inria.fr/doc/latest/class_gudhi_1_1_simplex__tree.html) [Python](http://gudhi.gforge.inria.fr/python/latest/simplex_tree_ref.html) - - A new method to reset the filtrations - - A new method to get the boundaries of a simplex +- [Hera version of Wasserstein distance](https://gudhi.inria.fr/python/latest/wasserstein_distance_user.html#hera) + - now provides matching in its interface -- [Subsampling](https://gudhi.inria.fr/doc/latest/group__subsampling.html) - - The C++ function `choose_n_farthest_points()` now takes a distance function instead of a kernel as first argument, users can replace `k` with `k.squared_distance_d_object()` in each call in their code. +- [Module](link) + - **...** - Miscellaneous - - The [list of bugs that were solved since GUDHI-3.3.0](https://github.com/GUDHI/gudhi-devel/issues?q=label%3A3.4.0+is%3Aclosed) is available on GitHub. + - The [list of bugs that were solved since GUDHI-3.7.1](https://github.com/GUDHI/gudhi-devel/issues?q=label%3A3.8.0+is%3Aclosed) is available on GitHub. All modules are distributed under the terms of the MIT license. However, there are still GPL dependencies for many modules. We invite you to check our [license dedicated web page](https://gudhi.inria.fr/licensing/) for further details. @@ -29,3 +28,8 @@ We provide [bibtex entries](https://gudhi.inria.fr/doc/latest/_citation.html) fo Feel free to [contact us](https://gudhi.inria.fr/contact/) in case you have any questions or remarks. For further information about downloading and installing the library ([C++](https://gudhi.inria.fr/doc/latest/installation.html) or [Python](https://gudhi.inria.fr/python/latest/installation.html)), please visit the [GUDHI web site](https://gudhi.inria.fr/). + +## Contributors + +- **...** +- **...** diff --git a/.github/test-requirements.txt b/.github/test-requirements.txt deleted file mode 100644 index 688a2a11..00000000 --- a/.github/test-requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -pytest -pytest-cov -sphinx -sphinxcontrib-bibtex -sphinx-paramlinks -matplotlib -scipy -scikit-learn -POT -tensorflow -tensorflow-addons -torch<1.5 -pykeops -hnswlib -eagerpy diff --git a/.github/workflows/pip-build-linux.yml b/.github/workflows/pip-build-linux.yml index cf8ddadf..88ca7db3 100644 --- a/.github/workflows/pip-build-linux.yml +++ b/.github/workflows/pip-build-linux.yml @@ -4,18 +4,31 @@ on: [push, pull_request] jobs: build: - name: build pip wheels + name: build pip wheel runs-on: ubuntu-latest + # cf. https://github.com/GUDHI/gudhi-deploy/blob/main/Dockerfile_for_pip container: gudhi/pip_for_gudhi steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - name: Build wheels for Python 3.9 + - name: Build wheel for Python 3.11 run: | - mkdir build_39 - cd build_39 - cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON39/bin/python .. + mkdir build_311 + cd build_311 + cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON311/bin/python .. cd src/python - $PYTHON39/bin/python setup.py bdist_wheel - auditwheel repair dist/*.whl
\ No newline at end of file + $PYTHON311/bin/python -m build -n + auditwheel show dist/*.whl + auditwheel repair dist/*.whl + ls wheelhouse/*.whl + - name: Install and test wheel for Python 3.11 + run: | + $PYTHON311/bin/python -m pip install --user pytest build_311/src/python/wheelhouse/*.whl + $PYTHON311/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON311/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Upload linux python wheel + uses: actions/upload-artifact@v3 + with: + name: linux python wheel + path: build_311/src/python/wheelhouse/*.whl diff --git a/.github/workflows/pip-build-osx.yml b/.github/workflows/pip-build-osx.yml index 50b8b09c..81f516cd 100644 --- a/.github/workflows/pip-build-osx.yml +++ b/.github/workflows/pip-build-osx.yml @@ -2,19 +2,24 @@ name: pip build osx on: [push, pull_request] +env: + MACOSX_DEPLOYMENT_TARGET: 10.14 + _PYTHON_HOST_PLATFORM: macosx-10.14-universal2 + ARCHFLAGS: "-arch arm64 -arch x86_64" + jobs: build: runs-on: macos-latest strategy: max-parallel: 4 matrix: - python-version: ['3.9'] + python-version: ['3.11'] name: Build wheels for Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 @@ -22,13 +27,30 @@ jobs: run: | brew update || true brew install boost eigen gmp mpfr cgal || true - python -m pip install --user -r .github/build-requirements.txt - python -m pip install --user twine delocate + python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt + python -m pip install --user build twine delocate + ./scripts/build_osx_universal_gmpfr.sh + # Now the universal libraries are in $PWD/deps-uni/lib - name: Build python wheel run: | + export GMP_LIB_DIR=$PWD/deps-uni/lib + export GMPXX_LIB_DIR=$PWD/deps-uni/lib + export MPFR_LIB_DIR=$PWD/deps-uni/lib python --version mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DPython_ADDITIONAL_VERSIONS=3 .. cd src/python - python setup.py bdist_wheel + python -m build -n + export PATH="$PATH:`python -m site --user-base`/bin" + delocate-wheel --require-archs universal2 -v dist/*.whl + - name: Install and test python wheel + run: | + python -m pip install --user pytest build/src/python/dist/*.whl + python -c "import gudhi; print(gudhi.__version__)" + python -m pytest src/python/test/test_alpha_complex.py + - name: Upload OSx python wheel + uses: actions/upload-artifact@v3 + with: + name: osx python wheel + path: build/src/python/dist/*.whl diff --git a/.github/workflows/pip-build-windows.yml b/.github/workflows/pip-build-windows.yml index aacbbc52..02617e31 100644 --- a/.github/workflows/pip-build-windows.yml +++ b/.github/workflows/pip-build-windows.yml @@ -8,30 +8,45 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.9'] + python-version: ['3.11'] name: Build wheels for Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 - name: Install dependencies run: | - vcpkg update - vcpkg upgrade --no-dry-run - type c:/vcpkg/ports/cgal/portfile.cmake + set VCPKG_BUILD_TYPE=release vcpkg install eigen3 cgal --triplet x64-windows - python -m pip install --user -r .github/build-requirements.txt - python -m pip list - - name: Build python wheel + vcpkg version + ls "C:\vcpkg\installed\x64-windows\bin\" + python -m pip install --user -r .\ext\gudhi-deploy\build-requirements.txt + python -m pip install --user build + - name: Build python wheel and install it run: | mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Release -DGMP_INCLUDE_DIR="c:/vcpkg/installed/x64-windows/include" -DGMP_LIBRARIES="c:/vcpkg/installed/x64-windows/lib/mpir.lib" -DGMP_LIBRARIES_DIR="c:/vcpkg/installed/x64-windows/lib" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DPython_ADDITIONAL_VERSIONS=3 .. - cd src/python - cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll gudhi/ - cp c:/vcpkg/installed/x64-windows/bin/mpir.dll gudhi/ - python setup.py bdist_wheel
\ No newline at end of file + cd ".\build\" + cmake -DCMAKE_BUILD_TYPE=Release -DFORCE_EIGEN_DEFAULT_DENSE_INDEX_TYPE_TO_INT=ON -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows .. + cd ".\src\python\" + cp "C:\vcpkg\installed\x64-windows\bin\mpfr*.dll" ".\gudhi\" + cp "C:\vcpkg\installed\x64-windows\bin\gmp*.dll" ".\gudhi\" + python -m build -n + ls ".\dist\" + cd ".\dist\" + Get-ChildItem *.whl | ForEach-Object{python -m pip install --user $_.Name} + - name: Test python wheel + run: | + Get-Location + dir + python -m pip install --user pytest + python -c "import gudhi; print(gudhi.__version__)" + python -m pytest ".\src\python\test\test_alpha_complex.py" + - name: Upload Windows python wheel + uses: actions/upload-artifact@v3 + with: + name: windows python wheel + path: build/src/python/dist/*.whl diff --git a/.github/workflows/pip-packaging-linux.yml b/.github/workflows/pip-packaging-linux.yml index 469c3b3b..866f4335 100644 --- a/.github/workflows/pip-packaging-linux.yml +++ b/.github/workflows/pip-packaging-linux.yml @@ -6,60 +6,100 @@ on: jobs: build: - name: build pip wheels + name: build pip wheel runs-on: ubuntu-latest + # cf. https://github.com/GUDHI/gudhi-deploy/blob/main/Dockerfile_for_pip container: gudhi/pip_for_gudhi steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - name: Build wheels for Python 3.5 - run: | - mkdir build_35 - cd build_35 - cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON35/bin/python .. - cd src/python - $PYTHON35/bin/python setup.py bdist_wheel - auditwheel repair dist/*.whl - - name: Build wheels for Python 3.6 + - name: Build wheel for Python 3.6 run: | mkdir build_36 cd build_36 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON36/bin/python .. cd src/python - $PYTHON36/bin/python setup.py bdist_wheel + $PYTHON36/bin/python -m build -n auditwheel repair dist/*.whl - - name: Build wheels for Python 3.7 + - name: Install and test wheel for Python 3.6 + run: | + $PYTHON36/bin/python -m pip install --user pytest build_36/src/python/dist/*.whl + $PYTHON36/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON36/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.7 run: | mkdir build_37 cd build_37 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON37/bin/python .. cd src/python - $PYTHON37/bin/python setup.py bdist_wheel + $PYTHON37/bin/python -m build -n auditwheel repair dist/*.whl - - name: Build wheels for Python 3.8 + - name: Install and test wheel for Python 3.7 + run: | + $PYTHON37/bin/python -m pip install --user pytest build_37/src/python/dist/*.whl + $PYTHON37/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON37/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.8 run: | mkdir build_38 cd build_38 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON38/bin/python .. cd src/python - $PYTHON38/bin/python setup.py bdist_wheel + $PYTHON38/bin/python -m build -n auditwheel repair dist/*.whl - - name: Build wheels for Python 3.9 + - name: Install and test wheel for Python 3.8 + run: | + $PYTHON38/bin/python -m pip install --user pytest build_38/src/python/dist/*.whl + $PYTHON38/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON38/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.9 run: | mkdir build_39 cd build_39 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON39/bin/python .. cd src/python - $PYTHON39/bin/python setup.py bdist_wheel + $PYTHON39/bin/python -m build -n auditwheel repair dist/*.whl + - name: Install and test wheel for Python 3.9 + run: | + $PYTHON39/bin/python -m pip install --user pytest build_39/src/python/dist/*.whl + $PYTHON39/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON39/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.10 + run: | + mkdir build_310 + cd build_310 + cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON310/bin/python .. + cd src/python + $PYTHON310/bin/python -m build -n + auditwheel repair dist/*.whl + - name: Install and test wheel for Python 3.10 + run: | + $PYTHON310/bin/python -m pip install --user pytest build_310/src/python/dist/*.whl + $PYTHON310/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON310/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.11 + run: | + mkdir build_311 + cd build_311 + cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON311/bin/python .. + cd src/python + $PYTHON311/bin/python -m build -n + auditwheel repair dist/*.whl + - name: Install and test wheel for Python 3.11 + run: | + $PYTHON311/bin/python -m pip install --user pytest build_311/src/python/dist/*.whl + $PYTHON311/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON311/bin/python -m pytest src/python/test/test_alpha_complex.py - name: Publish on PyPi env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - $PYTHON39/bin/python -m twine upload build_35/src/python/wheelhouse/* - $PYTHON39/bin/python -m twine upload build_36/src/python/wheelhouse/* - $PYTHON39/bin/python -m twine upload build_37/src/python/wheelhouse/* - $PYTHON39/bin/python -m twine upload build_38/src/python/wheelhouse/* - $PYTHON39/bin/python -m twine upload build_39/src/python/wheelhouse/*
\ No newline at end of file + $PYTHON36/bin/python -m twine upload build_36/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_37/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_38/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_39/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_310/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_311/src/python/wheelhouse/* diff --git a/.github/workflows/pip-packaging-osx.yml b/.github/workflows/pip-packaging-osx.yml index 46441e65..15840c9a 100644 --- a/.github/workflows/pip-packaging-osx.yml +++ b/.github/workflows/pip-packaging-osx.yml @@ -4,19 +4,24 @@ on: release: types: [published] +env: + MACOSX_DEPLOYMENT_TARGET: 10.15 + _PYTHON_HOST_PLATFORM: macosx-10.15-universal2 + ARCHFLAGS: "-arch arm64 -arch x86_64" + jobs: build: runs-on: macos-latest strategy: max-parallel: 4 matrix: - python-version: ['3.5', '3.6', '3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] name: Build wheels for Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 @@ -24,22 +29,33 @@ jobs: run: | brew update || true brew install boost eigen gmp mpfr cgal || true - python -m pip install --user -r .github/build-requirements.txt - python -m pip install --user twine delocate + python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt + python -m pip install --user build twine delocate + ./scripts/build_osx_universal_gmpfr.sh + # Now the universal libs are in $PWD/deps-uni/lib - name: Build python wheel run: | + export GMP_LIB_DIR=$PWD/deps-uni/lib + export GMPXX_LIB_DIR=$PWD/deps-uni/lib + export MPFR_LIB_DIR=$PWD/deps-uni/lib python --version mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DPython_ADDITIONAL_VERSIONS=3 .. cd src/python - python setup.py bdist_wheel + python -m build -n + - name: Install and test python wheel + run: | + python -m pip install --user pytest build/src/python/dist/*.whl + python -c "import gudhi; print(gudhi.__version__)" + python -m pytest src/python/test/test_alpha_complex.py - name: Publish on PyPi env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | mkdir wheelhouse - /Users/runner/.local/bin/delocate-listdeps build/src/python/dist/* - /Users/runner/.local/bin/delocate-wheel --require-archs x86_64 -w wheelhouse build/src/python/dist/* - python -m twine upload wheelhouse/*
\ No newline at end of file + export PATH="$PATH:`python -m site --user-base`/bin" + delocate-listdeps build/src/python/dist/* + delocate-wheel --require-archs universal2 -w wheelhouse build/src/python/dist/* + python -m twine upload wheelhouse/* diff --git a/.github/workflows/pip-packaging-windows.yml b/.github/workflows/pip-packaging-windows.yml index 3a751486..e5a7d817 100644 --- a/.github/workflows/pip-packaging-windows.yml +++ b/.github/workflows/pip-packaging-windows.yml @@ -10,34 +10,42 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.5', '3.6', '3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] name: Build wheels for Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 - name: Install dependencies run: | - vcpkg update - vcpkg upgrade --no-dry-run - type c:/vcpkg/ports/cgal/portfile.cmake + set VCPKG_BUILD_TYPE=release vcpkg install eigen3 cgal --triplet x64-windows - python -m pip install --user -r .github/build-requirements.txt - python -m pip install --user twine + vcpkg version + ls "C:\vcpkg\installed\x64-windows\bin\" + python -m pip install --user -r .\ext\gudhi-deploy\build-requirements.txt + python -m pip install --user build twine python -m pip list - - name: Build python wheel + - name: Build python wheel and install it run: | mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Release -DGMP_INCLUDE_DIR="c:/vcpkg/installed/x64-windows/include" -DGMP_LIBRARIES="c:/vcpkg/installed/x64-windows/lib/mpir.lib" -DGMP_LIBRARIES_DIR="c:/vcpkg/installed/x64-windows/lib" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DPython_ADDITIONAL_VERSIONS=3 .. - cd src/python - cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll gudhi/ - cp c:/vcpkg/installed/x64-windows/bin/mpir.dll gudhi/ - python setup.py bdist_wheel + cd ".\build\" + cmake -DCMAKE_BUILD_TYPE=Release -DFORCE_EIGEN_DEFAULT_DENSE_INDEX_TYPE_TO_INT=ON -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows .. + cd ".\src\python\" + cp "C:\vcpkg\installed\x64-windows\bin\mpfr*.dll" ".\gudhi\" + cp "C:\vcpkg\installed\x64-windows\bin\gmp*.dll" ".\gudhi\" + python -m build -n + ls ".\dist\" + cd ".\dist\" + Get-ChildItem *.whl | ForEach-Object{python -m pip install --user $_.Name} + - name: Test python wheel + run: | + python -m pip install --user pytest + python -c "import gudhi; print(gudhi.__version__)" + python -m pytest ".\src\python\test\test_alpha_complex.py" - name: Publish on PyPi env: TWINE_USERNAME: __token__ |