Skip to content

Commit 82d3ba3

Browse files
changes for 1.6.0 (#279)
* changes for 1.6.0 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1e2764b commit 82d3ba3

File tree

5 files changed

+25
-17
lines changed

5 files changed

+25
-17
lines changed

.requirements/docs.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ sphinxext-opengraph
1212
sphinxcontrib-gtagjs
1313
ipython
1414
watermark
15+
sphinx_codeautolink

docs/source/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"nbsphinx",
5656
"nbsphinx_link",
5757
"sphinx.ext.napoleon",
58+
"sphinx_codeautolink",
5859
# "sphinx_autorun",
5960
]
6061

@@ -63,9 +64,9 @@
6364
nbsphinx_require_js_path = (
6465
"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"
6566
)
66-
nbsphinx_kernel_name = "graphein-wip"
67-
# nbsphinx_execute = "always"
68-
nbsphinx_execute = "never"
67+
nbsphinx_kernel_name = "graphein"
68+
nbsphinx_execute = "always"
69+
# nbsphinx_execute = "never"
6970

7071
ogp_site_url = "https://graphein.ai/"
7172
ogp_image = "https://graphein.ai/_static/graphein.png"

graphein/protein/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def read_fasta(file_path: str) -> Dict[str, str]:
9090

9191
def download_pdb_multiprocessing(
9292
pdb_codes: List[str],
93-
out_dir: Union[str, Path],
93+
out_dir: Union[str, Path], # type: ignore
9494
overwrite: bool = False,
9595
strict: bool = False,
9696
max_workers: int = 16,

graphein/protein/visualisation.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def plotly_protein_structure_graph(
195195
figsize: Tuple[int, int] = (620, 650),
196196
node_alpha: float = 0.7,
197197
node_size_min: float = 20.0,
198-
node_size_multiplier: float = 20.0,
198+
node_size_multiplier: float = 1.0,
199199
node_size_feature: str = "degree",
200200
label_node_ids: bool = True,
201201
node_colour_map=plt.cm.plasma,
@@ -217,7 +217,7 @@ def plotly_protein_structure_graph(
217217
:param node_size_min: Specifies node minimum size. Defaults to ``20.0``.
218218
:type node_size_min: float
219219
:param node_size_multiplier: Scales node size by a constant. Node sizes
220-
reflect degree. Defaults to ``20.0``.
220+
reflect degree. Defaults to ``1.0``.
221221
:type node_size_multiplier: float
222222
:param node_size_feature: Which feature to scale the node size by. Defaults
223223
to ``degree``.
@@ -378,7 +378,7 @@ def plot_protein_structure_graph(
378378
figsize: Tuple[int, int] = (10, 7),
379379
node_alpha: float = 0.7,
380380
node_size_min: float = 20.0,
381-
node_size_multiplier: float = 20.0,
381+
node_size_multiplier: float = 1.0,
382382
label_node_ids: bool = True,
383383
node_colour_map=plt.cm.plasma,
384384
edge_color_map=plt.cm.plasma,
@@ -402,10 +402,10 @@ def plot_protein_structure_graph(
402402
:type figsize: Tuple[int, int]
403403
:param node_alpha: Controls node transparency, defaults to ``0.7``.
404404
:type node_alpha: float
405-
:param node_size_min: Specifies node minimum size, defaults to ``20``.
405+
:param node_size_min: Specifies node minimum size, defaults to ``20.0``.
406406
:type node_size_min: float
407407
:param node_size_multiplier: Scales node size by a constant. Node sizes
408-
reflect degree. Defaults to ``20``.
408+
reflect degree. Defaults to ``1.0``.
409409
:type node_size_multiplier: float
410410
:param label_node_ids: bool indicating whether or not to plot ``node_id``
411411
labels. Defaults to ``True``.
@@ -629,15 +629,15 @@ def plot_distance_matrix(
629629
raise ValueError("Must provide either a graph or a distance matrix.")
630630

631631
if dist_mat is None:
632-
dist_mat = g.graph["dist_mat"]
632+
dist_mat = g.graph["dist_mat"] # type: ignore
633633
if g is not None:
634634
x_range = list(g.nodes)
635635
y_range = list(g.nodes)
636636
if not title:
637637
title = g.graph["name"] + " - Distance Matrix"
638638
else:
639-
x_range = list(range(dist_mat.shape[0]))
640-
y_range = list(range(dist_mat.shape[1]))
639+
x_range = list(range(dist_mat.shape[0])) # type: ignore
640+
y_range = list(range(dist_mat.shape[1])) # type: ignore
641641
if not title:
642642
title = "Distance matrix"
643643

@@ -743,7 +743,7 @@ def asteroid_plot(
743743
use_plotly: bool = True,
744744
show_edges: bool = False,
745745
show_legend: bool = True,
746-
node_size_multiplier: float = 10,
746+
node_size_multiplier: float = 10.0,
747747
) -> Union[plotly.graph_objects.Figure, matplotlib.figure.Figure]:
748748
# sourcery skip: remove-unnecessary-else, swap-if-else-branches
749749
"""Plots a k-hop subgraph around a node as concentric shells.
@@ -778,12 +778,12 @@ def asteroid_plot(
778778
:type use_plotly: bool
779779
:param show_edges: Whether to show edges in the plot. Defaults to ``False``.
780780
:type show_edges: bool
781-
:param show_legend: Whether to show the legend of the edges. Fefaults to
781+
:param show_legend: Whether to show the legend of the edges. Defaults to
782782
`True``.
783783
:type show_legend: bool
784784
:param node_size_multiplier: Multiplier for the size of the nodes. Defaults
785-
to ``10``.
786-
:type node_size_multiplier: float.
785+
to ``10.0``.
786+
:type node_size_multiplier: float
787787
:returns: Plotly figure or matplotlib figure.
788788
:rtpye: Union[plotly.graph_objects.Figure, matplotlib.figure.Figure]
789789
"""

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,19 @@ def run(self):
134134

135135
setup(
136136
name="graphein",
137-
version="1.5.2",
137+
version="1.6.0",
138138
description="Protein & Interactomic Graph Construction for Machine Learning",
139139
long_description=long_description,
140140
long_description_content_type="text/markdown",
141141
author="Arian Jamasb",
142142
author_email="arian@jamasb.io",
143143
url="https://github.com/a-r-j/graphein",
144+
project_urls={
145+
"homepage": "https://github.com/a-r-j/graphein",
146+
"changelog": "https://github.com/a-r-j/graphein/blob/master/CHANGELOG.md",
147+
"issue": "https://github.com/a-r-j/graphein/issues",
148+
"documentation": "https://graphein.ai/",
149+
},
144150
packages=find_packages(),
145151
package_data={
146152
"": ["LICENSE.txt", "README.md", "requirements.txt", "*.csv"]

0 commit comments

Comments
 (0)