Skip to content

Commit 17484bf

Browse files
brendapraggastisryandanehy
authored andcommitted
Pull request #223: moving request into methods to simply hnx import
Merge in HYP/hypernetx from hotfix/issue.168 to master * commit '5b42c630df348f2ea17f86b8c5f04e9db0c6d840': bump: version 2.3.11 → 2.3.12 Precommit fixes moving request into methods to simply hnx import
2 parents 7c827b4 + 5b42c63 commit 17484bf

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
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.3.11"
3+
version = "2.3.12"
44
version_provider = "poetry"
55
version_files = [
66
"pyproject.toml",

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.3.11"
22+
__version__ = "2.3.12"
2323

2424

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

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.3.11"
14+
__version__ = "2.3.12"

hypernetx/hif.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
from .exception import HyperNetXError
1111

1212
schema_url = "https://raw.githubusercontent.com/pszufe/HIF_validators/main/schemas/hif_schema_v0.1.0.json"
13-
resp = requests.get(schema_url)
14-
schema = json.loads(resp.text)
15-
validator = fastjsonschema.compile(schema)
1613

1714

1815
def normalize_dataframe(df):
@@ -62,6 +59,11 @@ def to_hif(hg, filename=None, network_type="undirected", metadata=None):
6259
hif : dict
6360
format is defined by HIF schema
6461
"""
62+
63+
resp = requests.get(schema_url)
64+
schema = json.loads(resp.text)
65+
validator = fastjsonschema.compile(schema)
66+
6567
hyp_objs = ["nodes", "edges", "incidences"]
6668
defaults = {
6769
part: dict(getattr(hg, part).property_store._defaults) for part in hyp_objs
@@ -130,6 +132,11 @@ def from_hif(hif=None, filename=None):
130132
hnx.Hypergraph
131133
132134
"""
135+
136+
resp = requests.get(schema_url)
137+
schema = json.loads(resp.text)
138+
validator = fastjsonschema.compile(schema)
139+
133140
if hif is not None:
134141
try:
135142
validator(hif)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "hypernetx"
3-
version = "2.3.11"
3+
version = "2.3.12"
44
description = "HyperNetX is a Python library for the creation and study of hypergraphs."
55
authors = ["Brenda Praggastis <[email protected]>", "Dustin Arendt <[email protected]>",
66
"Sinan Aksoy <[email protected]>", "Emilie Purvine <[email protected]>",

0 commit comments

Comments
 (0)