Skip to content

Commit 87be2bc

Browse files
committed
Pull request #138: Hotfix/joss paper
Merge in HYP/hypernetx from hotfix/joss-paper to master * commit '3c14988c6b93571fcab8696a324624d75c1a01e7': bump: version 2.1.3 → 2.1.4 Update widget instructions; add screnshot Add Discussions section Update contributing authors HYP-389 Remove testing dependency; update test HYP-389 Fix optional dependencies; update documentation Pull request #137: Update installation instructions for widget HYP-391 Update Contributing guide HYP-392 Update post-installation steps documentation
2 parents 0ed1831 + 3c14988 commit 87be2bc

File tree

16 files changed

+184
-55
lines changed

16 files changed

+184
-55
lines changed

.cz.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.commitizen]
22
name = "cz_conventional_commits"
3-
version = "2.1.3"
3+
version = "2.1.4"
44
version_files = [
55
"setup.py",
66
"docs/source/conf.py",

CONTRIBUTING.md

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,73 @@
1-
# Contributor orientation
1+
# Contributing to HyperNetX
22

3-
If you have ideas for improving this project, we would love to hear from you!
3+
## Code of Conduct
44

5-
## Orientation
5+
We want this community to be friendly and respectful to each other. Please read [the full text](CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
6+
7+
## Requirements
8+
9+
- Python >=3.8,<3.12
10+
11+
## Our Development Process
12+
13+
### Development workflow
14+
15+
> **Working on your first pull request?** You can learn how from this *free* series: [How to Contribute to an Open Source Project on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project).
16+
17+
1. Fork the repo and create your branch from the `develop` branch. Here's a guide on [how to fork a repository](https://help.github.com/articles/fork-a-repo/).
18+
1. Create a Python virtual environment. For convenience, our Makefile provides a target called 'venv' that will create a virtual environment for you. Run the following command: `make venv`
19+
1. Activate the virtual environment. If you used the Makefile target in the previous step, activate the virtual environment by the running the following command: `source venv-hnx/bin/activate`
20+
1. Install the library in development mode: `pip install -e .`
21+
1. Install testing dependencies: `pip install -e .['testing'] `
22+
1. Do the changes you want and ensure all tests pass by running `python -m pytest` before sending a pull request.
23+
24+
### Commit message convention
25+
26+
Ensure that commit messages begin with a verb and are in the present tense. Write meaningful commit messages that concisely describes the changes in a commit.
27+
Read this blog post, [How to Write a Git Commit Message](https://cbea.ms/git-commit/) for some guidance.
28+
29+
### Linting and tests
30+
31+
We use `pylint` and `black` for linting and formatting the code, and `pytest` for testing.
32+
33+
We have included a pre-commit config file that can be used to install pre-commit hooks that will lint your code changes every time you create a commit.
34+
To install pre-commit, you must first install the testing dependencies: `pip install -e .['testing']`. Then run: `pre-commit install`.
35+
36+
Once installed, every time you create a new commit, the linters and formatters will run on the changed code. It is highly recommended to use these `pre-commit` hooks
37+
because these same hooks are run in our CI/CD pipelines on every pull request. Catching pre-commit issues early will prevent CI/CD pipeline issues on your pull request.
38+
39+
### Sending a pull request
40+
41+
- Prefer small pull requests focused on one change.
42+
- Verify that and all tests are passing.
43+
- Verify all in-code documentation is correct (it will be used to generate API documentation).
644

7-
The world of open source is wide; it can be a lot to take in! If this is your first time working with an open source project, then welcome! If you're an experienced contributor, then welcome back! Either way, this online resource might help you [get oriented, or brush up](https://opensource.guide/how-to-contribute/) on the process.
845

946
## Report an issue, bug, or feature request
1047

11-
Here are the [steps to creating an issue on github](https://docs.github.com/en/issues/tracking-your-work-with-issues/quickstart). When reporting a bug,
48+
Here are the [steps to creating an issue on GitHub](https://docs.github.com/en/issues/tracking-your-work-with-issues/quickstart). When reporting a bug,
1249

13-
- search for related issues on Github. You might be able to get answer without the hassle of creating an issue
50+
- search for related issues on GitHub. You might be able to get answer without the hassle of creating an issue
1451
- describe the current behavior and explain which behavior you expected to see instead and why. At this point you can also tell which alternatives do not work for you.
1552
- (if applicable) provide error messages
1653
- (if applicable) provide a step by step description of the problem; if possible include code that others can use to reproduce it
1754
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
18-
- provide clear, specific title
55+
- provide a clear, specific title
1956
- include details on your setup (operating system, python version, etc.)
20-
- use the most recent version of this library and the source language (e.g. Rust); that fixes a lot of problems
57+
- use the most recent version of this library and the source language (e.g. Python); that fixes a lot of problems
2158
- here are [more details on getting the most out of issue reporting!](https://marker.io/blog/how-to-write-bug-report)
2259

23-
## Contribute new code
24-
25-
Here is a [step-by-step guide to writing new code, and submiting it to the project](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)
60+
## Start a Discussion
2661

27-
The more you know about a software library, the easier it is to get started writing code. The best way to learn about this project is its the documentation! See `README.md` to get started.
62+
If you want a forum to collaborate and discuss topics or questions in more depth, feel free to start a discussion on our
63+
[Github Discussions page](https://github.com/pnnl/HyperNetX/discussions). GitHub Discussions is a collaborative
64+
communication forum for the community. Community members can ask and answer questions, share updates, have open-ended
65+
conversations, and follow along on decisions affecting the community's way of working.
2866

2967

3068
## Where can I go for help?
3169

3270
If you're stuck or don't know where to begin, then you're in good company -- we've all been there! We're here to help, and we'd love to hear from you:
3371

34-
- open a issue report on Github
35-
- email us at <[email protected]>
36-
37-
# Code of conduct
38-
39-
Our shared values as software developers guide us in our day-to-day interactions and decision-making. Our open source projects are no exception. Trust, respect, collaboration and transparency are core values we believe should live and breathe within our projects. Our community welcomes participants from around the world with different experiences, unique perspectives, and great ideas to share. Our [code of conduct](CODE_OF_CONDUCT.md) describes these values, and our standards for contributing.
72+
- open an issue report on [GitHub](https://github.com/pnnl/HyperNetX/issues)
73+
- email us at [[email protected]](mailto:[email protected])

LONG_DESCRIPTION.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Hypernets project as part of its High Performance Data Analytics (HPDA) program.
1212
PNNL is operated by Battelle Memorial Institute under Contract DE-ACO5-76RL01830.
1313

1414
* Principal Developer and Designer: Brenda Praggastis
15-
* Development Team: Madelyn Shapiro, Mark Bonicillo
15+
* Development Team: Audun Myers, Mark Bonicillo
1616
* Visualization: Dustin Arendt, Ji Young Yun
1717
* Principal Investigator: Cliff Joslyn
1818
* Program Manager: Brian Kritzstein
19-
* Principal Contributors (Design, Theory, Code): Sinan Aksoy, Dustin Arendt, Mark Bonicillo, Helen Jenne, Cliff Joslyn, Nicholas Landry, Audun Myers, Christopher Potvin, Brenda Praggastis, Emilie Purvine, Greg Roek, Madelyn Shapiro, Mirah Shi, Francois Theberge, Ji Young Yun
19+
* Principal Contributors (Design, Theory, Code): Sinan Aksoy, Dustin Arendt, Mark Bonicillo, Helen Jenne, Cliff Joslyn, Nicholas Landry, Audun Myers, Christopher Potvin, Brenda Praggastis, Emilie Purvine, Greg Roek, Mirah Shi, Francois Theberge, Ji Young Yun
2020

2121
The code in this repository is intended to support researchers modeling data
2222
as hypergraphs. We have a growing community of users and contributors.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Hypernets project as part of its High Performance Data Analytics (HPDA) program.
1616
PNNL is operated by Battelle Memorial Institute under Contract DE-ACO5-76RL01830.
1717

1818
* Principal Developer and Designer: Brenda Praggastis
19-
* Development Team: Madelyn Shapiro, Mark Bonicillo
19+
* Development Team: Audun Myers, Mark Bonicillo
2020
* Visualization: Dustin Arendt, Ji Young Yun
2121
* Principal Investigator: Cliff Joslyn
2222
* Program Manager: Brian Kritzstein
23-
* Principal Contributors (Design, Theory, Code): Sinan Aksoy, Dustin Arendt, Mark Bonicillo, Helen Jenne, Cliff Joslyn, Nicholas Landry, Audun Myers, Christopher Potvin, Brenda Praggastis, Emilie Purvine, Greg Roek, Madelyn Shapiro, Mirah Shi, Francois Theberge, Ji Young Yun
23+
* Principal Contributors (Design, Theory, Code): Sinan Aksoy, Dustin Arendt, Mark Bonicillo, Helen Jenne, Cliff Joslyn, Nicholas Landry, Audun Myers, Christopher Potvin, Brenda Praggastis, Emilie Purvine, Greg Roek, Mirah Shi, Francois Theberge, Ji Young Yun
2424

2525
The code in this repository is intended to support researchers modeling data
2626
as hypergraphs. We have a growing community of users and contributors.

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import os
2020

2121

22-
__version__ = "2.1.3"
22+
__version__ = "2.1.4"
2323

2424

2525
# If extensions (or modules to document with autodoc) are in another directory,
48.7 KB
Loading

docs/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Contents
5757
Algorithms: Modularity and Clustering <modularity>
5858
Publications <publications>
5959
license
60-
long_description
6160

6261

6362
Indices and tables

docs/source/install.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,30 @@ Post-Installation Actions
8787
Running Tests
8888
**************
8989

90+
To run all the tests, ensure that you first install the testing dependencies:
91+
92+
>>> pip install -e .['testing']
93+
94+
Then try running all the tests:
95+
9096
>>> python -m pytest
9197

98+
99+
Dependencies for some Submodules
100+
********************************
101+
102+
Two submodules in the library, ``hypernetx.algorithms.hypergraph_modularity`` and ``hypernetx.algorithms.contagion``,
103+
require some additional dependencies. If you want to use those submodules, you will need to install those dependencies.
104+
105+
For ``hypernetx.algorithms.hypergraph_modularity``, install the following:
106+
107+
>>> pip install 'igraph>=0.10.4'
108+
109+
For ``hypernetx.algorithms.contagion``, install the following:
110+
111+
>>> pip install 'celluloid>=0.2.0'
112+
113+
92114
Interact with HyperNetX in a REPL
93115
********************************************
94116

docs/source/widget.rst

Lines changed: 80 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,91 @@ Hypernetx-Widget
1111

1212
Overview
1313
--------
14-
The HyperNetXWidget_ is an addon for HNX, which extends the built in visualization
15-
capabilities of HNX to a JavaScript based interactive visualization. The tool has two main interfaces,
14+
The HyperNetXWidget is an addon for HNX, which extends the built-in visualization
15+
capabilities of HNX to a JavaScript based interactive visualization. The tool has two main interfaces,
1616
the hypergraph visualization and the nodes & edges panel.
17-
You may `demo the widget here <https://pnnl.github.io/hypernetx-widget/>`_
17+
You may `demo the widget here <https://pnnl.github.io/hypernetx-widget/>`_.
18+
19+
The HypernetxWidget is open source and
20+
available on `GitHub <https://github.com/pnnl/hypernetx-widget>`_ It is also `published on PyPi
21+
<https://pypi.org/project/hnxwidget/>`_
22+
23+
**The HyperNetX widget is currently in beta with limitations on the Jupyter environment in which it may be used.
24+
It is being actively worked on. Look for improvements and an expanded list of usable environments in a future release.**
1825

1926
Installation
2027
------------
21-
The HypernetxWidget_ is available on `GitHub <https://github.com>`_ and may be
22-
installed using pip:
2328

24-
>>> pip install hnxwidget
29+
HyperNetXWidget is currently in beta and will only work on Jupyter Notebook 6.5.x. It is not supported on Jupyter Lab,
30+
but support for Jupyter Lab is in planning.
31+
32+
In addition, HyperNetXWidget must be installed using the `Anaconda platform <https://www.anaconda.com/>`_ so that the
33+
widget can render on Jupyter notebook. It is highly recommended to use the base environment provided by Anaconda because
34+
Anaconda's package management system, `conda`, will resolve dependencies when HyperNetX and HyperNetXWidget are
35+
installed. For more information on `conda` environments, please see `their documentation here.
36+
<https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment>`_
37+
38+
**Do not use python's built-in venv module or virtualenv to create a virtual environment; the widget will not render on
39+
Jupyter notebook.**
40+
41+
Prerequisites
42+
^^^^^^^^^^^^^
43+
* conda 23.11.x
44+
* python 3.11.x
45+
* jupyter notebook 6.5.4
46+
* ipywidgets 7.6.5
47+
48+
49+
Installation Steps
50+
^^^^^^^^^^^^^^^^^^
51+
52+
Open a new shell and run the following commands::
53+
54+
# update conda
55+
conda update conda
56+
57+
# activate the base environment
58+
conda activate
59+
60+
# install hypernetx and hnxwidget
61+
pip install hypernetx hnxwidget
62+
63+
# install jupyter notebook and extensions
64+
conda install -y -c anaconda notebook
65+
conda install -y -c conda-forge jupyter_contrib_nbextensions
66+
67+
# install and enable the hnxwidget on jupyter
68+
jupyter nbextension install --py --symlink --sys-prefix hnxwidget
69+
jupyter nbextension enable --py --sys-prefix hnxwidget
70+
71+
# install ipykernel and use it to add the base environment to jupyter notebook
72+
conda install -y -c anaconda ipykernel
73+
python -m ipykernel install --user --name=base
74+
75+
# start the notebook
76+
jupyter-notebook
77+
78+
79+
Conda Environment
80+
^^^^^^^^^^^^^^^^^
81+
82+
If the notebook runs into a `ModuleNotFoundError` for the HyperNetX or HyperNetXWidget packages, ensure that you set
83+
your kernel to the conda base environment (i.e. `base`). This will ensure that your notebook has the right environment
84+
to run the widget.
85+
86+
On the notebook, click the "New" drop-down button and select "base" as the environment for your notebook. See the
87+
following screenshot as an example:
88+
89+
.. image:: images/notebook_ipykernel.png
90+
:width: 300px
91+
:align: center
92+
93+
94+
|
95+
| For more information on setting the environment in Jupyter notebook, see
96+
`How to add your Conda environment to your jupyter notebook in just 4 steps.
97+
<https://medium.com/@nrk25693/how-to-add-your-conda-environment-to-your-jupyter-notebook-in-just-4-steps-abeab8b8d084>`_
98+
2599

26100
Using the Tool
27101
--------------

hypernetx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
from hypernetx.utils import *
1212
from hypernetx.utils.toys import *
1313

14-
__version__ = "2.1.3"
14+
__version__ = "2.1.4"

0 commit comments

Comments
 (0)