Skip to content

Commit

Permalink
Pull request #144: Feature/hyp 367
Browse files Browse the repository at this point in the history
Merge in HYP/hypernetx from feature/hyp-367 to develop

* commit '89c712bfff824b591422f0e15141bf6d7a36a24b': (108 commits)
  Fix formatting
  adding arithmetic for hypergraphs
  Bug fix: shouldn't require passing position for hyper-edges.
  Remove nwhy decorator reference
  Run linter; remove HNX_Paper
  updated hypergraph code class method constructors
  Remove references to warn_nwhy deprecation decorator
  Remove deprecated NetworkX functions
  Remove unnecessary hypergraph test
  Fix incidence_store bug; move, update, and fix incidence store tests;
  Remove EntitySet and tests
  add incidences reference to access _E HypergraphView
  removing hypergraph_outline to avoid versioning issues. new code is on hypergraph.py now
  centrality tutorial 5 is ready to go
  Updated the tutorials in basic 1,3,4 to work with new code..
  moved old hypergraph code into hypergraph_2.0 and  set hypergraph to match hypergraph_outline. updated dogsAndcats for testing
  updated tests to work with new hypergraph code. commented out _by_setsystem tests until they can be upgraded
  updated collapse in incidence to separate functions for equivalence classes and collapse identical elements. user can now specify keys when collapsing
  added is_empty to match old behavior
  Refactor set property
  ...
  • Loading branch information
bonicim committed Mar 27, 2024
2 parents b67b38b + 89c712b commit 519c771
Show file tree
Hide file tree
Showing 40 changed files with 7,058 additions and 5,462 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.github/
.DS_Store
gitmerge.sh
dist
Expand Down Expand Up @@ -39,3 +40,5 @@ docs/build
coverage.xml
cov.syspath.txt
*.whl
*dogsAndcats*
.github/
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ repos:
- id: trailing-whitespace
exclude: ^(docs/|hypernetx.egg-info/|setup.cfg)
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lint: pylint flake8 mypy

.PHONY: pylint
pylint:
@$(PYTHON3) -m pylint --recursive=y --persistent=n --verbose hypernetx
@$(PYTHON3) -m pylint --recursive=y --persistent=n --verbose hypernetx --exit-zero

.PHONY: mypy
mypy:
Expand Down Expand Up @@ -129,3 +129,7 @@ test-deps:
.PHONY: all-deps
all-deps:
@$(PYTHON3) -m pip install .[all] --use-pep517

.PHONY: install-develop
install-develop:
@$(PYTHON3) -m pip install -e . --use-pep517
16 changes: 8 additions & 8 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0 , os.path.abspath("../../hypernetx"))
sys.path.insert(0, os.path.abspath("../../hypernetx"))


# -- Project information -----------------------------------------------------
Expand Down Expand Up @@ -57,7 +57,7 @@
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
'sphinx_copybutton',
"sphinx_copybutton",
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -79,7 +79,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -239,8 +239,8 @@
(
master_doc,
"HyperNetX.tex",
u"HyperNetX Documentation",
u"Brenda Praggastis, Dustin Arendt",
"HyperNetX Documentation",
"Brenda Praggastis, Dustin Arendt",
"manual",
),
]
Expand Down Expand Up @@ -270,7 +270,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "hypernetx", u"HyperNetX Documentation", [author], 1)]
man_pages = [(master_doc, "hypernetx", "HyperNetX Documentation", [author], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -285,7 +285,7 @@
(
master_doc,
"HyperNetX",
u"HyperNetX Documentation",
"HyperNetX Documentation",
author,
"HyperNetX",
"One line description of project.",
Expand Down Expand Up @@ -377,7 +377,7 @@

# Remove the command prompts such as >>> when copying code snippets from copybutton
# see https://sphinx-copybutton.readthedocs.io/en/latest/use.html
copybutton_exclude = '.linenos, .gp'
copybutton_exclude = ".linenos, .gp"

# tables and code-blocks are automatically numbered if they have a caption.
# See https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-numfig
Expand Down
1 change: 1 addition & 0 deletions hypernetx/algorithms/contagion.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ def majority_vote(node, status, edge):

# Auxiliary functions


# The ListDict class is copied from Joel Miller's Github repository Mathematics-of-Epidemics-on-Networks
class _ListDict_(object):
r"""
Expand Down
1 change: 1 addition & 0 deletions hypernetx/algorithms/tests/test_contagion.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import hypernetx as hnx
import random


# Test the contagion functions
def test_collective_contagion():
status = {0: "S", 1: "I", 2: "I", 3: "S", 4: "R"}
Expand Down
1 change: 1 addition & 0 deletions hypernetx/algorithms/tests/test_generative.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import random
from scipy.sparse import coo_matrix


# Test the generative model functions
def test_erdos_renyi():
random.seed(42)
Expand Down
3 changes: 1 addition & 2 deletions hypernetx/classes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from hypernetx.classes.entityset import EntitySet
from hypernetx.classes.hypergraph import Hypergraph

__all__ = ["EntitySet", "Hypergraph"]
__all__ = ["Hypergraph"]
Loading

0 comments on commit 519c771

Please sign in to comment.