Skip to content

Commit

Permalink
Merge e87a9ef into f7dda4d
Browse files Browse the repository at this point in the history
  • Loading branch information
marblestation committed Sep 30, 2021
2 parents f7dda4d + e87a9ef commit d9301da
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade wheel setuptools pip
#python -m pip install --upgrade wheel setuptools pip
python -m pip install --upgrade wheel pip
pip install -U -r requirements.txt
pip install -U -r dev-requirements.txt
python -m spacy download en
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
git+https://github.com/adsabs/ADSMicroserviceUtils.git@v1.2.0
git+https://github.com/adsabs/ADSMicroserviceUtils.git@v1.2.1
click==7.1.1
networkx==2.5.1
numpy==1.21.1
Expand Down
8 changes: 7 additions & 1 deletion vis_services/lib/paper_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,15 @@ def augment_graph_data(data, max_groups):
summary_json["nodes"][real_index]["node_name"] = i +1


# NOTE: From Python 2 to 3 transition
# Older networkx versions were producing a links structure using positional ids
# so we created the artificial key 'stable_index' to make things easier on the front-end side
# But newer networkx versions using node ids for the links structure, therefore 'stable_index'
# has become redundant, but BBB uses it
for i, n in enumerate(summary_json["nodes"]):
#cache this so graph manipulation later is easier
summary_json["nodes"][i]["stable_index"] = i
#summary_json["nodes"][i]["stable_index"] = i # For older networkx versions
summary_json["nodes"][i]["stable_index"] = summary_json["nodes"][i]["id"]
#find the node

final_data = {"summaryGraph" : summary_json, "fullGraph" : json_graph.node_link_data(G) }
Expand Down
2 changes: 1 addition & 1 deletion wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

from werkzeug.serving import run_simple
from werkzeug.wsgi import DispatcherMiddleware
from werkzeug.middleware.dispatcher import DispatcherMiddleware

from vis_services import app

Expand Down

0 comments on commit d9301da

Please sign in to comment.