HiPOP 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. hipop-1.1.0/.github/workflows/ci.yaml +75 -0
  2. hipop-1.1.0/.github/workflows/deploy.yaml +105 -0
  3. hipop-1.1.0/.gitignore +34 -0
  4. hipop-1.1.0/CMakeLists.txt +52 -0
  5. hipop-1.1.0/LICENSE +165 -0
  6. hipop-1.1.0/PKG-INFO +145 -0
  7. hipop-1.1.0/README.md +116 -0
  8. hipop-1.1.0/VERSION.txt +1 -0
  9. hipop-1.1.0/conda/env.yaml +20 -0
  10. hipop-1.1.0/cpp/CMakeLists.txt +86 -0
  11. hipop-1.1.0/cpp/cmake/HipopConfig.cmake.in +7 -0
  12. hipop-1.1.0/cpp/examples/CMakeLists.txt +2 -0
  13. hipop-1.1.0/cpp/examples/ParallelKShortestPath.cpp +73 -0
  14. hipop-1.1.0/cpp/include/hipop/create.h +11 -0
  15. hipop-1.1.0/cpp/include/hipop/graph.h +175 -0
  16. hipop-1.1.0/cpp/include/hipop/shortest_path.h +137 -0
  17. hipop-1.1.0/cpp/src/create.cpp +122 -0
  18. hipop-1.1.0/cpp/src/graph.cpp +292 -0
  19. hipop-1.1.0/cpp/src/shortest_path.cpp +1552 -0
  20. hipop-1.1.0/cpp/tests/CMakeLists.txt +22 -0
  21. hipop-1.1.0/cpp/tests/helpers.h +15 -0
  22. hipop-1.1.0/cpp/tests/testCopyGraph.cpp +37 -0
  23. hipop-1.1.0/cpp/tests/testDijkstra1.cpp +28 -0
  24. hipop-1.1.0/cpp/tests/testDijkstra2.cpp +28 -0
  25. hipop-1.1.0/cpp/tests/testGraph.cpp +37 -0
  26. hipop-1.1.0/cpp/tests/testGraphMerge.cpp +46 -0
  27. hipop-1.1.0/cpp/tests/testKShortestPath.cpp +41 -0
  28. hipop-1.1.0/cpp/tests/testManhattan.cpp +11 -0
  29. hipop-1.1.0/cpp/tests/testYenKShortestPath.cpp +43 -0
  30. hipop-1.1.0/cpp/tests/testparallelKShortestPath.cpp +42 -0
  31. hipop-1.1.0/pyproject.toml +131 -0
  32. hipop-1.1.0/pytest.toml +8 -0
  33. hipop-1.1.0/python/CMakeLists.txt +11 -0
  34. hipop-1.1.0/python/examples/UpdateCosts.py +80 -0
  35. hipop-1.1.0/python/examples/ksp.py +53 -0
  36. hipop-1.1.0/python/examples/merge.py +25 -0
  37. hipop-1.1.0/python/examples/test.py +28 -0
  38. hipop-1.1.0/python/hipop/__init__.py.template +1 -0
  39. hipop-1.1.0/python/hipop/cpp/graph.cpp +58 -0
  40. hipop-1.1.0/python/hipop/cpp/main.cpp +23 -0
  41. hipop-1.1.0/python/hipop/cpp/shortest_path.cpp +90 -0
  42. hipop-1.1.0/python/hipop/graph.py +66 -0
  43. hipop-1.1.0/python/hipop/render.py +28 -0
  44. hipop-1.1.0/python/hipop/shortest_path.py +1 -0
  45. hipop-1.1.0/python/tests/test_Graph.py +24 -0
  46. hipop-1.1.0/python/tests/test_VersionConsistency.py +13 -0
@@ -0,0 +1,75 @@
1
+ name: Continuous integration checks
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ workflow_dispatch: # Manual trigger
8
+
9
+ jobs:
10
+
11
+ build-and-test:
12
+ name: Build & test (py ${{ matrix.python-version }} on ${{ matrix.os }})
13
+ runs-on: ${{ matrix.os }}
14
+
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ os: # See https://docs.github.com/en/actions/reference/runners/github-hosted-runners
19
+ - ubuntu-latest # Arch: x64
20
+ - windows-latest # Arch: x64
21
+ - macos-latest # Arch: arm64
22
+ python-version:
23
+ - '3.10' # Oldest supported version (must be kept consistent with the classifiers in `pyproject.toml`).
24
+ - '3.14' # Most recent supported version (must be kept consistent with the classifiers in `pyproject.toml`).
25
+
26
+ steps:
27
+ - uses: actions/checkout@v7
28
+
29
+ - uses: actions/setup-python@v7
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+
33
+ - name: Install OpenMP (macOS only)
34
+ if: runner.os == 'macOS'
35
+ # AppleClang has no OpenMP by default, thus it must be installed separately.
36
+ # The environment variable OpenMP_ROOT is then exported for subsequent steps
37
+ # (CMake uses this variable as a search hint).
38
+ run: |
39
+ brew install libomp
40
+ echo "OpenMP_ROOT=$(brew --prefix libomp)" >> "$GITHUB_ENV"
41
+
42
+ - name: C++ core library - Configure
43
+ run: cmake -S . -B build-cpponly -G Ninja
44
+
45
+ - name: C++ core library - Build
46
+ run: cmake --build build-cpponly
47
+
48
+ - name: C++ core library - Run tests
49
+ run: ctest --test-dir build-cpponly --output-on-failure --no-tests=error
50
+
51
+ - name: Python wrapper - Build & install
52
+ run: pip install --group dev .
53
+
54
+ - name: Python wrapper - Run tests
55
+ run: pytest
56
+
57
+ # This final job acts as a gate to ensure all the previous jobs have succeeded.
58
+ # It is provided to be registered as a status check for pull requests.
59
+ ci-passed:
60
+ name: CI checks all OK
61
+ runs-on: ubuntu-slim
62
+ if: always()
63
+ needs:
64
+ - build-and-test
65
+
66
+ steps:
67
+ - name: Ensure all CI jobs passed
68
+ run: |
69
+ for result in ${{ join(needs.*.result, ' ') }}; do
70
+ if [[ "$result" != "success" ]]; then
71
+ echo "At least one CI job did not succeed."
72
+ exit 1
73
+ fi
74
+ done
75
+ echo "All CI jobs succeeded."
@@ -0,0 +1,105 @@
1
+ name: Deploy to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*' # Trigger on version tags like v1.2.3
7
+
8
+ jobs:
9
+
10
+ check-version:
11
+ name: Check git tag
12
+ runs-on: ubuntu-slim
13
+
14
+ steps:
15
+ - uses: actions/checkout@v7
16
+
17
+ - name: Ensure git tag corresponds to project version
18
+ run: |
19
+ project_version="v$(tr -d '[:space:]' < VERSION.txt)"
20
+ echo "Git tag = [$GITHUB_REF_NAME]"
21
+ echo "Project version = [$project_version]"
22
+ if [[ "$GITHUB_REF_NAME" != "$project_version" ]]; then
23
+ echo "Mismatch between git tag and project version (VERSION.txt), aborting deployment..."
24
+ exit 1
25
+ fi
26
+
27
+ build-wheels:
28
+ name: Build wheels (${{ matrix.os }})
29
+ runs-on: ${{ matrix.os }}
30
+ needs:
31
+ - check-version
32
+
33
+ strategy:
34
+ fail-fast: false
35
+ matrix:
36
+ os: # See https://docs.github.com/en/actions/reference/runners/github-hosted-runners
37
+ - ubuntu-latest # Arch: x64
38
+ - windows-latest # Arch: x64
39
+ - macos-14 # Arch: arm64
40
+ # Do not use the latest macOS runner to ensure backward compatibility.
41
+ # See comment on MACOSX_DEPLOYMENT_TARGET in pyproject.toml for more details.
42
+
43
+ steps:
44
+ - uses: actions/checkout@v7
45
+
46
+ - uses: actions/setup-python@v7
47
+ with:
48
+ python-version: '3.x' # The exact Python version is not important here.
49
+
50
+ - name: Build wheels
51
+ run: |
52
+ pip install --group distrib
53
+ python -m cibuildwheel
54
+
55
+ - uses: actions/upload-artifact@v7
56
+ with:
57
+ name: wheels-${{ matrix.os }}
58
+ path: ./wheelhouse/*.whl
59
+
60
+ build-sdist:
61
+ name: Build source distribution
62
+ runs-on: ubuntu-latest
63
+ needs:
64
+ - check-version
65
+
66
+ steps:
67
+ - uses: actions/checkout@v7
68
+
69
+ - uses: actions/setup-python@v7
70
+ with:
71
+ python-version: '3.x' # The exact Python version is not important here.
72
+
73
+ - name: Build sdist
74
+ run: |
75
+ pip install --group distrib
76
+ python -m build --sdist
77
+
78
+ - uses: actions/upload-artifact@v7
79
+ with:
80
+ name: sdist
81
+ path: ./dist/*.tar.gz
82
+
83
+ publish:
84
+ name: Publish to PyPI
85
+ runs-on: ubuntu-latest
86
+ needs:
87
+ - check-version
88
+ - build-wheels
89
+ - build-sdist
90
+
91
+ environment:
92
+ name: pypi-env
93
+ url: https://pypi.org/project/HiPOP/
94
+
95
+ permissions:
96
+ id-token: write # Required for authentication through OIDC.
97
+
98
+ steps:
99
+ - uses: actions/download-artifact@v8
100
+ with:
101
+ path: dist
102
+ merge-multiple: true
103
+
104
+ - name: Publish package distributions to PyPI
105
+ uses: pypa/gh-action-pypi-publish@release/v1
hipop-1.1.0/.gitignore ADDED
@@ -0,0 +1,34 @@
1
+ # Keep the following list of files/directories to exclude from version control as small as possible.
2
+ # Only patterns relevant for the current project should appear in this list.
3
+
4
+ # Python bytecode directories
5
+ __pycache__/
6
+
7
+ # Temporary/cache directories created by miscellaneous development tools
8
+ /.pytest_cache/
9
+
10
+ # Output directories for Python distribution files (wheels & source distributions)
11
+ /dist/
12
+ /wheelhouse/
13
+
14
+ # Python virtual environments (usual names), expected only in the root directory
15
+ /env/
16
+ /venv/
17
+ /.env/
18
+ /.venv/
19
+ /env[_\-]*/
20
+ /venv[_\-]*/
21
+ /.env[_\-]*/
22
+ /.venv[_\-]*/
23
+
24
+ # CMake build directories (usual names), expected only in the root directory
25
+ /build/
26
+ /build[_\-]*/
27
+
28
+ # MacOS files
29
+ .DS_Store
30
+
31
+ # IDE files
32
+ .vscode
33
+ .idea
34
+ .ipynb_checkpoints
@@ -0,0 +1,52 @@
1
+ cmake_minimum_required(VERSION 3.19)
2
+
3
+ file(STRINGS VERSION.txt HIPOP_VERSION)
4
+ project(HiPOP
5
+ VERSION "${HIPOP_VERSION}"
6
+ DESCRIPTION "High Performance Optimal Path module"
7
+ HOMEPAGE_URL "https://github.com/EMob-Lab/HiPOP"
8
+ LANGUAGES CXX
9
+ )
10
+
11
+ option(HIPOP_WITH_PYTHON "Compile Python wrapper" OFF) # Disabled by default, so that pybind11 is not required then.
12
+ option(HIPOP_WITH_TESTS "Compile HiPOP tests (for core library)" ON)
13
+ option(HIPOP_WITH_EXAMPLES "Compile HiPOP examples (for core library)" ON)
14
+
15
+ # Default build configuration.
16
+ # Can be overriden with `-DCMAKE_BUILD_TYPE=<Debug|RelWithDebInfo|Release|...>` when calling CMake,
17
+ # or by using an environment variable `export CMAKE_BUILD_TYPE=...`.
18
+ if(NOT CMAKE_BUILD_TYPE)
19
+ set(CMAKE_BUILD_TYPE Release)
20
+ endif()
21
+ message(STATUS "CMAKE_BUILD_TYPE set to [${CMAKE_BUILD_TYPE}]")
22
+
23
+ # Default C++ standard for all the targets in the project.
24
+ # Can be overriden with `-DCMAKE_CXX_STANDARD=...` when calling CMake (but should be at least the default value).
25
+ if(NOT CMAKE_CXX_STANDARD)
26
+ set(CMAKE_CXX_STANDARD 17)
27
+ endif()
28
+ message(STATUS "CMAKE_CXX_STANDARD set to [${CMAKE_CXX_STANDARD}]")
29
+
30
+ # 3rd-party dependencies.
31
+ find_package(OpenMP REQUIRED)
32
+ if(HIPOP_WITH_PYTHON)
33
+ set(PYBIND11_FINDPYTHON ON) # See: https://pybind11.readthedocs.io/en/stable/cmake/#modes
34
+ find_package(pybind11 REQUIRED)
35
+ endif()
36
+
37
+ # Enable CTest and related testing features if requested
38
+ # (must be done before adding the subdirectories).
39
+ if(HIPOP_WITH_TESTS)
40
+ enable_testing()
41
+ endif()
42
+
43
+ # `cpp` subdirectory -> C++ library with related tests and examples, excluding the Python wrapper.
44
+ message(STATUS "Building HiPOP core library")
45
+ add_subdirectory(cpp)
46
+
47
+ # `python` subdirectory -> Python wrapper (the tests and examples specific to the Python wrapper
48
+ # are pure Python scripts, thus no compilation is needed for them).
49
+ if(HIPOP_WITH_PYTHON)
50
+ message(STATUS "Building HiPOP Python wrapper")
51
+ add_subdirectory(python)
52
+ endif()
hipop-1.1.0/LICENSE ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
hipop-1.1.0/PKG-INFO ADDED
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.4
2
+ Name: HiPOP
3
+ Version: 1.1.0
4
+ Summary: High Performance Optimal Path module
5
+ Keywords: graph,graph-theory,shortest-path,dijkstra
6
+ Maintainer-Email: Cécile Becarie <cecile.becarie@univ-eiffel.fr>
7
+ License-Expression: LGPL-3.0-only
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Programming Language :: C++
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Scientific/Engineering
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Project-URL: Repository, https://github.com/EMob-Lab/HiPOP
26
+ Project-URL: Issues, https://github.com/EMob-Lab/HiPOP/issues
27
+ Requires-Python: >=3.10
28
+ Description-Content-Type: text/markdown
29
+
30
+ # HiPOP
31
+
32
+ High Performance Optimal Path module
33
+
34
+
35
+ ## Description
36
+
37
+ HiPOP is the C++ graph library used by [MnMS](https://github.com/EMob-Lab/MnMS.git).
38
+ It is composed of:
39
+ - a C++ core library implementing a graph data-structure and several shortest path search algorithms,
40
+ - a Python wrapper exposing the C++ classes and functions to the Python world.
41
+
42
+
43
+ ## Install HiPOP
44
+
45
+ ### Install prebuilt distribution
46
+
47
+ This is the recommended (and most simple!) method to install HiPOP:
48
+ a prebuilt distribution adapted to your Python version and OS / system architecture
49
+ is downloaded from [PyPI](https://pypi.org/project/HiPOP/).
50
+
51
+ ```shell
52
+ pip install hipop
53
+ ```
54
+
55
+ This installation method requires your OS / system architecture to be one of these:
56
+ - Windows on x86_64 architecture (i.e. Intel/AMD CPU)
57
+ - Linux on x86_64 architecture (i.e. Intel/AMD CPU)
58
+ - MacOS (≥ 14 Sonoma) on ARM64 architecture (i.e. Apple M* CPU)
59
+
60
+ The exact list of prebuilt distributions is available on https://pypi.org/project/HiPOP/#files.
61
+ If none of them matches your environment, please contact the package maintainers,
62
+ or try the local build installation method.
63
+
64
+
65
+ ### Install from local build
66
+
67
+ This method requires the following components to be available on your system:
68
+
69
+ - C++ compiler that supports C++17 and [OpenMP](https://www.openmp.org/)
70
+ - [CMake](https://cmake.org/)
71
+
72
+ Then, here is the local build install procedure:
73
+
74
+ 1. Download the latest HiPOP sources from https://github.com/EMob-Lab/HiPOP/archive/refs/heads/main.zip
75
+ or by cloning the git repository:
76
+ ```shell
77
+ git clone https://github.com/EMob-Lab/HiPOP.git
78
+ ```
79
+
80
+ 2. From the root directory of the HiPOP sources:
81
+ ```shell
82
+ pip install .
83
+
84
+ # Optionally, to run the tests:
85
+ pip install --group dev
86
+ pytest
87
+ ```
88
+
89
+ Remarks:
90
+
91
+ - The `--group <group-name>` option requires pip ≥ 25.1. If you have an older version,
92
+ the install command above will fail with an error message such as `no such option: --group`.
93
+ In this case, try to upgrade pip beforehand with:
94
+ ```shell
95
+ pip install --upgrade pip
96
+ ```
97
+ Alternatively, install the test runner `pytest` manually (or skip the optional test running step).
98
+
99
+ - Editable install mode can be used. The install command then becomes:
100
+ ```shell
101
+ pip install --group dev --editable .
102
+ ```
103
+ Please note that using the `--group dev` option (or equivalent, to install the dev dependencies)
104
+ is mandatory for HiPOP editable installs.
105
+
106
+ - If you don't have the prerequisite C++/OpenMP/CMake components available on your system,
107
+ but you have [Conda](https://docs.conda.io/) available, a Conda environment with these components
108
+ is provided with the HiPOP sources. Install and activate it with:
109
+ ```shell
110
+ conda create -f conda/env.yaml
111
+ conda activate hipop-dev
112
+ ```
113
+ Please note that the use of this Conda environment is optional. HiPOP can be used with regular
114
+ (non-Conda) set-ups.
115
+
116
+ - If you are using MacOS and the Apple Clang C++ compiler, please note that OpenMP
117
+ may not be available by default. You may install it with:
118
+ ```shell
119
+ brew install libomp
120
+ OpenMP_ROOT=$(brew --prefix libomp)
121
+ ```
122
+ Alternatively, you may also use the Conda environment provided with the HiPOP sources
123
+ (cf. previous remark).
124
+
125
+
126
+ ### Install the C++ core library only (from local build)
127
+
128
+ This installation procedure allows you to build locally and install only the HiPOP C++ core library.
129
+ The Python wrapper is neither built nor installed here.
130
+ This procedure is intended for advanced users.
131
+
132
+ For this procedure, same requirements as mentioned in the previous section
133
+ in terms of C++/OpenMP/CMake components.
134
+ However, you don't need to have Python installed on your system.
135
+
136
+ Then, from the root directory of the HiPOP sources:
137
+ ```shell
138
+ mkdir build
139
+ cd build
140
+ cmake .. -DCMAKE_INSTALL_PREFIX=<install-directory>
141
+ make
142
+ make test # Optionally, to run the tests
143
+ make install
144
+ ```
145
+ ... where `<install-directory>` is the path to the location where you want to install HiPOP.
hipop-1.1.0/README.md ADDED
@@ -0,0 +1,116 @@
1
+ # HiPOP
2
+
3
+ High Performance Optimal Path module
4
+
5
+
6
+ ## Description
7
+
8
+ HiPOP is the C++ graph library used by [MnMS](https://github.com/EMob-Lab/MnMS.git).
9
+ It is composed of:
10
+ - a C++ core library implementing a graph data-structure and several shortest path search algorithms,
11
+ - a Python wrapper exposing the C++ classes and functions to the Python world.
12
+
13
+
14
+ ## Install HiPOP
15
+
16
+ ### Install prebuilt distribution
17
+
18
+ This is the recommended (and most simple!) method to install HiPOP:
19
+ a prebuilt distribution adapted to your Python version and OS / system architecture
20
+ is downloaded from [PyPI](https://pypi.org/project/HiPOP/).
21
+
22
+ ```shell
23
+ pip install hipop
24
+ ```
25
+
26
+ This installation method requires your OS / system architecture to be one of these:
27
+ - Windows on x86_64 architecture (i.e. Intel/AMD CPU)
28
+ - Linux on x86_64 architecture (i.e. Intel/AMD CPU)
29
+ - MacOS (≥ 14 Sonoma) on ARM64 architecture (i.e. Apple M* CPU)
30
+
31
+ The exact list of prebuilt distributions is available on https://pypi.org/project/HiPOP/#files.
32
+ If none of them matches your environment, please contact the package maintainers,
33
+ or try the local build installation method.
34
+
35
+
36
+ ### Install from local build
37
+
38
+ This method requires the following components to be available on your system:
39
+
40
+ - C++ compiler that supports C++17 and [OpenMP](https://www.openmp.org/)
41
+ - [CMake](https://cmake.org/)
42
+
43
+ Then, here is the local build install procedure:
44
+
45
+ 1. Download the latest HiPOP sources from https://github.com/EMob-Lab/HiPOP/archive/refs/heads/main.zip
46
+ or by cloning the git repository:
47
+ ```shell
48
+ git clone https://github.com/EMob-Lab/HiPOP.git
49
+ ```
50
+
51
+ 2. From the root directory of the HiPOP sources:
52
+ ```shell
53
+ pip install .
54
+
55
+ # Optionally, to run the tests:
56
+ pip install --group dev
57
+ pytest
58
+ ```
59
+
60
+ Remarks:
61
+
62
+ - The `--group <group-name>` option requires pip ≥ 25.1. If you have an older version,
63
+ the install command above will fail with an error message such as `no such option: --group`.
64
+ In this case, try to upgrade pip beforehand with:
65
+ ```shell
66
+ pip install --upgrade pip
67
+ ```
68
+ Alternatively, install the test runner `pytest` manually (or skip the optional test running step).
69
+
70
+ - Editable install mode can be used. The install command then becomes:
71
+ ```shell
72
+ pip install --group dev --editable .
73
+ ```
74
+ Please note that using the `--group dev` option (or equivalent, to install the dev dependencies)
75
+ is mandatory for HiPOP editable installs.
76
+
77
+ - If you don't have the prerequisite C++/OpenMP/CMake components available on your system,
78
+ but you have [Conda](https://docs.conda.io/) available, a Conda environment with these components
79
+ is provided with the HiPOP sources. Install and activate it with:
80
+ ```shell
81
+ conda create -f conda/env.yaml
82
+ conda activate hipop-dev
83
+ ```
84
+ Please note that the use of this Conda environment is optional. HiPOP can be used with regular
85
+ (non-Conda) set-ups.
86
+
87
+ - If you are using MacOS and the Apple Clang C++ compiler, please note that OpenMP
88
+ may not be available by default. You may install it with:
89
+ ```shell
90
+ brew install libomp
91
+ OpenMP_ROOT=$(brew --prefix libomp)
92
+ ```
93
+ Alternatively, you may also use the Conda environment provided with the HiPOP sources
94
+ (cf. previous remark).
95
+
96
+
97
+ ### Install the C++ core library only (from local build)
98
+
99
+ This installation procedure allows you to build locally and install only the HiPOP C++ core library.
100
+ The Python wrapper is neither built nor installed here.
101
+ This procedure is intended for advanced users.
102
+
103
+ For this procedure, same requirements as mentioned in the previous section
104
+ in terms of C++/OpenMP/CMake components.
105
+ However, you don't need to have Python installed on your system.
106
+
107
+ Then, from the root directory of the HiPOP sources:
108
+ ```shell
109
+ mkdir build
110
+ cd build
111
+ cmake .. -DCMAKE_INSTALL_PREFIX=<install-directory>
112
+ make
113
+ make test # Optionally, to run the tests
114
+ make install
115
+ ```
116
+ ... where `<install-directory>` is the path to the location where you want to install HiPOP.
@@ -0,0 +1 @@
1
+ 1.1.0