Skip to content

Commit

Permalink
include installation from github in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
d-schindler committed Nov 22, 2023
1 parent c77ad97 commit 72b8382
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A documentation of all features of the *PyGenStability* is available here: https

## Installation

Install the package using [pypi](https://pypi.org/project/PyGenStability/):
You can install the package using [pypi](https://pypi.org/project/PyGenStability/):

```
pip install pygenstability
Expand Down Expand Up @@ -48,6 +48,24 @@ To install all dependencies, run:
pip install pygenstability[all]
```

### Installation from GitHub

You can also install the source code of this package from GitHub directly by first cloning this repo with:
```
git clone --recurse-submodules https://github.com/ImperialCollegeLondon/PyGenStability.git
```

(if the `--recurse-submodules` has not been used, just do `git submodule update --init --recursive` to fetch the submodule with M. Schaub's code).

The wrapper for the submodule uses Pybind11 https://github.com/pybind/pybind11 and, to install the package, simply run (within the `PyGenStability` directory):
```
pip install .
```
using a fresh python3 virtual environment to avoid conflicts. Similar to above, you can also specify additional dependencies, e.g. to install the package with `networkx` run:
```
pip install .[networkx]
```

## Using the code

The code is simple to run with the default settings. We can input our graph (of type scipy.csgraph), run a scan in scales with a chosen Markov Stability constructor and plot the results in a summary figure presenting different partition quality measures across scales (values of MS cost function, number of communities, etc.) with an indication of optimal scales.
Expand Down
20 changes: 19 additions & 1 deletion docs/index_readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ We further provide specific analysis tools to process and analyse the results fr

## Installation

Install the package using [pypi](https://pypi.org/project/PyGenStability/):
You can install the package using [pypi](https://pypi.org/project/PyGenStability/):

```
pip install pygenstability
Expand Down Expand Up @@ -35,6 +35,24 @@ To install all dependencies, run:
pip install pygenstability[all]
```

### Installation from GitHub

You can also install the source code of this package from GitHub directly by first cloning this repo with:
```
git clone --recurse-submodules https://github.com/ImperialCollegeLondon/PyGenStability.git
```

(if the `--recurse-submodules` has not been used, just do `git submodule update --init --recursive` to fetch the submodule with M. Schaub's code).

The wrapper for the submodule uses Pybind11 https://github.com/pybind/pybind11 and, to install the package, simply run (within the `PyGenStability` directory):
```
pip install .
```
using a fresh python3 virtual environment to avoid conflicts. Similar to above, you can also specify additional dependencies, e.g. to install the package with `networkx` run:
```
pip install .[networkx]
```

## Using the code

The code is simple to run with the default settings. We can input our graph (of type scipy.csgraph), run a scan in scales with a chosen Markov Stability constructor and plot the results in a summary figure presenting different partition quality measures across scales (values of MS cost function, number of communities, etc.) with an indication of optimal scales.
Expand Down

0 comments on commit 72b8382

Please sign in to comment.