diff --git a/Makefile b/Makefile index 786d1b77..0c7be1a9 100644 --- a/Makefile +++ b/Makefile @@ -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' @@ -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: diff --git a/README.md b/README.md index e5098c1b..dae06123 100644 --- a/README.md +++ b/README.md @@ -72,25 +72,25 @@ Google Colab ------------ - + Open In Colab Tutorial 1 - HNX Basics
- + Open In Colab Tutorial 2 - Visualization Methods
- + Open In Colab Tutorial 3 - LesMis Case Study
- + Open In Colab Tutorial 4 - LesMis Visualizations-Book Tour @@ -102,7 +102,7 @@ Google Colab
- + Open In Colab Tutorial 6 - Homology mod2 for TriLoop Example @@ -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 ==================== diff --git a/tutorials/advanced/README.md b/tutorials/advanced/README.md new file mode 100644 index 00000000..09d36ab7 --- /dev/null +++ b/tutorials/advanced/README.md @@ -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) diff --git a/tutorials/basic/README.md b/tutorials/basic/README.md new file mode 100644 index 00000000..3db4f888 --- /dev/null +++ b/tutorials/basic/README.md @@ -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) diff --git a/tutorials/images/jupyter_notebook_screenshot.png b/tutorials/images/jupyter_notebook_screenshot.png new file mode 100644 index 00000000..6a47bd13 Binary files /dev/null and b/tutorials/images/jupyter_notebook_screenshot.png differ diff --git a/tutorials/widget/README.md b/tutorials/widget/README.md new file mode 100644 index 00000000..2364a4f1 --- /dev/null +++ b/tutorials/widget/README.md @@ -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)