grakelx 0.1.12__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.
- grakelx-0.1.12/LICENSE +32 -0
- grakelx-0.1.12/MANIFEST.in +32 -0
- grakelx-0.1.12/PKG-INFO +169 -0
- grakelx-0.1.12/README.md +111 -0
- grakelx-0.1.12/doc/.special.rst +42 -0
- grakelx-0.1.12/doc/Makefile +184 -0
- grakelx-0.1.12/doc/_static/css/supplementary.css +326 -0
- grakelx-0.1.12/doc/_static/kataoka1.png +0 -0
- grakelx-0.1.12/doc/_static/marion1.png +0 -0
- grakelx-0.1.12/doc/_static/marion2.png +0 -0
- grakelx-0.1.12/doc/_static/marion3.png +0 -0
- grakelx-0.1.12/doc/_static/marion4.png +0 -0
- grakelx-0.1.12/doc/_static/odd_sth_1.png +0 -0
- grakelx-0.1.12/doc/_static/odd_sth_2.png +0 -0
- grakelx-0.1.12/doc/_static/odd_sth_3.png +0 -0
- grakelx-0.1.12/doc/_static/odd_sth_4.png +0 -0
- grakelx-0.1.12/doc/_templates/class.rst +16 -0
- grakelx-0.1.12/doc/_templates/function.rst +13 -0
- grakelx-0.1.12/doc/_templates/function_bib.rst +18 -0
- grakelx-0.1.12/doc/_templates/kernel.rst +22 -0
- grakelx-0.1.12/doc/api.rst +14 -0
- grakelx-0.1.12/doc/benchmarks/benchmarks.bib +10 -0
- grakelx-0.1.12/doc/benchmarks/comparison.rst +72 -0
- grakelx-0.1.12/doc/benchmarks/evaluation.rst +122 -0
- grakelx-0.1.12/doc/benchmarks.rst +13 -0
- grakelx-0.1.12/doc/classes.rst +150 -0
- grakelx-0.1.12/doc/conf.py +368 -0
- grakelx-0.1.12/doc/datasets.rst +16 -0
- grakelx-0.1.12/doc/documentation/code_for_examples/vertex_kernel.py +132 -0
- grakelx-0.1.12/doc/documentation/code_for_examples/vertex_kernel_advanced.py +198 -0
- grakelx-0.1.12/doc/documentation/contributing.rst +42 -0
- grakelx-0.1.12/doc/documentation/core_concepts.rst +384 -0
- grakelx-0.1.12/doc/documentation/creating_kernels.rst +290 -0
- grakelx-0.1.12/doc/documentation/installation.rst +72 -0
- grakelx-0.1.12/doc/documentation/introduction.rst +411 -0
- grakelx-0.1.12/doc/documentation.rst +16 -0
- grakelx-0.1.12/doc/graph.rst +21 -0
- grakelx-0.1.12/doc/graph_kernel.rst +74 -0
- grakelx-0.1.12/doc/index.rst +90 -0
- grakelx-0.1.12/doc/kernels/core_framework.rst +74 -0
- grakelx-0.1.12/doc/kernels/edge_histogram.rst +27 -0
- grakelx-0.1.12/doc/kernels/graph_hopper.rst +71 -0
- grakelx-0.1.12/doc/kernels/graph_kernels.bib +392 -0
- grakelx-0.1.12/doc/kernels/graphlet_sampling.rst +51 -0
- grakelx-0.1.12/doc/kernels/hadamard_code.rst +55 -0
- grakelx-0.1.12/doc/kernels/kernel.rst +59 -0
- grakelx-0.1.12/doc/kernels/lovasz_theta.rst +71 -0
- grakelx-0.1.12/doc/kernels/multiscale_laplacian.rst +178 -0
- grakelx-0.1.12/doc/kernels/neighborhood_hash.rst +115 -0
- grakelx-0.1.12/doc/kernels/neighborhood_subgraph_pairwise_distance.rst +67 -0
- grakelx-0.1.12/doc/kernels/odd_sth.rst +100 -0
- grakelx-0.1.12/doc/kernels/propagation.rst +63 -0
- grakelx-0.1.12/doc/kernels/pyramid_match.rst +63 -0
- grakelx-0.1.12/doc/kernels/random_walk.rst +82 -0
- grakelx-0.1.12/doc/kernels/shortest_path.rst +67 -0
- grakelx-0.1.12/doc/kernels/subgraph_matching.rst +78 -0
- grakelx-0.1.12/doc/kernels/svm_theta.rst +83 -0
- grakelx-0.1.12/doc/kernels/vertex_histogram.rst +27 -0
- grakelx-0.1.12/doc/kernels/weisfeiler_lehman.rst +106 -0
- grakelx-0.1.12/doc/kernels/weisfeiler_lehman_optimal_assignment.rst +128 -0
- grakelx-0.1.12/doc/kernels.rst +13 -0
- grakelx-0.1.12/doc/make.bat +242 -0
- grakelx-0.1.12/doc/sphinxext/MANIFEST.in +2 -0
- grakelx-0.1.12/doc/sphinxext/github_link.py +81 -0
- grakelx-0.1.12/doc/sphinxext/sphinx_issues.py +109 -0
- grakelx-0.1.12/doc/sphinxext/xref.py +41 -0
- grakelx-0.1.12/doc/tutorials.rst +15 -0
- grakelx-0.1.12/examples/README.txt +6 -0
- grakelx-0.1.12/examples/document_retrieval_example.py +60 -0
- grakelx-0.1.12/examples/erdos_renyi.py +56 -0
- grakelx-0.1.12/examples/node_attributed_dataset.py +40 -0
- grakelx-0.1.12/examples/nx_to_grakel.py +65 -0
- grakelx-0.1.12/examples/optimizing_hyperparameters.py +37 -0
- grakelx-0.1.12/examples/plot_pipeline_example.py +37 -0
- grakelx-0.1.12/examples/shortest_path.py +40 -0
- grakelx-0.1.12/examples/weisfeiler_lehman_subtree.py +40 -0
- grakelx-0.1.12/grakelx/__init__.py +88 -0
- grakelx-0.1.12/grakelx/datasets/__init__.py +6 -0
- grakelx-0.1.12/grakelx/datasets/base.py +691 -0
- grakelx-0.1.12/grakelx/datasets/testing.py +293 -0
- grakelx-0.1.12/grakelx/graph.py +1726 -0
- grakelx-0.1.12/grakelx/graph_kernels.py +584 -0
- grakelx-0.1.12/grakelx/kernels/__init__.py +51 -0
- grakelx-0.1.12/grakelx/kernels/_c_functions/__init__.pyx +0 -0
- grakelx-0.1.12/grakelx/kernels/_c_functions/functions.pyx +279 -0
- grakelx-0.1.12/grakelx/kernels/_c_functions/header.pxd +6 -0
- grakelx-0.1.12/grakelx/kernels/_c_functions/include/functions.hpp +7 -0
- grakelx-0.1.12/grakelx/kernels/_c_functions/src/ArashPartov.cpp +20 -0
- grakelx-0.1.12/grakelx/kernels/_c_functions/src/sm_core.cpp +113 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/__init__.py +12 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/bignum.hh +93 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/bliss.cc +288 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/bliss_C.cc +169 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/bliss_C.h +192 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/defs.hh +96 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/graph.cc +4371 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/graph.hh +738 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/heap.cc +79 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/heap.hh +59 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/kqueue.hh +152 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/kstack.hh +129 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/orbit.cc +138 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/orbit.hh +97 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/partition.cc +1063 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/partition.hh +207 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/uintseqhash.cc +98 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/uintseqhash.hh +46 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/utils.cc +39 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss-0.50/utils.hh +32 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/bliss.pyx +363 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/intpyblissmodule_2.cc +333 -0
- grakelx-0.1.12/grakelx/kernels/_isomorphism/intpyblissmodule_3.cc +213 -0
- grakelx-0.1.12/grakelx/kernels/core_framework.py +557 -0
- grakelx-0.1.12/grakelx/kernels/edge_histogram.py +215 -0
- grakelx-0.1.12/grakelx/kernels/graph_hopper.py +571 -0
- grakelx-0.1.12/grakelx/kernels/graphlet_sampling.py +545 -0
- grakelx-0.1.12/grakelx/kernels/hadamard_code.py +407 -0
- grakelx-0.1.12/grakelx/kernels/kernel.py +410 -0
- grakelx-0.1.12/grakelx/kernels/lovasz_theta.py +511 -0
- grakelx-0.1.12/grakelx/kernels/multiscale_laplacian.py +346 -0
- grakelx-0.1.12/grakelx/kernels/neighborhood_hash.py +561 -0
- grakelx-0.1.12/grakelx/kernels/neighborhood_subgraph_pairwise_distance.py +436 -0
- grakelx-0.1.12/grakelx/kernels/odd_sth.py +628 -0
- grakelx-0.1.12/grakelx/kernels/propagation.py +787 -0
- grakelx-0.1.12/grakelx/kernels/pyramid_match.py +282 -0
- grakelx-0.1.12/grakelx/kernels/random_walk.py +498 -0
- grakelx-0.1.12/grakelx/kernels/shortest_path.py +497 -0
- grakelx-0.1.12/grakelx/kernels/subgraph_matching.py +250 -0
- grakelx-0.1.12/grakelx/kernels/svm_theta.py +249 -0
- grakelx-0.1.12/grakelx/kernels/vertex_histogram.py +222 -0
- grakelx-0.1.12/grakelx/kernels/weisfeiler_lehman.py +538 -0
- grakelx-0.1.12/grakelx/kernels/weisfeiler_lehman_optimal_assignment.py +488 -0
- grakelx-0.1.12/grakelx/tools.py +264 -0
- grakelx-0.1.12/grakelx/utils/__init__.py +727 -0
- grakelx-0.1.12/grakelx/utils/_misc.py +3 -0
- grakelx-0.1.12/grakelx/utils/converts.py +155 -0
- grakelx-0.1.12/grakelx.egg-info/PKG-INFO +169 -0
- grakelx-0.1.12/grakelx.egg-info/SOURCES.txt +173 -0
- grakelx-0.1.12/grakelx.egg-info/dependency_links.txt +1 -0
- grakelx-0.1.12/grakelx.egg-info/requires.txt +33 -0
- grakelx-0.1.12/grakelx.egg-info/top_level.txt +1 -0
- grakelx-0.1.12/pyproject.toml +100 -0
- grakelx-0.1.12/setup.cfg +4 -0
- grakelx-0.1.12/setup.py +81 -0
- grakelx-0.1.12/tests/data/Cuneiform/Cuneiform_A.txt +23922 -0
- grakelx-0.1.12/tests/data/Cuneiform/Cuneiform_edge_attributes.txt +23922 -0
- grakelx-0.1.12/tests/data/Cuneiform/Cuneiform_edge_labels.txt +23922 -0
- grakelx-0.1.12/tests/data/Cuneiform/Cuneiform_graph_indicator.txt +5680 -0
- grakelx-0.1.12/tests/data/Cuneiform/Cuneiform_graph_labels.txt +267 -0
- grakelx-0.1.12/tests/data/Cuneiform/Cuneiform_node_attributes.txt +5680 -0
- grakelx-0.1.12/tests/data/Cuneiform/Cuneiform_node_labels.txt +5680 -0
- grakelx-0.1.12/tests/data/Cuneiform/README.txt +119 -0
- grakelx-0.1.12/tests/data/MUTAG/MUTAG_A.txt +7442 -0
- grakelx-0.1.12/tests/data/MUTAG/MUTAG_edge_labels.txt +7442 -0
- grakelx-0.1.12/tests/data/MUTAG/MUTAG_graph_indicator.txt +3371 -0
- grakelx-0.1.12/tests/data/MUTAG/MUTAG_graph_labels.txt +188 -0
- grakelx-0.1.12/tests/data/MUTAG/MUTAG_node_labels.txt +3371 -0
- grakelx-0.1.12/tests/data/MUTAG/README.txt +85 -0
- grakelx-0.1.12/tests/test_Kernel.py +1068 -0
- grakelx-0.1.12/tests/test_common.py +557 -0
- grakelx-0.1.12/tests/test_graph.py +120 -0
- grakelx-0.1.12/tests/test_graph_kernels.py +347 -0
- grakelx-0.1.12/tests/test_kernels.py +443 -0
- grakelx-0.1.12/tests/test_utils.py +425 -0
- grakelx-0.1.12/tests/test_windows_sdp_issue.py +126 -0
grakelx-0.1.12/LICENSE
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
New BSD License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018- The grakel developers.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Redistribution and use in source and binary forms, with or without
|
|
8
|
+
modification, are permitted provided that the following conditions are met:
|
|
9
|
+
|
|
10
|
+
a. Redistributions of source code must retain the above copyright notice,
|
|
11
|
+
this list of conditions and the following disclaimer.
|
|
12
|
+
b. Redistributions in binary form must reproduce the above copyright
|
|
13
|
+
notice, this list of conditions and the following disclaimer in the
|
|
14
|
+
documentation and/or other materials provided with the distribution.
|
|
15
|
+
c. Neither the name of the Scikit-learn Developers nor the names of
|
|
16
|
+
its contributors may be used to endorse or promote products
|
|
17
|
+
derived from this software without specific prior written
|
|
18
|
+
permission.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
22
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
23
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
24
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
|
|
25
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
26
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
27
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
28
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
29
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
30
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
|
31
|
+
DAMAGE.
|
|
32
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
|
|
4
|
+
include grakelx/kernels/_c_functions/*.pxd
|
|
5
|
+
include grakelx/kernels/_c_functions/*.pyx
|
|
6
|
+
recursive-include grakelx/kernels/_c_functions/include *
|
|
7
|
+
recursive-include grakelx/kernels/_c_functions/src *
|
|
8
|
+
|
|
9
|
+
recursive-include grakelx/kernels/_isomorphism/bliss-0.50 *
|
|
10
|
+
include grakelx/kernels/_isomorphism/__init__.py
|
|
11
|
+
include grakelx/kernels/_isomorphism/bliss.pyx
|
|
12
|
+
include grakelx/kernels/_isomorphism/intpyblissmodule_2.cc
|
|
13
|
+
include grakelx/kernels/_isomorphism/intpyblissmodule_3.cc
|
|
14
|
+
include grakelx/kernels/_isomorphism/bliss.cpp
|
|
15
|
+
prune grakelx/kernels/_isomorphism/__pycache__
|
|
16
|
+
global-exclude *.so
|
|
17
|
+
global-exclude __pycache__
|
|
18
|
+
|
|
19
|
+
recursive-include tests/data/Cuneiform *
|
|
20
|
+
recursive-include tests/data/MUTAG *
|
|
21
|
+
|
|
22
|
+
include doc/*.rst
|
|
23
|
+
include doc/conf.py
|
|
24
|
+
include doc/Makefile
|
|
25
|
+
include doc/make.bat
|
|
26
|
+
recursive-include doc/documentation *
|
|
27
|
+
recursive-include doc/benchmarks *
|
|
28
|
+
recursive-include doc/_static *
|
|
29
|
+
recursive-include doc/_templates *
|
|
30
|
+
recursive-include doc/kernels *
|
|
31
|
+
recursive-include doc/sphinxext *
|
|
32
|
+
recursive-include examples *
|
grakelx-0.1.12/PKG-INFO
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: grakelx
|
|
3
|
+
Version: 0.1.12
|
|
4
|
+
Summary: A scikit-learn compatible library for graph kernels
|
|
5
|
+
Author-email: Ioannis Siglidis <y.siglidis@gmail.com>, Shaheen Acheche <neoshaheen@gmail.com>
|
|
6
|
+
License: BSD-3-Clause
|
|
7
|
+
Project-URL: Documentation, https://ysig.github.io/GraKeL/
|
|
8
|
+
Project-URL: Homepage, https://github.com/SneachChea/GraKelX
|
|
9
|
+
Project-URL: Repository, https://github.com/SneachChea/GraKelX
|
|
10
|
+
Project-URL: Source Code, https://github.com/SneachChea/GraKelX
|
|
11
|
+
Project-URL: Issue Tracker, https://github.com/SneachChea/GraKelX/issues
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved
|
|
15
|
+
Classifier: Programming Language :: C
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
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: Topic :: Software Development
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering
|
|
24
|
+
Classifier: Operating System :: POSIX
|
|
25
|
+
Classifier: Operating System :: Unix
|
|
26
|
+
Classifier: Operating System :: MacOS
|
|
27
|
+
Requires-Python: <4.0,>=3.10
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: numpy>=1.23.0
|
|
31
|
+
Requires-Dist: scikit-learn>=1.0
|
|
32
|
+
Requires-Dist: scipy>=1.8.0
|
|
33
|
+
Requires-Dist: six>=1.11.0
|
|
34
|
+
Requires-Dist: future>=0.16.0
|
|
35
|
+
Requires-Dist: joblib
|
|
36
|
+
Provides-Extra: lovasz
|
|
37
|
+
Requires-Dist: cvxopt>=1.2.0; extra == "lovasz"
|
|
38
|
+
Provides-Extra: io
|
|
39
|
+
Requires-Dist: networkx<4,>=3; extra == "io"
|
|
40
|
+
Requires-Dist: pandas; extra == "io"
|
|
41
|
+
Provides-Extra: torch
|
|
42
|
+
Requires-Dist: torch; extra == "torch"
|
|
43
|
+
Requires-Dist: torch-geometric; extra == "torch"
|
|
44
|
+
Provides-Extra: examples
|
|
45
|
+
Requires-Dist: nltk; extra == "examples"
|
|
46
|
+
Requires-Dist: networkx<4,>=3; extra == "examples"
|
|
47
|
+
Provides-Extra: tutorials
|
|
48
|
+
Requires-Dist: matplotlib; extra == "tutorials"
|
|
49
|
+
Requires-Dist: nltk; extra == "tutorials"
|
|
50
|
+
Requires-Dist: networkx<4,>=3; extra == "tutorials"
|
|
51
|
+
Provides-Extra: docs
|
|
52
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
53
|
+
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
54
|
+
Requires-Dist: numpydoc; extra == "docs"
|
|
55
|
+
Requires-Dist: sphinx-gallery; extra == "docs"
|
|
56
|
+
Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
|
|
57
|
+
Dynamic: license-file
|
|
58
|
+
|
|
59
|
+
<p align="center">
|
|
60
|
+
<img width="50%" src="https://raw.githubusercontent.com/ysig/GraKeL/0.1a7/doc/_figures/logo.svg?sanitize=true" />
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
--------------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
> [!NOTE]
|
|
66
|
+
> **grakelx** is an independent fork of [GraKeL](https://github.com/ysig/GraKeL) by Siglidis, Nikolentzos, Limnios, Giatsidis, Skianis, and Vazirgiannis,
|
|
67
|
+
> originally published in JMLR 2020. This fork continues maintenance and development under the **BSD 3-clause** license.
|
|
68
|
+
> See [LICENSE](LICENSE) and the [Acknowledgements](#acknowledgements) section below.
|
|
69
|
+
|
|
70
|
+
[](https://pypi.org/pypi/grakelx/)
|
|
71
|
+
|
|
72
|
+
**[Upstream Documentation](https://ysig.github.io/GraKeL/)** | **[Paper](http://jmlr.org/papers/volume21/18-370/18-370.pdf)**
|
|
73
|
+
|
|
74
|
+
*grakelx* is a library that provides implementations of several well-established graph kernels. The library unifies these kernels into a common framework. Furthermore, it provides implementations of some frameworks that work on top of graph kernels. Specifically, grakelx contains 16 kernels and 3 frameworks. The library is compatible with the [scikit-learn](http://scikit-learn.org/) pipeline allowing easy and fast integration inside machine learning algorithms.
|
|
75
|
+
|
|
76
|
+
--------------------------------------------------------------------------------
|
|
77
|
+
|
|
78
|
+
In detail, the following kernels and frameworks are currently implemented:
|
|
79
|
+
|
|
80
|
+
* **[Vertex histogram kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.VertexHistogram.html)**
|
|
81
|
+
* **[Edge histogram kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.EdgeHistogram.html)**
|
|
82
|
+
* **[Shortest path kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.ShortestPath.html)** from Borgwardt and Kriegel: [Shortest-path kernels on graphs](https://www.dbs.ifi.lmu.de/~borgward/papers/BorKri05.pdf) (ICDM 2005)
|
|
83
|
+
* **[Graphlet kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.GraphletSampling.html)** from Shervashidze *et al.*: [Efficient graphlet kernels for large graph comparison](http://proceedings.mlr.press/v5/shervashidze09a/shervashidze09a.pdf) (AISTATS 2009)
|
|
84
|
+
* **[Random walk kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.RandomWalk.html)** from Vishwanathan *et al.*: [Graph Kernels](http://www.jmlr.org/papers/volume11/vishwanathan10a/vishwanathan10a.pdf) (JMLR 11(Apr))
|
|
85
|
+
* **[Neighborhood hash graph kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.NeighborhoodHash.html)** from Hido and Kashima: [A Linear-time Graph Kernel](https://ieeexplore.ieee.org/abstract/document/5360243) (ICDM 2009)
|
|
86
|
+
* **[Weisfeiler-Lehman framework](https://ysig.github.io/GraKeL/latest/generated/grakel.WeisfeilerLehman.html)** from Shervashidze *et al.*: [Weisfeiler-Lehman Graph Kernels](http://www.jmlr.org/papers/volume12/shervashidze11a/shervashidze11a.pdf) (JMLR 12(Sep))
|
|
87
|
+
* **[Neighborhood subgraph pairwise distance kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.NeighborhoodSubgraphPairwiseDistance.html)** from Costa and De Grave: [Fast Neighborhood Subgraph Pairwise Distance Kernel](https://pdfs.semanticscholar.org/7a10/f6a406b664d1159e7c4fefbdd6ac275aee53.pdf) (ICML 2010)
|
|
88
|
+
* **[Lovasz-theta kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.LovaszTheta.html)** from Johansson *et al.*: [Global graph kernels using geometric embeddings](http://proceedings.mlr.press/v32/johansson14.pdf) (ICML 2014)
|
|
89
|
+
* **[SVM-theta kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.SvmTheta.html)** from Johansson *et al.*: [Global graph kernels using geometric embeddings](http://proceedings.mlr.press/v32/johansson14.pdf) (ICML 2014)
|
|
90
|
+
* **[Ordered decompositional DAG kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.OddSth.html)** from Da San Martino *et al.*: [A Tree-Based Kernel for Graphs](https://pdfs.semanticscholar.org/69ee/18dd7a214d4d656b5b95742212f050dabeac.pdf) (SDM 2012)
|
|
91
|
+
* **[GraphHopper kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.GraphHopper.html)** from Feragen *et al.*: [Scalable kernels for graphs with continuous attributes](https://papers.nips.cc/paper/5155-scalable-kernels-for-graphs-with-continuous-attributes.pdf) (NIPS 2013)
|
|
92
|
+
* **[Propagation kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.Propagation.html)** from Neumann *et al.*: [Propagation kernels: efficient graph kernels from propagated information](https://link.springer.com/content/pdf/10.1007/s10994-015-5517-9.pdf) (Machine Learning 102(2))
|
|
93
|
+
* **[Pyramid match kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.PyramidMatch.html)** from Nikolentzos *et al.*: [Matching Node Embeddings for Graph Similarity](https://www.aaai.org/ocs/index.php/AAAI/AAAI17/paper/view/14494/14426) (AAAI 2017)
|
|
94
|
+
* **[Subgraph matching kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.SubgraphMatching.html)** from Kriege and Mutzel: [Subgraph Matching Kernels for Attributed Graphs](https://arxiv.org/ftp/arxiv/papers/1206/1206.6483.pdf) (ICML 2012)
|
|
95
|
+
* **[Multiscale Laplacian kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.MultiscaleLaplacian.html)** from Kondor and Pan: [The Multiscale Laplacian Graph Kernel](https://papers.nips.cc/paper/6135-the-multiscale-laplacian-graph-kernel.pdf) (NIPS 2016)
|
|
96
|
+
* **[Core framework](https://ysig.github.io/GraKeL/latest/generated/grakel.CoreFramework.html)** from Nikolentzos *et al.*: [A Degeneracy Framework for Graph Similarity](https://www.ijcai.org/proceedings/2018/0360.pdf) (IJCAI 2018)
|
|
97
|
+
* **[Weisfeiler-Lehman optimal assignment kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.WeisfeilerLehmanOptimalAssignment.html)** from Kriege *et al.*: [On Valid Optimal Assignment Kernels and Applications to Graph Classification](http://papers.nips.cc/paper/6166-on-valid-optimal-assignment-kernels-and-applications-to-graph-classification.pdf) (NIPS 2016)
|
|
98
|
+
|
|
99
|
+
--------------------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
To learn how to install and use grakelx, and to find out more about the implemented kernels and frameworks, please read our [documentation](https://ysig.github.io/GraKeL/). To learn about the functionality of the library and about example applications, check out our [examples](https://github.com/SneachChea/GraKelX/tree/master/examples) in the `examples/` directory.
|
|
102
|
+
|
|
103
|
+
In case you find a bug, please open an [issue](https://github.com/SneachChea/GraKelX/issues). To propose a new kernel, you can open a [feature request](https://github.com/SneachChea/GraKelX/issues).
|
|
104
|
+
|
|
105
|
+
## Installation
|
|
106
|
+
|
|
107
|
+
grakelx requires the following packages to be installed:
|
|
108
|
+
|
|
109
|
+
* Python (>=3.10)
|
|
110
|
+
* NumPy (>=1.23.0)
|
|
111
|
+
* SciPy (>=1.8.0)
|
|
112
|
+
* Cython (>=0.29.36)
|
|
113
|
+
* cvxopt (>=1.2.0) [optional]
|
|
114
|
+
* future (>=0.16.0)
|
|
115
|
+
|
|
116
|
+
To install the package, run:
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
pip install grakelx
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
For local development with uv:
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
uv sync --group test
|
|
126
|
+
uv run python setup.py build_ext --inplace
|
|
127
|
+
uv run pre-commit install
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Running tests
|
|
131
|
+
|
|
132
|
+
To test the package, execute:
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
uv run pytest
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Running examples
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
cd examples
|
|
142
|
+
python shortest_path.py
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Cite
|
|
146
|
+
|
|
147
|
+
If you use grakelx in a scientific publication, please cite the original GraKeL paper (<http://jmlr.org/papers/volume21/18-370/18-370.pdf>):
|
|
148
|
+
|
|
149
|
+
```bibtex
|
|
150
|
+
@article{JMLR:v21:18-370,
|
|
151
|
+
author = {Giannis Siglidis and Giannis Nikolentzos and Stratis Limnios and Christos Giatsidis and Konstantinos Skianis and Michalis Vazirgiannis},
|
|
152
|
+
title = {GraKeL: A Graph Kernel Library in Python},
|
|
153
|
+
journal = {Journal of Machine Learning Research},
|
|
154
|
+
year = {2020},
|
|
155
|
+
volume = {21},
|
|
156
|
+
number = {54},
|
|
157
|
+
pages = {1-5}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
grakelx is distributed under the **BSD 3-clause** license (same as the original GraKeL). The library makes use of the C++ source code of [BLISS](http://www.tcs.hut.fi/Software/bliss) (a tool for computing automorphism groups and canonical labelings of graphs) which is **LGPL** licensed. Furthermore, the [cvxopt](https://cvxopt.org/) package (a software package for convex optimization) which is an optional dependency of grakelx is **GPL** licensed.
|
|
164
|
+
|
|
165
|
+
## Acknowledgements
|
|
166
|
+
|
|
167
|
+
We would like to thank [@eddiebergman](https://github.com/eddiebergman) for modernizing the original GraKeL CI and extending Python support.
|
|
168
|
+
|
|
169
|
+
This project is a fork of [GraKeL](https://github.com/ysig/GraKeL) by Giannis Siglidis, Giannis Nikolentzos, Stratis Limnios, Christos Giatsidis, Konstantinos Skianis, and Michalis Vazirgiannis, originally published in JMLR 2020 ([paper](http://jmlr.org/papers/volume21/18-370/18-370.pdf)). The original copyright holders are the GraKeL developers. All modifications and additions in this fork are released under the same **BSD 3-clause** license.
|
grakelx-0.1.12/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img width="50%" src="https://raw.githubusercontent.com/ysig/GraKeL/0.1a7/doc/_figures/logo.svg?sanitize=true" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
--------------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
> [!NOTE]
|
|
8
|
+
> **grakelx** is an independent fork of [GraKeL](https://github.com/ysig/GraKeL) by Siglidis, Nikolentzos, Limnios, Giatsidis, Skianis, and Vazirgiannis,
|
|
9
|
+
> originally published in JMLR 2020. This fork continues maintenance and development under the **BSD 3-clause** license.
|
|
10
|
+
> See [LICENSE](LICENSE) and the [Acknowledgements](#acknowledgements) section below.
|
|
11
|
+
|
|
12
|
+
[](https://pypi.org/pypi/grakelx/)
|
|
13
|
+
|
|
14
|
+
**[Upstream Documentation](https://ysig.github.io/GraKeL/)** | **[Paper](http://jmlr.org/papers/volume21/18-370/18-370.pdf)**
|
|
15
|
+
|
|
16
|
+
*grakelx* is a library that provides implementations of several well-established graph kernels. The library unifies these kernels into a common framework. Furthermore, it provides implementations of some frameworks that work on top of graph kernels. Specifically, grakelx contains 16 kernels and 3 frameworks. The library is compatible with the [scikit-learn](http://scikit-learn.org/) pipeline allowing easy and fast integration inside machine learning algorithms.
|
|
17
|
+
|
|
18
|
+
--------------------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
In detail, the following kernels and frameworks are currently implemented:
|
|
21
|
+
|
|
22
|
+
* **[Vertex histogram kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.VertexHistogram.html)**
|
|
23
|
+
* **[Edge histogram kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.EdgeHistogram.html)**
|
|
24
|
+
* **[Shortest path kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.ShortestPath.html)** from Borgwardt and Kriegel: [Shortest-path kernels on graphs](https://www.dbs.ifi.lmu.de/~borgward/papers/BorKri05.pdf) (ICDM 2005)
|
|
25
|
+
* **[Graphlet kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.GraphletSampling.html)** from Shervashidze *et al.*: [Efficient graphlet kernels for large graph comparison](http://proceedings.mlr.press/v5/shervashidze09a/shervashidze09a.pdf) (AISTATS 2009)
|
|
26
|
+
* **[Random walk kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.RandomWalk.html)** from Vishwanathan *et al.*: [Graph Kernels](http://www.jmlr.org/papers/volume11/vishwanathan10a/vishwanathan10a.pdf) (JMLR 11(Apr))
|
|
27
|
+
* **[Neighborhood hash graph kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.NeighborhoodHash.html)** from Hido and Kashima: [A Linear-time Graph Kernel](https://ieeexplore.ieee.org/abstract/document/5360243) (ICDM 2009)
|
|
28
|
+
* **[Weisfeiler-Lehman framework](https://ysig.github.io/GraKeL/latest/generated/grakel.WeisfeilerLehman.html)** from Shervashidze *et al.*: [Weisfeiler-Lehman Graph Kernels](http://www.jmlr.org/papers/volume12/shervashidze11a/shervashidze11a.pdf) (JMLR 12(Sep))
|
|
29
|
+
* **[Neighborhood subgraph pairwise distance kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.NeighborhoodSubgraphPairwiseDistance.html)** from Costa and De Grave: [Fast Neighborhood Subgraph Pairwise Distance Kernel](https://pdfs.semanticscholar.org/7a10/f6a406b664d1159e7c4fefbdd6ac275aee53.pdf) (ICML 2010)
|
|
30
|
+
* **[Lovasz-theta kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.LovaszTheta.html)** from Johansson *et al.*: [Global graph kernels using geometric embeddings](http://proceedings.mlr.press/v32/johansson14.pdf) (ICML 2014)
|
|
31
|
+
* **[SVM-theta kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.SvmTheta.html)** from Johansson *et al.*: [Global graph kernels using geometric embeddings](http://proceedings.mlr.press/v32/johansson14.pdf) (ICML 2014)
|
|
32
|
+
* **[Ordered decompositional DAG kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.OddSth.html)** from Da San Martino *et al.*: [A Tree-Based Kernel for Graphs](https://pdfs.semanticscholar.org/69ee/18dd7a214d4d656b5b95742212f050dabeac.pdf) (SDM 2012)
|
|
33
|
+
* **[GraphHopper kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.GraphHopper.html)** from Feragen *et al.*: [Scalable kernels for graphs with continuous attributes](https://papers.nips.cc/paper/5155-scalable-kernels-for-graphs-with-continuous-attributes.pdf) (NIPS 2013)
|
|
34
|
+
* **[Propagation kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.Propagation.html)** from Neumann *et al.*: [Propagation kernels: efficient graph kernels from propagated information](https://link.springer.com/content/pdf/10.1007/s10994-015-5517-9.pdf) (Machine Learning 102(2))
|
|
35
|
+
* **[Pyramid match kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.PyramidMatch.html)** from Nikolentzos *et al.*: [Matching Node Embeddings for Graph Similarity](https://www.aaai.org/ocs/index.php/AAAI/AAAI17/paper/view/14494/14426) (AAAI 2017)
|
|
36
|
+
* **[Subgraph matching kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.SubgraphMatching.html)** from Kriege and Mutzel: [Subgraph Matching Kernels for Attributed Graphs](https://arxiv.org/ftp/arxiv/papers/1206/1206.6483.pdf) (ICML 2012)
|
|
37
|
+
* **[Multiscale Laplacian kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.MultiscaleLaplacian.html)** from Kondor and Pan: [The Multiscale Laplacian Graph Kernel](https://papers.nips.cc/paper/6135-the-multiscale-laplacian-graph-kernel.pdf) (NIPS 2016)
|
|
38
|
+
* **[Core framework](https://ysig.github.io/GraKeL/latest/generated/grakel.CoreFramework.html)** from Nikolentzos *et al.*: [A Degeneracy Framework for Graph Similarity](https://www.ijcai.org/proceedings/2018/0360.pdf) (IJCAI 2018)
|
|
39
|
+
* **[Weisfeiler-Lehman optimal assignment kernel](https://ysig.github.io/GraKeL/latest/generated/grakel.WeisfeilerLehmanOptimalAssignment.html)** from Kriege *et al.*: [On Valid Optimal Assignment Kernels and Applications to Graph Classification](http://papers.nips.cc/paper/6166-on-valid-optimal-assignment-kernels-and-applications-to-graph-classification.pdf) (NIPS 2016)
|
|
40
|
+
|
|
41
|
+
--------------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
To learn how to install and use grakelx, and to find out more about the implemented kernels and frameworks, please read our [documentation](https://ysig.github.io/GraKeL/). To learn about the functionality of the library and about example applications, check out our [examples](https://github.com/SneachChea/GraKelX/tree/master/examples) in the `examples/` directory.
|
|
44
|
+
|
|
45
|
+
In case you find a bug, please open an [issue](https://github.com/SneachChea/GraKelX/issues). To propose a new kernel, you can open a [feature request](https://github.com/SneachChea/GraKelX/issues).
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
grakelx requires the following packages to be installed:
|
|
50
|
+
|
|
51
|
+
* Python (>=3.10)
|
|
52
|
+
* NumPy (>=1.23.0)
|
|
53
|
+
* SciPy (>=1.8.0)
|
|
54
|
+
* Cython (>=0.29.36)
|
|
55
|
+
* cvxopt (>=1.2.0) [optional]
|
|
56
|
+
* future (>=0.16.0)
|
|
57
|
+
|
|
58
|
+
To install the package, run:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
pip install grakelx
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For local development with uv:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
uv sync --group test
|
|
68
|
+
uv run python setup.py build_ext --inplace
|
|
69
|
+
uv run pre-commit install
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Running tests
|
|
73
|
+
|
|
74
|
+
To test the package, execute:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
uv run pytest
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Running examples
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
cd examples
|
|
84
|
+
python shortest_path.py
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Cite
|
|
88
|
+
|
|
89
|
+
If you use grakelx in a scientific publication, please cite the original GraKeL paper (<http://jmlr.org/papers/volume21/18-370/18-370.pdf>):
|
|
90
|
+
|
|
91
|
+
```bibtex
|
|
92
|
+
@article{JMLR:v21:18-370,
|
|
93
|
+
author = {Giannis Siglidis and Giannis Nikolentzos and Stratis Limnios and Christos Giatsidis and Konstantinos Skianis and Michalis Vazirgiannis},
|
|
94
|
+
title = {GraKeL: A Graph Kernel Library in Python},
|
|
95
|
+
journal = {Journal of Machine Learning Research},
|
|
96
|
+
year = {2020},
|
|
97
|
+
volume = {21},
|
|
98
|
+
number = {54},
|
|
99
|
+
pages = {1-5}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
grakelx is distributed under the **BSD 3-clause** license (same as the original GraKeL). The library makes use of the C++ source code of [BLISS](http://www.tcs.hut.fi/Software/bliss) (a tool for computing automorphism groups and canonical labelings of graphs) which is **LGPL** licensed. Furthermore, the [cvxopt](https://cvxopt.org/) package (a software package for convex optimization) which is an optional dependency of grakelx is **GPL** licensed.
|
|
106
|
+
|
|
107
|
+
## Acknowledgements
|
|
108
|
+
|
|
109
|
+
We would like to thank [@eddiebergman](https://github.com/eddiebergman) for modernizing the original GraKeL CI and extending Python support.
|
|
110
|
+
|
|
111
|
+
This project is a fork of [GraKeL](https://github.com/ysig/GraKeL) by Giannis Siglidis, Giannis Nikolentzos, Stratis Limnios, Christos Giatsidis, Konstantinos Skianis, and Michalis Vazirgiannis, originally published in JMLR 2020 ([paper](http://jmlr.org/papers/volume21/18-370/18-370.pdf)). The original copyright holders are the GraKeL developers. All modifications and additions in this fork are released under the same **BSD 3-clause** license.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.. Color profiles for Sphinx.
|
|
2
|
+
.. Has to be used with hacks.css (bitbucket.org/lbesson/web-sphinx/src/master/.static/hacks.css)
|
|
3
|
+
.. role:: black
|
|
4
|
+
.. role:: gray
|
|
5
|
+
.. role:: grey
|
|
6
|
+
.. role:: silver
|
|
7
|
+
.. role:: white
|
|
8
|
+
.. role:: maroon
|
|
9
|
+
.. role:: red
|
|
10
|
+
.. role:: magenta
|
|
11
|
+
.. role:: fuchsia
|
|
12
|
+
.. role:: pink
|
|
13
|
+
.. role:: orange
|
|
14
|
+
.. role:: yellow
|
|
15
|
+
.. role:: lime
|
|
16
|
+
.. role:: green
|
|
17
|
+
.. role:: olive
|
|
18
|
+
.. role:: teal
|
|
19
|
+
.. role:: cyan
|
|
20
|
+
.. role:: aqua
|
|
21
|
+
.. role:: blue
|
|
22
|
+
.. role:: navy
|
|
23
|
+
.. role:: purple
|
|
24
|
+
|
|
25
|
+
.. role:: under
|
|
26
|
+
.. role:: over
|
|
27
|
+
.. role:: blink
|
|
28
|
+
.. role:: line
|
|
29
|
+
.. role:: strike
|
|
30
|
+
|
|
31
|
+
.. role:: it
|
|
32
|
+
.. role:: ob
|
|
33
|
+
|
|
34
|
+
.. role:: small
|
|
35
|
+
.. role:: large
|
|
36
|
+
|
|
37
|
+
.. role:: center
|
|
38
|
+
.. role:: left
|
|
39
|
+
.. role:: right
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
.. (c) Lilian Besson, 2011-2016, https://bitbucket.org/lbesson/web-sphinx/
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line.
|
|
5
|
+
SPHINXOPTS =
|
|
6
|
+
SPHINXBUILD = sphinx-build
|
|
7
|
+
PAPER =
|
|
8
|
+
BUILDDIR = _build
|
|
9
|
+
|
|
10
|
+
# User-friendly check for sphinx-build
|
|
11
|
+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
|
12
|
+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
|
13
|
+
endif
|
|
14
|
+
|
|
15
|
+
# Internal variables.
|
|
16
|
+
PAPEROPT_a4 = -D latex_paper_size=a4
|
|
17
|
+
PAPEROPT_letter = -D latex_paper_size=letter
|
|
18
|
+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
|
19
|
+
# the i18n builder cannot share the environment and doctrees with the others
|
|
20
|
+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
|
21
|
+
|
|
22
|
+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
|
23
|
+
|
|
24
|
+
help:
|
|
25
|
+
@echo "Please use \`make <target>' where <target> is one of"
|
|
26
|
+
@echo " html to make standalone HTML files"
|
|
27
|
+
@echo " dirhtml to make HTML files named index.html in directories"
|
|
28
|
+
@echo " singlehtml to make a single large HTML file"
|
|
29
|
+
@echo " pickle to make pickle files"
|
|
30
|
+
@echo " json to make JSON files"
|
|
31
|
+
@echo " htmlhelp to make HTML files and a HTML help project"
|
|
32
|
+
@echo " qthelp to make HTML files and a qthelp project"
|
|
33
|
+
@echo " devhelp to make HTML files and a Devhelp project"
|
|
34
|
+
@echo " epub to make an epub"
|
|
35
|
+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
|
36
|
+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
|
37
|
+
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
|
38
|
+
@echo " text to make text files"
|
|
39
|
+
@echo " man to make manual pages"
|
|
40
|
+
@echo " texinfo to make Texinfo files"
|
|
41
|
+
@echo " info to make Texinfo files and run them through makeinfo"
|
|
42
|
+
@echo " gettext to make PO message catalogs"
|
|
43
|
+
@echo " changes to make an overview of all changed/added/deprecated items"
|
|
44
|
+
@echo " xml to make Docutils-native XML files"
|
|
45
|
+
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
|
46
|
+
@echo " linkcheck to check all external links for integrity"
|
|
47
|
+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
|
48
|
+
|
|
49
|
+
clean:
|
|
50
|
+
-rm -rf $(BUILDDIR)/*
|
|
51
|
+
-rm -rf auto_examples/
|
|
52
|
+
-rm -rf generated/*
|
|
53
|
+
-rm -rf modules/generated/*
|
|
54
|
+
|
|
55
|
+
html:
|
|
56
|
+
# These two lines make the build a bit more lengthy, and the
|
|
57
|
+
# the embedding of images more robust
|
|
58
|
+
rm -rf $(BUILDDIR)/html/_images
|
|
59
|
+
#rm -rf _build/doctrees/
|
|
60
|
+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
|
61
|
+
@echo
|
|
62
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
|
63
|
+
|
|
64
|
+
dirhtml:
|
|
65
|
+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
|
66
|
+
@echo
|
|
67
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
|
68
|
+
|
|
69
|
+
singlehtml:
|
|
70
|
+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
|
71
|
+
@echo
|
|
72
|
+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
|
73
|
+
|
|
74
|
+
pickle:
|
|
75
|
+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
|
76
|
+
@echo
|
|
77
|
+
@echo "Build finished; now you can process the pickle files."
|
|
78
|
+
|
|
79
|
+
json:
|
|
80
|
+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
|
81
|
+
@echo
|
|
82
|
+
@echo "Build finished; now you can process the JSON files."
|
|
83
|
+
|
|
84
|
+
htmlhelp:
|
|
85
|
+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
|
86
|
+
@echo
|
|
87
|
+
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
|
88
|
+
".hhp project file in $(BUILDDIR)/htmlhelp."
|
|
89
|
+
|
|
90
|
+
qthelp:
|
|
91
|
+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
|
92
|
+
@echo
|
|
93
|
+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
|
94
|
+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
|
95
|
+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/project-template.qhcp"
|
|
96
|
+
@echo "To view the help file:"
|
|
97
|
+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/project-template.qhc"
|
|
98
|
+
|
|
99
|
+
devhelp:
|
|
100
|
+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
|
101
|
+
@echo
|
|
102
|
+
@echo "Build finished."
|
|
103
|
+
@echo "To view the help file:"
|
|
104
|
+
@echo "# mkdir -p $$HOME/.local/share/devhelp/project-template"
|
|
105
|
+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/project-template"
|
|
106
|
+
@echo "# devhelp"
|
|
107
|
+
|
|
108
|
+
epub:
|
|
109
|
+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
|
110
|
+
@echo
|
|
111
|
+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
|
112
|
+
|
|
113
|
+
latex:
|
|
114
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
115
|
+
@echo
|
|
116
|
+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
|
117
|
+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
|
118
|
+
"(use \`make latexpdf' here to do that automatically)."
|
|
119
|
+
|
|
120
|
+
latexpdf:
|
|
121
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
122
|
+
@echo "Running LaTeX files through pdflatex..."
|
|
123
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
|
124
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
125
|
+
|
|
126
|
+
latexpdfja:
|
|
127
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
128
|
+
@echo "Running LaTeX files through platex and dvipdfmx..."
|
|
129
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
|
130
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
131
|
+
|
|
132
|
+
text:
|
|
133
|
+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
|
134
|
+
@echo
|
|
135
|
+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
|
136
|
+
|
|
137
|
+
man:
|
|
138
|
+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
|
139
|
+
@echo
|
|
140
|
+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
|
141
|
+
|
|
142
|
+
texinfo:
|
|
143
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
|
144
|
+
@echo
|
|
145
|
+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
|
146
|
+
@echo "Run \`make' in that directory to run these through makeinfo" \
|
|
147
|
+
"(use \`make info' here to do that automatically)."
|
|
148
|
+
|
|
149
|
+
info:
|
|
150
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
|
151
|
+
@echo "Running Texinfo files through makeinfo..."
|
|
152
|
+
make -C $(BUILDDIR)/texinfo info
|
|
153
|
+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
|
154
|
+
|
|
155
|
+
gettext:
|
|
156
|
+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
|
157
|
+
@echo
|
|
158
|
+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
|
159
|
+
|
|
160
|
+
changes:
|
|
161
|
+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
|
162
|
+
@echo
|
|
163
|
+
@echo "The overview file is in $(BUILDDIR)/changes."
|
|
164
|
+
|
|
165
|
+
linkcheck:
|
|
166
|
+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
|
167
|
+
@echo
|
|
168
|
+
@echo "Link check complete; look for any errors in the above output " \
|
|
169
|
+
"or in $(BUILDDIR)/linkcheck/output.txt."
|
|
170
|
+
|
|
171
|
+
doctest:
|
|
172
|
+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
|
173
|
+
@echo "Testing of doctests in the sources finished, look at the " \
|
|
174
|
+
"results in $(BUILDDIR)/doctest/output.txt."
|
|
175
|
+
|
|
176
|
+
xml:
|
|
177
|
+
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
|
178
|
+
@echo
|
|
179
|
+
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
|
180
|
+
|
|
181
|
+
pseudoxml:
|
|
182
|
+
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
|
183
|
+
@echo
|
|
184
|
+
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|