Skip to content

Commit

Permalink
Pull request #114: HYP-344 Add tutorial readmes, update Collab links
Browse files Browse the repository at this point in the history
Merge in HYP/hypernetx from HYP-344-reorganize-tutorials to develop

* commit 'c9d4e926ec4ec6c55a5230a4dbbb5295b656cf0a':
  HYP-344 Add tutorial readmes, update Collab links
  • Loading branch information
bonicim committed Oct 12, 2023
2 parents 57d4da7 + c9d4e92 commit b9c1800
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 8 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ test-ci: test-deps
pre-commit install
pre-commit run --all-files
@$(PYTHON3) -m tox -e py38 -r
@$(PYTHON3) -m tox -e py38-notebooks -r

test-ci-github: test-deps
@$(PYTHON3) -m pip install 'pytest-github-actions-annotate-failures>=0.1.7'
Expand Down Expand Up @@ -53,13 +52,25 @@ version-deps:

.PHONY: version-deps

#### Documentation
### Documentation

docs-deps:
@$(PYTHON3) -m pip install -e .'[documentation]' --use-pep517

.PHONY: docs-deps

## Tutorials

.PHONY: tutorial-deps
tutorial-deps:
@$(PYTHON3) -m pip install .'[tutorials]' .'[widget]' --use-pep517

.PHONY: tutorials
tutorials:
jupyter notebook tutorials



## Environment

clean-venv:
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@ Google Colab
------------


<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%201%20-%20HNX%20Basics.ipynb" target="_blank">
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/basic/Tutorial%201%20-%20HNX%20Basics.ipynb" target="_blank">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span >Tutorial 1 - HNX Basics</span>
</a>
<br>

<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%202%20-%20Visualization%20Methods.ipynb" target="_blank">
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/basic/Tutorial%202%20-%20Visualization%20Methods.ipynb" target="_blank">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span >Tutorial 2 - Visualization Methods</span>
</a>
<br>

<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%203%20-%20LesMis%20Case%20Study.ipynb" target="_blank">
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/basic/Tutorial%203%20-%20LesMis%20Case%20Study.ipynb" target="_blank">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span >Tutorial 3 - LesMis Case Study</span>
</a>
<br>

<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%204%20-%20LesMis%20Visualizations-BookTour.ipynb" target="_blank">
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/basic/Tutorial%204%20-%20LesMis%20Visualizations-BookTour.ipynb" target="_blank">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span >Tutorial 4 - LesMis Visualizations-Book Tour</span>
</a>
Expand All @@ -102,7 +102,7 @@ Google Colab
</a>
<br>

<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%206%20-%20Homology%20mod%202%20for%20TriLoop%20Example.ipynb" target="_blank">
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/advanced/Tutorial%206%20-%20Homology%20mod%202%20for%20TriLoop%20Example.ipynb" target="_blank">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span >Tutorial 6 - Homology mod2 for TriLoop Example</span>
</a>
Expand All @@ -112,7 +112,7 @@ Google Colab
Jupyter Notebooks
-----------------

Additional tutorials that can be run as Jupyter Notebooks can be found in the 'tutorials-jupyter' folder.
Additional tutorials that can be run as Jupyter Notebooks are found under [tutorials](./tutorials).

Installation
====================
Expand Down
29 changes: 29 additions & 0 deletions tutorials/advanced/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Overview

These tutorials cover advanced topics in hypergraphs such as hypergraph metrics, homology, generating hypergraphs from
random models, modeling contagion with hypergraphs, and hypergraph modularity.

# How to run the tutorials on Jupyter Notebook

Create a virtual environment:

`make venv`

Activate the environment:

`source venv-hnx/bin/activate`

Navigate to the root of this repository. Install the required dependencies in order to run the Jupyter Notebooks:

`make tutorials-deps`

Once the dependencies have been installed, run the notebooks:

`make tutorials`

This command will open up the notebooks on a browser at the following URL: http://localhost:8888/tree

Below is a screenshot of what to expect to see on the browser. Click a folder and open the desired
tutorial on your browser:

![](../images/jupyter_notebook_screenshot.png)
32 changes: 32 additions & 0 deletions tutorials/basic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Overview

These tutorials provide an introduction to the HyperNetX library using graph data such as the [Les Miserables dataset from the
Stanford GraphBase](https://cs.stanford.edu/pub/sgb/sgb.tar.gz). The tutorials also show how to use the library's visualization tools
to visualize and analyze hypergraphs.

# How to run the tutorials on Jupyter Notebook

Create a virtual environment:

`make venv`


Activate the environment:

`source venv-hnx/bin/activate`


Navigate to the root of this repository. Install the required dependencies in order to run the Jupyter Notebooks:

`make tutorials-deps`

Once the dependencies have been installed, run the notebooks:

`make tutorials`

This command will open up the notebooks on a browser at the following URL: http://localhost:8888/tree

Below is a screenshot of what to expect to see on the browser. Click a folder and open the desired
tutorial on your browser:

![](../images/jupyter_notebook_screenshot.png)
Binary file added tutorials/images/jupyter_notebook_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions tutorials/widget/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Overview

These tutorials demonstrate how to use [hnxwidget](https://pypi.org/project/hnxwidget/), an interactive visualization tool
of HyperNetX.

# How to run the tutorials on Jupyter Notebook

Create a virtual environment:

`make venv`


Activate the environment:

`source venv-hnx/bin/activate`


Navigate to the root of this repository. Install the required dependencies in order to run the Jupyter Notebooks:

`make tutorials-deps`

Once the dependencies have been installed, run the notebooks:

`make tutorials`

This command will open up the notebooks on a browser at the following URL: http://localhost:8888/tree

Below is a screenshot of what to expect to see on the browser. Click a folder and open the desired
tutorial on your browser:

![](../images/jupyter_notebook_screenshot.png)

0 comments on commit b9c1800

Please sign in to comment.