Skip to content

Commit

Permalink
Conversion to PyWLGK (pt. 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Old-Shatterhand committed May 12, 2024
1 parent 5e0ff24 commit cd880bb
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish PyWLK to Conda
name: Publish PyWLGK to Conda

on:
release:
Expand Down Expand Up @@ -33,19 +33,19 @@ jobs:
run: |
conda install -y anaconda-client conda-build git
- name: Build PyWLK for linux-64
- name: Build PyWLGK for linux-64
shell: bash -l {0}
run: |
conda-build -q -c conda-forge -c bioconda --output-folder . --no-test recipe
- name: Convert PyWLK to osx-64, osx-arm64, win-64
- name: Convert PyWLGK to osx-64, osx-arm64, win-64
shell: bash -l {0}
run: |
conda convert -p osx-64 linux-64/*.tar.bz2
conda convert -p osx-arm64 linux-64/*.tar.bz2
conda convert -p win-64 linux-64/*.tar.bz2
- name: Publish PyWLK to Conda
- name: Publish PyWLGK to Conda
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_pip.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish PyWLK to PyPI
name: Publish PyWLGK to PyPI

on:
release:
Expand All @@ -25,7 +25,7 @@ jobs:
run: |
pip install --upgrade build twine
- name: Publish PyWLK to PyPI
- name: Publish PyWLGK to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
shell: bash -l {0}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# PyWLK
# PyWLGK

Python implementation of the Weisfeiler-Lehman Graph Kernels (WLKs) method.
This package is an alternative to FastWLK, GraKel, and other implementations of the WLKs method.

## Installation

By design, PyWLK is installable from PyPI and Anaconda. To install the package with `pip`, run the following command:
By design, PyWLGK is installable from PyPI and Anaconda. To install the package with `pip`, run the following command:

```bash
pip install pywlgk
Expand All @@ -19,7 +19,7 @@ conda install pywlgk

## Usage

PyWLK is designed to be easy to use. The following example shows how to use PyWLK to compute the WLKs kernel between
PyWLGK is designed to be easy to use. The following example shows how to use PyWLGK to compute the WLKs kernel between
two graphs.

```python
Expand All @@ -32,6 +32,6 @@ labels = np.ones((2, 10), dtype=np.int32)
wlk(adjs, labels, k=4)
```

PyWLK takes as input a stack of adjacency matrices (`adjs`) and a stack of node labels (`labels`). The adjacency
PyWLGK takes as input a stack of adjacency matrices (`adjs`) and a stack of node labels (`labels`). The adjacency
matrices must be symmetric, whereas the labels can have any type. Additionally, one can specify a `k` to control how
many iterations of the kernel will be computed.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
master_doc = "index"

author = "Roman Joeres"
project = "PyWLK"
project = "PyWLGK"
copyright = f"{datetime.datetime.now().year}, {author}"

version = list(open("../pyproject.toml", "r").readlines())[2].strip().split("\"")[1].split("\"")[0]
Expand Down
14 changes: 7 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Welcome to the documentation of PyWLK
=====================================
Welcome to the documentation of PyWLGK
======================================

PyWLK is a Python implementation of the Weisfeiler-Lehman Graph Kernels (WLKs). It is based on the paper by ? et al.
The main improvement over other tools is that PyWLK can be installed from PyPI and Anaconda for any current python
PyWLGK is a Python implementation of the Weisfeiler-Lehman Graph Kernels (WLKs). It is based on the paper by ? et al.
The main improvement over other tools is that PyWLGK can be installed from PyPI and Anaconda for any current python
version, i.e. Python 3.8 and newer.

Installation
------------

PyWLK can be installed from PyPI using pip:
PyWLGK can be installed from PyPI using pip:

.. code-block:: bash
Expand All @@ -23,7 +23,7 @@ or from Anaconda using conda:
Usage
-----

After installation, PyWLK can be used as follows:
After installation, PyWLGK can be used as follows:

.. code-block:: python
Expand All @@ -35,7 +35,7 @@ After installation, PyWLK can be used as follows:
labels = np.ones((2, 10), dtype=np.int32)
wlk(adjs, labels, k=4)
PyWLK takes as input a stack of adjacency matrices (:code:`adjs`) and a stack of node labels (:code:`labels`). The
PyWLGK takes as input a stack of adjacency matrices (:code:`adjs`) and a stack of node labels (:code:`labels`). The
adjacency matrices must be symmetric, whereas the labels can have any type. Additionally, one can specify a :code:`k`
to control how many iterations of the kernel will be computed.

Expand Down
10 changes: 5 additions & 5 deletions examples/Random_Graph.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
{
"cell_type": "markdown",
"source": [
"# How to use PyWLK\n",
"# How to use PyWLGK\n",
"\n",
"In this tutorial, we will show how to use PyWLK to compute the WL kernel. We will first create two random graphs and then compute the WL kernel between them."
"In this tutorial, we will show how to use PyWLGK to compute the WL kernel. We will first create two random graphs and then compute the WL kernel between them."
],
"metadata": {
"collapsed": false
Expand Down Expand Up @@ -109,14 +109,14 @@
{
"cell_type": "markdown",
"source": [
"### How to use PyWLK\n",
"### How to use PyWLGK\n",
"\n",
"Now we can use PyWLK to compute the WL kernel. The two arguments are a list of adjacency matrices and a list of labels. The labels can have any type. The last argument is the number of iterations of the WL algorithm. The default value is 4.\n",
"Now we can use PyWLGK to compute the WL kernel. The two arguments are a list of adjacency matrices and a list of labels. The labels can have any type. The last argument is the number of iterations of the WL algorithm. The default value is 4.\n",
"\n",
"\n",
"#### Default parameters\n",
"\n",
"We will demonstrate how different parameters affect the output. By default, PyWLK does not normalize the output and uses the dot-product to compute the similarities of graphs."
"We will demonstrate how different parameters affect the output. By default, PyWLGK does not normalize the output and uses the dot-product to compute the similarities of graphs."
],
"metadata": {
"collapsed": false
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "PyWLK"
name = "PyWLGK"
version = "1.0.0"
description = "Python implementation of Weisfeiler-Lehman Graph Kernels"
authors = ["Roman Joeres <joeres.roman@web.de>"]
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ requirements:
- numpy

about:
home: https://github.com/Old-Shatterhand/PyWLK
home: https://github.com/Old-Shatterhand/PyWLGK
license: MIT
license_file: LICENSE
summary: "Python implementation of the WL kernel to be installable from conda and pip for all major platforms and python versions."

0 comments on commit cd880bb

Please sign in to comment.