summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Rouvreau <vincent.rouvreau@inria.fr>2022-01-21 08:28:33 +0100
committerVincent Rouvreau <vincent.rouvreau@inria.fr>2022-01-21 08:28:33 +0100
commit12248873068248b4a31b39987a8700f8c8284a85 (patch)
tree8d08e61f73275e14453582660fcaf475f560f066
parent54f6f178d30f59a35758421e285cfac946927064 (diff)
parentde5aa9c891ef13c9fc2b2635bcd27ab873b0057b (diff)
Merge master
-rw-r--r--.appveyor.yml55
-rw-r--r--.github/for_maintainers/new_gudhi_version_creation.md4
-rw-r--r--.github/next_release.md11
-rw-r--r--.github/workflows/pip-build-linux.yml17
-rw-r--r--.github/workflows/pip-build-osx.yml3
-rw-r--r--.github/workflows/pip-build-windows.yml44
-rw-r--r--.github/workflows/pip-packaging-linux.yml5
-rw-r--r--.github/workflows/pip-packaging-osx.yml3
-rw-r--r--.github/workflows/pip-packaging-windows.yml42
-rw-r--r--CMakeGUDHIVersion.txt4
m---------ext/gudhi-deploy0
-rw-r--r--src/Cech_complex/benchmark/cech_complex_benchmark.cpp2
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h2
-rw-r--r--src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h9
-rw-r--r--src/Toplex_map/benchmark/CMakeLists.txt4
-rw-r--r--src/cmake/modules/GUDHI_third_party_libraries.cmake1
-rw-r--r--src/common/benchmark/CMakeLists.txt4
-rw-r--r--src/python/CMakeLists.txt42
-rw-r--r--src/python/doc/datasets_generators.rst2
-rw-r--r--src/python/gudhi/datasets/generators/_points.cc11
-rw-r--r--src/python/gudhi/datasets/generators/points.py19
21 files changed, 154 insertions, 130 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 9ff8f157..33458a28 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,5 +1,5 @@
image:
- - Visual Studio 2017
+ - Visual Studio 2019
build:
parallel: true
@@ -10,11 +10,10 @@ configuration:
environment:
# update the vcpkg cache even if build fails
- APPVEYOR_SAVE_CACHE_ON_ERROR: true
- PYTHON: "C:\\Python37-x64"
- CMAKE_GMP_FLAGS: -DGMP_INCLUDE_DIR="c:/Tools/vcpkg/installed/x64-windows/include" -DGMP_LIBRARIES="c:/Tools/vcpkg/installed/x64-windows/lib/mpir.lib"
- CMAKE_MPFR_FLAGS: -DMPFR_INCLUDE_DIR="c:/Tools/vcpkg/installed/x64-windows/include" -DMPFR_LIBRARIES="c:/Tools/vcpkg/installed/x64-windows/lib/mpfr.lib"
- CMAKE_VCPKG_FLAGS: -DCMAKE_TOOLCHAIN_FILE=c:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
+ # APPVEYOR_SAVE_CACHE_ON_ERROR: true
+ PYTHON: "C:\\Python39-x64"
+ PYTHONPATH: "C:\\Python39-x64\\lib\\site-packages"
+ CMAKE_VCPKG_FLAGS: -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=c:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake
matrix:
- target: Examples
@@ -30,38 +29,52 @@ environment:
CMAKE_FLAGS: -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON
-cache:
- - c:\Tools\vcpkg\installed
- - '%LOCALAPPDATA%\pip\Cache'
+#cache:
+# - c:\Tools\vcpkg\installed
+# - '%LOCALAPPDATA%\pip\Cache'
init:
- echo %target%
-# tbb:x64-windows
install:
- git submodule update --init
- - vcpkg install boost-disjoint-sets:x64-windows boost-serialization:x64-windows boost-date-time:x64-windows boost-system:x64-windows boost-filesystem:x64-windows boost-units:x64-windows boost-thread:x64-windows boost-program-options:x64-windows eigen3:x64-windows mpfr:x64-windows mpir:x64-windows cgal:x64-windows
- - SET PATH=c:\Tools\vcpkg\installed\x64-windows\bin;%PATH%
- - SET PATH=%PYTHON%;%PYTHON%\Scripts;%PYTHON%\Library\bin;%PATH%
- - SET PYTHONPATH=%PYTHON%\\Lib\\site-packages;%PYTHONPATH%
- - CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
+ - vcpkg update
+ - vcpkg remove --outdated
+ - vcpkg upgrade --no-dry-run
+ - vcpkg install boost-filesystem:x64-windows boost-test:x64-windows boost-program-options:x64-windows tbb:x64-windows eigen3:x64-windows cgal:x64-windows
+ - dir "C:\Tools\vcpkg\installed\x64-windows\bin\"
+ - vcpkg integrate install
+ - CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
+ - "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- python --version
- pip --version
- - python -m pip install --user --upgrade pip
- - python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt
+ - python -m pip install --upgrade pip
+ - python -m pip install --upgrade setuptools
+ - python -m pip install -r ext\gudhi-deploy\build-requirements.txt
# No PyKeOps on windows, let's workaround this one.
- - for /F "tokens=*" %%A in (ext/gudhi-deploy/test-requirements.txt) do python -m pip install --user %%A
+ - for /F "tokens=*" %%A in (ext\gudhi-deploy\test-requirements.txt) do python -m pip install %%A
+ - dir "c:\python39-x64\lib\site-packages"
+ - dir "%LOCALAPPDATA%\pip\Cache"
+ - python -c "from scipy import spatial; print(spatial.cKDTree)"
build_script:
- mkdir build
- cd build
- - cmake -G "Visual Studio 15 2017 Win64" %CMAKE_FLAGS% %CMAKE_GMP_FLAGS% %CMAKE_MPFR_FLAGS% %CMAKE_VCPKG_FLAGS% ..
+ - cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release %CMAKE_FLAGS% %CMAKE_VCPKG_FLAGS% ..
- if [%target%]==[Python] (
- cd src/python &
+ cd src\python &
+ dir . &
type setup.py &
- MSBuild Cython.sln /m /p:Configuration=Release /p:Platform=x64 &
+ copy "C:\Tools\vcpkg\installed\x64-windows\bin\mpfr-6.dll" ".\gudhi\" &
+ copy "C:\Tools\vcpkg\installed\x64-windows\bin\gmp.dll" ".\gudhi\" &
+ copy "C:\Tools\vcpkg\installed\x64-windows\bin\tbb.dll" ".\gudhi\" &
+ copy "C:\Tools\vcpkg\installed\x64-windows\bin\tbbmalloc.dll" ".\gudhi\" &
+ python setup.py build_ext --inplace &
+ SET PYTHONPATH=%CD%;%PYTHONPATH% &
+ echo %PYTHONPATH% &
ctest -j 1 --output-on-failure -C Release
) else (
+ dir . &
MSBuild GUDHIdev.sln /m /p:Configuration=Release /p:Platform=x64 &
ctest -j 1 --output-on-failure -C Release -E diff_files
)
diff --git a/.github/for_maintainers/new_gudhi_version_creation.md b/.github/for_maintainers/new_gudhi_version_creation.md
index 812758e3..19ef168e 100644
--- a/.github/for_maintainers/new_gudhi_version_creation.md
+++ b/.github/for_maintainers/new_gudhi_version_creation.md
@@ -26,7 +26,7 @@ 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]***
@@ -61,7 +61,7 @@ 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]***
diff --git a/.github/next_release.md b/.github/next_release.md
index 5a1215df..5a8eadb7 100644
--- a/.github/next_release.md
+++ b/.github/next_release.md
@@ -1,13 +1,13 @@
-We are pleased to announce the release 3.5.0 of the GUDHI library.
+We are pleased to announce the release 3.X.X of the GUDHI library.
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.4.0:
+Below is a list of changes made since GUDHI 3.5.0:
-- [Coxeter triangulation](https://gudhi.inria.fr/doc/latest/group__coxeter__triangulation.html)
- - constructs a piecewise-linear approximation of an m-dimensional smooth manifold embedded in R^d using an ambient triangulation.
+- [Module](link)
+ - ...
- [Python installation](link)
- Python >= 3.5 and cython >= 0.27 are now required.
@@ -16,7 +16,7 @@ Below is a list of changes made since GUDHI 3.4.0:
- ...
- Miscellaneous
- - The [list of bugs that were solved since GUDHI-3.4.0](https://github.com/GUDHI/gudhi-devel/issues?q=label%3A3.5.0+is%3Aclosed) is available on GitHub.
+ - The [list of bugs that were solved since GUDHI-3.5.0](https://github.com/GUDHI/gudhi-devel/issues?q=label%3A3.6.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.
@@ -28,3 +28,4 @@ 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/).
+
diff --git a/.github/workflows/pip-build-linux.yml b/.github/workflows/pip-build-linux.yml
index 12979a86..a2b4f085 100644
--- a/.github/workflows/pip-build-linux.yml
+++ b/.github/workflows/pip-build-linux.yml
@@ -12,15 +12,16 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true
- - name: Build wheel for Python 3.9
+ - name: Build wheel for Python 3.10
run: |
- mkdir build_39
- cd build_39
- cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON39/bin/python ..
+ mkdir build_310
+ cd build_310
+ cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON310/bin/python ..
cd src/python
- $PYTHON39/bin/python setup.py bdist_wheel
+ $PYTHON310/bin/python setup.py bdist_wheel
auditwheel repair dist/*.whl
- - name: Install and test wheel for Python 3.9
+ - name: Install and test wheel for Python 3.10
run: |
- $PYTHON39/bin/python -m pip install --user pytest build_39/src/python/dist/*.whl
- $PYTHON39/bin/python -m pytest src/python/test/test_alpha_complex.py
+ $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
diff --git a/.github/workflows/pip-build-osx.yml b/.github/workflows/pip-build-osx.yml
index 1626bb77..99d515ff 100644
--- a/.github/workflows/pip-build-osx.yml
+++ b/.github/workflows/pip-build-osx.yml
@@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: ['3.9']
+ python-version: ['3.10']
name: Build wheels for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
@@ -35,4 +35,5 @@ jobs:
- 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
diff --git a/.github/workflows/pip-build-windows.yml b/.github/workflows/pip-build-windows.yml
index 0080f4d5..954b59d5 100644
--- a/.github/workflows/pip-build-windows.yml
+++ b/.github/workflows/pip-build-windows.yml
@@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: ['3.9']
+ python-version: ['3.10']
name: Build wheels for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
@@ -20,36 +20,30 @@ jobs:
architecture: x64
- name: Install dependencies
run: |
- cd c:/vcpkg
- git fetch --all --tags
- git checkout 2020.11-1
- bootstrap-vcpkg.bat
set VCPKG_BUILD_TYPE=release
- vcpkg install eigen3 mpfr boost-accumulators boost-algorithm boost-bimap boost-callable-traits boost-concept-check boost-container boost-core boost-detail boost-filesystem boost-functional boost-fusion boost-geometry boost-graph boost-heap boost-intrusive boost-iostreams boost-iterator boost-lambda boost-logic boost-math boost-mpl boost-multi-index boost-multiprecision boost-numeric-conversion boost-optional boost-parameter boost-pool boost-preprocessor boost-property-map boost-property-tree boost-ptr-container boost-random boost-range boost-serialization boost-spirit boost-thread boost-tuple boost-type-traits boost-units boost-utility boost-variant --triplet x64-windows
+ vcpkg install eigen3 cgal --triplet x64-windows
vcpkg version
- ls C:/vcpkg/installed/x64-windows/bin
- Invoke-WebRequest https://github.com/CGAL/cgal/releases/download/v5.2.1/CGAL-5.2.1.zip -OutFile CGAL-5.2.1.zip
- Expand-Archive -Path CGAL-5.2.1.zip -DestinationPath .
- cd CGAL-5.2.1
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DGMP_INCLUDE_DIR=c:/vcpkg/installed/x64-windows/include -DGMP_LIBRARIES=c:/vcpkg/installed/x64-windows/bin/mpir.dll .
- cd ${{ github.workspace }}
- python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt
+ ls "C:\vcpkg\installed\x64-windows\bin\"
+ python -m pip install --user -r .\ext\gudhi-deploy\build-requirements.txt
python -m pip list
- - name: Build python wheel
+ - name: Build python wheel and install it
run: |
mkdir build
- cd build
- cmake -DCGAL_DIR=c:/vcpkg/CGAL-5.2.1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DGMP_INCLUDE_DIR=c:/vcpkg/installed/x64-windows/include -DGMP_LIBRARIES=c:/vcpkg/installed/x64-windows/bin/mpir.dll ..
- cd src/python
- cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll gudhi/
- cp c:/vcpkg/installed/x64-windows/bin/mpir.dll gudhi/
+ cd ".\build\"
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows ..
+ Get-Location
+ dir
+ cd ".\src\python\"
+ cp "C:\vcpkg\installed\x64-windows\bin\mpfr-6.dll" ".\gudhi\"
+ cp "C:\vcpkg\installed\x64-windows\bin\gmp.dll" ".\gudhi\"
python setup.py bdist_wheel
ls dist
- - name: Install and test python wheel
- run: |
- cd ${{ github.workspace }}
- cd build/src/python/dist/
+ cd ".\dist\"
Get-ChildItem *.whl | ForEach-Object{python -m pip install --user $_.Name}
- cd ${{ github.workspace }}
+ - name: Test python wheel
+ run: |
+ Get-Location
+ dir
python -m pip install --user pytest
- python -m pytest src/python/test/test_alpha_complex.py
+ python -c "import gudhi; print(gudhi.__version__)"
+ python -m pytest ".\src\python\test\test_alpha_complex.py"
diff --git a/.github/workflows/pip-packaging-linux.yml b/.github/workflows/pip-packaging-linux.yml
index 6ce0ba89..98173ed3 100644
--- a/.github/workflows/pip-packaging-linux.yml
+++ b/.github/workflows/pip-packaging-linux.yml
@@ -25,6 +25,7 @@ jobs:
- 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: |
@@ -37,6 +38,7 @@ jobs:
- 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: |
@@ -49,6 +51,7 @@ jobs:
- 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: |
@@ -61,6 +64,7 @@ jobs:
- 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: |
@@ -73,6 +77,7 @@ jobs:
- 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: Publish on PyPi
env:
diff --git a/.github/workflows/pip-packaging-osx.yml b/.github/workflows/pip-packaging-osx.yml
index 120c15b6..7417300a 100644
--- a/.github/workflows/pip-packaging-osx.yml
+++ b/.github/workflows/pip-packaging-osx.yml
@@ -10,7 +10,7 @@ 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']
name: Build wheels for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
@@ -37,6 +37,7 @@ jobs:
- 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:
diff --git a/.github/workflows/pip-packaging-windows.yml b/.github/workflows/pip-packaging-windows.yml
index f387c5ff..962ae68a 100644
--- a/.github/workflows/pip-packaging-windows.yml
+++ b/.github/workflows/pip-packaging-windows.yml
@@ -10,7 +10,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']
+ python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
name: Build wheels for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
@@ -22,40 +22,32 @@ jobs:
architecture: x64
- name: Install dependencies
run: |
- cd c:/vcpkg
- git fetch --all --tags
- git checkout 2020.11-1
- bootstrap-vcpkg.bat
set VCPKG_BUILD_TYPE=release
- vcpkg install eigen3 mpfr boost-accumulators boost-algorithm boost-bimap boost-callable-traits boost-concept-check boost-container boost-core boost-detail boost-filesystem boost-functional boost-fusion boost-geometry boost-graph boost-heap boost-intrusive boost-iostreams boost-iterator boost-lambda boost-logic boost-math boost-mpl boost-multi-index boost-multiprecision boost-numeric-conversion boost-optional boost-parameter boost-pool boost-preprocessor boost-property-map boost-property-tree boost-ptr-container boost-random boost-range boost-serialization boost-spirit boost-thread boost-tuple boost-type-traits boost-units boost-utility boost-variant --triplet x64-windows
+ vcpkg install eigen3 cgal --triplet x64-windows
vcpkg version
- ls C:/vcpkg/installed/x64-windows/bin
- Invoke-WebRequest https://github.com/CGAL/cgal/releases/download/v5.2.1/CGAL-5.2.1.zip -OutFile CGAL-5.2.1.zip
- Expand-Archive -Path CGAL-5.2.1.zip -DestinationPath .
- cd CGAL-5.2.1
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DGMP_INCLUDE_DIR=c:/vcpkg/installed/x64-windows/include -DGMP_LIBRARIES=c:/vcpkg/installed/x64-windows/bin/mpir.dll .
- cd ${{ github.workspace }}
- python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt
+ ls "C:\vcpkg\installed\x64-windows\bin\"
+ python -m pip install --user -r .\ext\gudhi-deploy\build-requirements.txt
python -m pip install --user twine
python -m pip list
- - name: Build python wheel
+ - name: Build python wheel and install it
run: |
mkdir build
- cd build
- cmake -DCGAL_DIR=c:/vcpkg/CGAL-5.2.1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DGMP_INCLUDE_DIR=c:/vcpkg/installed/x64-windows/include -DGMP_LIBRARIES=c:/vcpkg/installed/x64-windows/bin/mpir.dll ..
- cd src/python
- cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll gudhi/
- cp c:/vcpkg/installed/x64-windows/bin/mpir.dll gudhi/
+ cd ".\build\"
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows ..
+ Get-Location
+ dir
+ cd ".\src\python\"
+ cp "C:\vcpkg\installed\x64-windows\bin\mpfr-6.dll" ".\gudhi\"
+ cp "C:\vcpkg\installed\x64-windows\bin\gmp.dll" ".\gudhi\"
python setup.py bdist_wheel
ls dist
- - name: Install and test python wheel
- run: |
- cd ${{ github.workspace }}
- cd build/src/python/dist/
+ cd ".\dist\"
Get-ChildItem *.whl | ForEach-Object{python -m pip install --user $_.Name}
- cd ${{ github.workspace }}
+ - name: Test python wheel
+ run: |
python -m pip install --user pytest
- python -m pytest src/python/test/test_alpha_complex.py
+ 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__
diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt
index db9b243b..b7f93799 100644
--- a/CMakeGUDHIVersion.txt
+++ b/CMakeGUDHIVersion.txt
@@ -1,8 +1,8 @@
# Must be conform to pep440 - https://www.python.org/dev/peps/pep-0440/#pre-releases
set (GUDHI_MAJOR_VERSION 3)
-set (GUDHI_MINOR_VERSION 5)
+set (GUDHI_MINOR_VERSION 6)
# GUDHI_PATCH_VERSION can be 'ZaN' for Alpha release, 'ZbN' for Beta release, 'ZrcN' for release candidate or 'Z' for a final release.
-set (GUDHI_PATCH_VERSION 0rc1)
+set (GUDHI_PATCH_VERSION 0a0)
set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION})
message(STATUS "GUDHI version : ${GUDHI_VERSION}")
diff --git a/ext/gudhi-deploy b/ext/gudhi-deploy
-Subproject 975d1bffb317f3b84bf1a3d576cdfdbf7b45861
+Subproject 290ade1086bedbc96a35df886cadecabbf4072e
diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
index e489e8a4..2e4adce4 100644
--- a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
+++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
@@ -49,7 +49,7 @@ class Minimal_enclosing_ball_radius {
point_cloud.push_back(p1);
point_cloud.push_back(p2);
- GUDHI_CHECK((p1.end() - p1.begin()) != (p2.end() - p2.begin()), "inconsistent point dimensions");
+ GUDHI_CHECK((p1.end() - p1.begin()) == (p2.end() - p2.begin()), "inconsistent point dimensions");
Min_sphere min_sphere(p1.end() - p1.begin(), point_cloud.begin(), point_cloud.end());
return std::sqrt(min_sphere.squared_radius());
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h
index 8ec89e41..f442b632 100644
--- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h
+++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h
@@ -34,8 +34,6 @@ class Field_Zp {
}
void init(int charac) {
- assert(charac > 0); // division by zero + non negative values
-
Prime = charac;
// Check that the provided prime is less than the maximum allowed as int, calculation below, and 'plus_times_equal' function : 46337 ; i.e (max_prime-1)*max_prime <= INT_MAX
diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h
index 653a63fd..0fd56c67 100644
--- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h
+++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker.h
@@ -52,8 +52,7 @@ when \f$ \tau \neq \sigma\f$ we say that \f$ \tau\f$ is a proper-face of \f$ \si
An abstract simplicial complex is a set of simplices that contains all the faces of its simplices.
The 1-skeleton of a simplicial complex (or its graph) consists of its elements of dimension lower than 2.
- *\image html "ds_representation.png" "Skeleton-blocker representation" width=20cm
-
+\image html "ds_representation.png" "Skeleton-blocker representation"
To encode, a simplicial complex, one can encodes all its simplices.
In case when this number gets too large,
@@ -73,11 +72,7 @@ For instance, the numbers of blockers is depicted for random 3-dimensional spher
in next figure. Storing the graph and blockers of such simplicial complexes is much compact in this case than storing
their simplices.
-
- *\image html "blockers_curve.png" "Number of blockers of random triangulations of 3-spheres" width=10cm
-
-
-
+\image html "blockers_curve.png" "Number of blockers of random triangulations of 3-spheres"
\section API
diff --git a/src/Toplex_map/benchmark/CMakeLists.txt b/src/Toplex_map/benchmark/CMakeLists.txt
index 2d58a156..6703d9d0 100644
--- a/src/Toplex_map/benchmark/CMakeLists.txt
+++ b/src/Toplex_map/benchmark/CMakeLists.txt
@@ -1,3 +1,7 @@
project(Toplex_map_benchmark)
add_executable(Toplex_map_benchmark benchmark_tm.cpp)
+
+if (TBB_FOUND)
+ target_link_libraries(Toplex_map_benchmark ${TBB_LIBRARIES})
+endif()
diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake
index deaea588..706dea58 100644
--- a/src/cmake/modules/GUDHI_third_party_libraries.cmake
+++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake
@@ -10,7 +10,6 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
message(STATUS "boost include dirs:" ${Boost_INCLUDE_DIRS})
message(STATUS "boost library dirs:" ${Boost_LIBRARY_DIRS})
-
find_package(GMP)
if(GMP_FOUND)
INCLUDE_DIRECTORIES(${GMP_INCLUDE_DIR})
diff --git a/src/common/benchmark/CMakeLists.txt b/src/common/benchmark/CMakeLists.txt
index a3787d6e..26e4e6af 100644
--- a/src/common/benchmark/CMakeLists.txt
+++ b/src/common/benchmark/CMakeLists.txt
@@ -1,3 +1,7 @@
project(common_benchmark)
add_executable(Graph_simplicial_complex_benchmark Graph_simplicial_complex_benchmark.cpp)
+
+if (TBB_FOUND)
+ target_link_libraries(Graph_simplicial_complex_benchmark ${TBB_LIBRARIES})
+endif()
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
index 12534b86..26a4e4b6 100644
--- a/src/python/CMakeLists.txt
+++ b/src/python/CMakeLists.txt
@@ -14,13 +14,16 @@ function( add_GUDHI_PYTHON_lib THE_LIB )
endif(EXISTS ${THE_LIB})
endfunction( add_GUDHI_PYTHON_lib )
-function( add_GUDHI_PYTHON_lib_dir THE_LIB_DIR )
- # deals when it is not set - error on windows
- if(EXISTS ${THE_LIB_DIR})
- set(GUDHI_PYTHON_LIBRARY_DIRS "${GUDHI_PYTHON_LIBRARY_DIRS}'${THE_LIB_DIR}', " PARENT_SCOPE)
- else()
- message("add_GUDHI_PYTHON_lib_dir - '${THE_LIB_DIR}' does not exist")
- endif()
+function( add_GUDHI_PYTHON_lib_dir)
+ # Argument may be a list (specifically on windows with release/debug paths)
+ foreach(THE_LIB_DIR IN LISTS ARGN)
+ # deals when it is not set - error on windows
+ if(EXISTS ${THE_LIB_DIR})
+ set(GUDHI_PYTHON_LIBRARY_DIRS "${GUDHI_PYTHON_LIBRARY_DIRS}'${THE_LIB_DIR}', " PARENT_SCOPE)
+ else()
+ message("add_GUDHI_PYTHON_lib_dir - '${THE_LIB_DIR}' does not exist")
+ endif()
+ endforeach()
endfunction( add_GUDHI_PYTHON_lib_dir )
# THE_TEST is the python test file name (without .py extension) containing tests functions
@@ -177,6 +180,10 @@ if(PYTHONINTERP_FOUND)
add_gudhi_debug_info("Boost version ${Boost_VERSION}")
if(CGAL_FOUND)
+ if(NOT CGAL_VERSION VERSION_LESS 5.3.0)
+ # CGAL_HEADER_ONLY has been dropped for CGAL >= 5.3. Only the header-only version is supported.
+ set(CGAL_HEADER_ONLY True)
+ endif(NOT CGAL_VERSION VERSION_LESS 5.3.0)
# Add CGAL compilation args
if(CGAL_HEADER_ONLY)
add_gudhi_debug_info("CGAL header only version ${CGAL_VERSION}")
@@ -184,7 +191,7 @@ if(PYTHONINTERP_FOUND)
else(CGAL_HEADER_ONLY)
add_gudhi_debug_info("CGAL version ${CGAL_VERSION}")
add_GUDHI_PYTHON_lib("${CGAL_LIBRARY}")
- add_GUDHI_PYTHON_lib_dir("${CGAL_LIBRARIES_DIR}")
+ add_GUDHI_PYTHON_lib_dir(${CGAL_LIBRARIES_DIR})
message("** Add CGAL ${CGAL_LIBRARIES_DIR}")
# If CGAL is not header only, CGAL library may link with boost system,
if(CMAKE_BUILD_TYPE MATCHES Debug)
@@ -192,7 +199,7 @@ if(PYTHONINTERP_FOUND)
else()
add_GUDHI_PYTHON_lib("${Boost_SYSTEM_LIBRARY_RELEASE}")
endif()
- add_GUDHI_PYTHON_lib_dir("${Boost_LIBRARY_DIRS}")
+ add_GUDHI_PYTHON_lib_dir(${Boost_LIBRARY_DIRS})
message("** Add Boost ${Boost_LIBRARY_DIRS}")
endif(CGAL_HEADER_ONLY)
# GMP and GMPXX are not required, but if present, CGAL will link with them.
@@ -204,13 +211,13 @@ if(PYTHONINTERP_FOUND)
get_filename_component(GMP_LIBRARIES_DIR ${GMP_LIBRARIES} PATH)
message("GMP_LIBRARIES_DIR from GMP_LIBRARIES set to ${GMP_LIBRARIES_DIR}")
endif(NOT GMP_LIBRARIES_DIR)
- add_GUDHI_PYTHON_lib_dir("${GMP_LIBRARIES_DIR}")
+ add_GUDHI_PYTHON_lib_dir(${GMP_LIBRARIES_DIR})
message("** Add gmp ${GMP_LIBRARIES_DIR}")
if(GMPXX_FOUND)
add_gudhi_debug_info("GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}")
set(GUDHI_PYTHON_EXTRA_COMPILE_ARGS "${GUDHI_PYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_USE_GMPXX', ")
add_GUDHI_PYTHON_lib("${GMPXX_LIBRARIES}")
- add_GUDHI_PYTHON_lib_dir("${GMPXX_LIBRARIES_DIR}")
+ add_GUDHI_PYTHON_lib_dir(${GMPXX_LIBRARIES_DIR})
message("** Add gmpxx ${GMPXX_LIBRARIES_DIR}")
endif(GMPXX_FOUND)
endif(GMP_FOUND)
@@ -223,7 +230,7 @@ if(PYTHONINTERP_FOUND)
get_filename_component(MPFR_LIBRARIES_DIR ${MPFR_LIBRARIES} PATH)
message("MPFR_LIBRARIES_DIR from MPFR_LIBRARIES set to ${MPFR_LIBRARIES_DIR}")
endif(NOT MPFR_LIBRARIES_DIR)
- add_GUDHI_PYTHON_lib_dir("${MPFR_LIBRARIES_DIR}")
+ add_GUDHI_PYTHON_lib_dir(${MPFR_LIBRARIES_DIR})
message("** Add mpfr ${MPFR_LIBRARIES_DIR}")
endif(MPFR_FOUND)
endif(CGAL_FOUND)
@@ -244,14 +251,14 @@ if(PYTHONINTERP_FOUND)
if (TBB_FOUND AND WITH_GUDHI_USE_TBB)
add_gudhi_debug_info("TBB version ${TBB_INTERFACE_VERSION} found and used")
set(GUDHI_PYTHON_EXTRA_COMPILE_ARGS "${GUDHI_PYTHON_EXTRA_COMPILE_ARGS}'-DGUDHI_USE_TBB', ")
- if(CMAKE_BUILD_TYPE MATCHES Debug)
+ if((CMAKE_BUILD_TYPE MATCHES Debug) AND TBB_DEBUG_LIBRARY)
add_GUDHI_PYTHON_lib("${TBB_DEBUG_LIBRARY}")
add_GUDHI_PYTHON_lib("${TBB_MALLOC_DEBUG_LIBRARY}")
else()
add_GUDHI_PYTHON_lib("${TBB_RELEASE_LIBRARY}")
add_GUDHI_PYTHON_lib("${TBB_MALLOC_RELEASE_LIBRARY}")
endif()
- add_GUDHI_PYTHON_lib_dir("${TBB_LIBRARY_DIRS}")
+ add_GUDHI_PYTHON_lib_dir(${TBB_LIBRARY_DIRS})
message("** Add tbb ${TBB_LIBRARY_DIRS}")
set(GUDHI_PYTHON_INCLUDE_DIRS "${GUDHI_PYTHON_INCLUDE_DIRS}'${TBB_INCLUDE_DIRS}', ")
endif()
@@ -291,7 +298,12 @@ if(PYTHONINTERP_FOUND)
add_custom_target(python ALL DEPENDS gudhi.so
COMMENT "Do not forget to add ${CMAKE_CURRENT_BINARY_DIR}/ to your PYTHONPATH before using examples or tests")
- set(GUDHI_PYTHON_PATH_ENV "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:$ENV{PYTHONPATH}")
+ # Path separator management for windows
+ if (WIN32)
+ set(GUDHI_PYTHON_PATH_ENV "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR};$ENV{PYTHONPATH}")
+ else(WIN32)
+ set(GUDHI_PYTHON_PATH_ENV "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:$ENV{PYTHONPATH}")
+ endif(WIN32)
# Documentation generation is available through sphinx - requires all modules
# Make it first as sphinx test is by far the longest test which is nice when testing in parallel
if(SPHINX_PATH)
diff --git a/src/python/doc/datasets_generators.rst b/src/python/doc/datasets_generators.rst
index 6f36bce1..260c3882 100644
--- a/src/python/doc/datasets_generators.rst
+++ b/src/python/doc/datasets_generators.rst
@@ -42,7 +42,7 @@ Example
.. autofunction:: gudhi.datasets.generators.points.sphere
Points on a flat torus
-^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^
You can also generate points on a torus.
diff --git a/src/python/gudhi/datasets/generators/_points.cc b/src/python/gudhi/datasets/generators/_points.cc
index 70ce4925..82fea25b 100644
--- a/src/python/gudhi/datasets/generators/_points.cc
+++ b/src/python/gudhi/datasets/generators/_points.cc
@@ -96,7 +96,6 @@ PYBIND11_MODULE(_points, m) {
:type radius: float
:param sample: The sample type. Default and only available value is `"random"`.
:type sample: string
- :rtype: numpy array of float
:returns: the generated points on a sphere.
)pbdoc");
@@ -111,10 +110,12 @@ PYBIND11_MODULE(_points, m) {
:type dim: integer
:param sample: The sample type. Available values are: `"random"` and `"grid"`. Default value is `"random"`.
:type sample: string
- :rtype: numpy array of float.
- The shape of returned numpy array is :
- if sample is 'random' : (n_samples, 2*dim).
- if sample is 'grid' : (⌊n_samples**(1./dim)⌋**dim, 2*dim), where shape[0] is rounded down to the closest perfect 'dim'th power.
:returns: the generated points on a torus.
+
+ The shape of returned numpy array is:
+
+ If sample is 'random': (n_samples, 2*dim).
+
+ If sample is 'grid': (⌊n_samples**(1./dim)⌋**dim, 2*dim), where shape[0] is rounded down to the closest perfect 'dim'th power.
)pbdoc");
}
diff --git a/src/python/gudhi/datasets/generators/points.py b/src/python/gudhi/datasets/generators/points.py
index cf97777d..9bb2799d 100644
--- a/src/python/gudhi/datasets/generators/points.py
+++ b/src/python/gudhi/datasets/generators/points.py
@@ -19,15 +19,15 @@ def _generate_random_points_on_torus(n_samples, dim):
# Based on angles, construct points of size n_samples*dim on a circle and reshape the result in a n_samples*2*dim array
array_points = np.column_stack([np.cos(alpha), np.sin(alpha)]).reshape(-1, 2*dim)
-
+
return array_points
def _generate_grid_points_on_torus(n_samples, dim):
-
+
# Generate points on a dim-torus as a grid
n_samples_grid = int((n_samples+.5)**(1./dim)) # add .5 to avoid rounding down with numerical approximations
alpha = np.linspace(0, 2*np.pi, n_samples_grid, endpoint=False)
-
+
array_points = np.column_stack([np.cos(alpha), np.sin(alpha)])
array_points_idx = np.empty([n_samples_grid]*dim + [dim], dtype=int)
for i, x in enumerate(np.ix_(*([np.arange(n_samples_grid)]*dim))):
@@ -35,16 +35,19 @@ def _generate_grid_points_on_torus(n_samples, dim):
return array_points[array_points_idx].reshape(-1, 2*dim)
def torus(n_samples, dim, sample='random'):
- """
+ """
Generate points on a flat dim-torus in R^2dim either randomly or on a grid
-
+
:param n_samples: The number of points to be generated.
:param dim: The dimension of the torus on which points would be generated in R^2*dim.
:param sample: The sample type of the generated points. Can be 'random' or 'grid'.
:returns: numpy array containing the generated points on a torus.
- The shape of returned numpy array is:
- if sample is 'random' : (n_samples, 2*dim).
- if sample is 'grid' : (⌊n_samples**(1./dim)⌋**dim, 2*dim), where shape[0] is rounded down to the closest perfect 'dim'th power.
+
+ The shape of returned numpy array is:
+
+ If sample is 'random': (n_samples, 2*dim).
+
+ If sample is 'grid': (⌊n_samples**(1./dim)⌋**dim, 2*dim), where shape[0] is rounded down to the closest perfect 'dim'th power.
"""
if sample == 'random':
# Generate points randomly