From fe51dcf98bca691853d108c84f88820dc9431043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szabolcs=20Horva=CC=81t?= Date: Tue, 8 Apr 2025 10:15:19 +0000 Subject: [PATCH] docs: fix a lot of outdated links --- .../cluster_contraction.py | 2 +- doc/source/install.rst | 4 +-- doc/source/visualisation.rst | 2 +- setup.py | 4 +-- src/_igraph/graphobject.c | 29 ++++++++++--------- src/igraph/__init__.py | 2 +- src/igraph/community.py | 18 ++++++------ src/igraph/drawing/__init__.py | 10 +++---- src/igraph/drawing/cairo/plot.py | 6 ++-- src/igraph/drawing/graph.py | 8 ++--- src/igraph/io/images.py | 2 +- tox.ini | 2 +- 12 files changed, 45 insertions(+), 44 deletions(-) diff --git a/doc/examples_sphinx-gallery/cluster_contraction.py b/doc/examples_sphinx-gallery/cluster_contraction.py index aa7cf38a7..af997dc5d 100644 --- a/doc/examples_sphinx-gallery/cluster_contraction.py +++ b/doc/examples_sphinx-gallery/cluster_contraction.py @@ -12,7 +12,7 @@ # %% # We begin by load the graph from file. The file containing this network can be -# downloaded `here `_. +# downloaded `here `_. g = ig.load("./lesmis/lesmis.gml") # %% diff --git a/doc/source/install.rst b/doc/source/install.rst index 91fcf6f18..65c985bb9 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -131,7 +131,7 @@ Fourth, call ``pip`` to compile and install the package from source:: $ pip install . Alternatively, you can call ``build`` or another PEP 517-compliant build frontend -to build an installable Python wheel. Here we use `pipx `_ +to build an installable Python wheel. Here we use `pipx `_ to invoke ``build`` in a separate virtualenv:: $ pipx run build @@ -140,7 +140,7 @@ Testing your installation ------------------------- Use ``tox`` or another standard test runner tool to run all the unit tests. -Here we use `pipx `_` to invoke ``tox``:: +Here we use `pipx `_ to invoke ``tox``:: $ pipx run tox diff --git a/doc/source/visualisation.rst b/doc/source/visualisation.rst index 7cad8bf9b..cf32dbd90 100644 --- a/doc/source/visualisation.rst +++ b/doc/source/visualisation.rst @@ -234,6 +234,6 @@ See the :ref:`tutorial ` for examples and a full list .. _matplotlib: https://matplotlib.org .. _Jupyter: https://jupyter.org/ .. _Cairo: https://www.cairographics.org -.. _graphviz: http://www.graphviz.org +.. _graphviz: https://www.graphviz.org .. _networkx: https://networkx.org/ .. _graph-tool: https://graph-tool.skewed.de/ diff --git a/setup.py b/setup.py index 18c5a7793..b61fe9881 100644 --- a/setup.py +++ b/setup.py @@ -953,7 +953,7 @@ def get_tag(self): Graph plotting functionality is provided by the Cairo library, so make sure you install the Python bindings of Cairo if you want to generate publication-quality graph plots. You can try either `pycairo -`_ or `cairocffi `_, +`_ or `cairocffi `_, ``cairocffi`` is recommended because there were bug reports affecting igraph graph plots in Jupyter notebooks when using ``pycairo`` (but not with ``cairocffi``). @@ -983,7 +983,7 @@ def get_tag(self): "Bug Tracker": "https://github.com/igraph/python-igraph/issues", "Changelog": "https://github.com/igraph/python-igraph/blob/main/CHANGELOG.md", "CI": "https://github.com/igraph/python-igraph/actions", - "Documentation": "https://igraph.readthedocs.io", + "Documentation": "https://python.igraph.org", "Source Code": "https://github.com/igraph/python-igraph", }, "ext_modules": [igraph_extension], diff --git a/src/_igraph/graphobject.c b/src/_igraph/graphobject.c index 49e025003..b5565ab59 100644 --- a/src/_igraph/graphobject.c +++ b/src/_igraph/graphobject.c @@ -14530,7 +14530,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "the number of vertices in the graph, a list of shifts giving\n" "additional edges to a cycle backbone and another integer giving how\n" "many times the shifts should be performed. See\n" - "U{http://mathworld.wolfram.com/LCFNotation.html} for details.\n\n" + "U{https://mathworld.wolfram.com/LCFNotation.html} for details.\n\n" "@param n: the number of vertices\n" "@param shifts: the shifts in a list or tuple\n" "@param repeats: the number of repeats\n" @@ -16222,7 +16222,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { " small-world networks. I{Nature} 393(6884):440-442, 1998.\n" " - Barrat A, Barthelemy M, Pastor-Satorras R and Vespignani A:\n" " The architecture of complex weighted networks. I{PNAS} 101, 3747 (2004).\n" - " U{http://arxiv.org/abs/cond-mat/0311416}.\n\n" + " U{https://arxiv.org/abs/cond-mat/0311416}.\n\n" "@param vertices: a list containing the vertex IDs which should be\n" " included in the result. C{None} means all of the vertices.\n" "@param mode: defines how to treat vertices with degree less than two.\n" @@ -16820,7 +16820,8 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "forces among the vertices and then the physical system is simulated\n" "until it reaches an equilibrium or the maximal number of iterations is\n" "reached.\n\n" - "See U{http://www.schmuhl.org/graphopt/} for the original graphopt.\n\n" + "See U{https://web.archive.org/web/20220611030748/http://www.schmuhl.org/graphopt/}\n" + "and U{https://sourceforge.net/projects/graphopt/} for the original graphopt.\n\n" "@param niter: the number of iterations to perform. Should be a couple\n" " of hundred in general.\n\n" "@param node_charge: the charge of the vertices, used to calculate electric\n" @@ -17135,7 +17136,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "Read_DIMACS(f, directed=False)\n--\n\n" "Reads a graph from a file conforming to the DIMACS minimum-cost flow file format.\n\n" "For the exact description of the format, see\n" - "U{http://lpsolve.sourceforge.net/5.5/DIMACS.htm}\n\n" + "U{https://lpsolve.sourceforge.net/5.5/DIMACS.htm}\n\n" "Restrictions compared to the official description of the format:\n\n" " - igraph's DIMACS reader requires only three fields in an arc definition,\n" " describing the edge's source and target node and its capacity.\n" @@ -17171,7 +17172,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "Read_GraphDB(f, directed=False)\n--\n\n" "Reads a GraphDB format file and creates a graph based on it.\n\n" "GraphDB is a binary format, used in the graph database for\n" - "isomorphism testing (see U{http://amalfi.dis.unina.it/graph/}).\n\n" + "isomorphism testing (see U{https://mivia.unisa.it/datasets/graph-database/arg-database/}).\n\n" "@param f: the name of the file or a Python file handle\n" "@param directed: whether the generated graph should be directed.\n"}, /* interface to igraph_read_graph_graphml */ @@ -17394,7 +17395,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "algorithm.\n\n" "Passing the permutation returned here to L{permute_vertices()} will\n" "transform the graph into its canonical form.\n\n" - "See U{http://www.tcs.hut.fi/Software/bliss/index.html} for more information\n" + "See U{https://users.aalto.fi/~tjunttil/bliss/} for more information\n" "about the BLISS algorithm and canonical permutations.\n\n" "@param sh: splitting heuristics for graph as a case-insensitive string,\n" " with the following possible values:\n\n" @@ -17420,7 +17421,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "count_automorphisms(sh=\"fl\", color=None)\n--\n\n" "Calculates the number of automorphisms of a graph using the BLISS isomorphism\n" "algorithm.\n\n" - "See U{http://www.tcs.hut.fi/Software/bliss/index.html} for more information\n" + "See U{https://users.aalto.fi/~tjunttil/bliss/} for more information\n" "about the BLISS algorithm and canonical permutations.\n\n" "@param sh: splitting heuristics for graph as a case-insensitive string,\n" " with the following possible values:\n\n" @@ -17471,7 +17472,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { " sh1=\"fl\", sh2=None, color1=None, color2=None)\n--\n\n" "Checks whether the graph is isomorphic to another graph, using the\n" "BLISS isomorphism algorithm.\n\n" - "See U{http://www.tcs.hut.fi/Software/bliss/index.html} for more information\n" + "See U{https://users.aalto.fi/~tjunttil/bliss/} for more information\n" "about the BLISS algorithm.\n\n" "@param other: the other graph with which we want to compare the graph.\n" "@param color1: optional vector storing the coloring of the vertices of\n" @@ -18264,15 +18265,15 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "community_infomap(edge_weights=None, vertex_weights=None, trials=10)\n--\n\n" "Finds the community structure of the network according to the Infomap\n" "method of Martin Rosvall and Carl T. Bergstrom.\n\n" - "See U{http://www.mapequation.org} for a visualization of the algorithm\n" + "See U{https://www.mapequation.org} for a visualization of the algorithm\n" "or one of the references provided below.\n" "B{References}\n" " - M. Rosvall and C. T. Bergstrom: I{Maps of information flow reveal\n" " community structure in complex networks}. PNAS 105, 1118 (2008).\n" - " U{http://arxiv.org/abs/0707.0609}\n" + " U{https://arxiv.org/abs/0707.0609}\n" " - M. Rosvall, D. Axelsson and C. T. Bergstrom: I{The map equation}.\n" " I{Eur Phys J Special Topics} 178, 13 (2009).\n" - " U{http://arxiv.org/abs/0906.1405}\n" + " U{https://arxiv.org/abs/0906.1405}\n" "\n" "@param edge_weights: name of an edge attribute or a list containing\n" " edge weights.\n" @@ -18301,7 +18302,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "B{Reference}: Raghavan, U.N. and Albert, R. and Kumara, S. Near linear\n" "time algorithm to detect community structures in large-scale\n" "networks. I{Phys Rev E} 76:036106, 2007.\n" - "U{http://arxiv.org/abs/0709.2938}.\n" + "U{https://arxiv.org/abs/0709.2938}.\n" "\n" "@param weights: name of an edge attribute or a list containing\n" " edge weights\n" @@ -18356,7 +18357,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "\n" "B{Reference}: VD Blondel, J-L Guillaume, R Lambiotte and E Lefebvre: Fast\n" "unfolding of community hierarchies in large networks. J Stat Mech\n" - "P10008 (2008), U{http://arxiv.org/abs/0803.0476}\n" + "P10008 (2008), U{https://arxiv.org/abs/0803.0476}\n" "\n" "Attention: this function is wrapped in a more convenient syntax in the\n" "derived class L{Graph}. It is advised to use that instead of this version.\n\n" @@ -18495,7 +18496,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { "Attention: this function is wrapped in a more convenient syntax in the\n" "derived class L{Graph}. It is advised to use that instead of this version.\n\n" "B{Reference}: Pascal Pons, Matthieu Latapy: Computing communities in large\n" - "networks using random walks, U{http://arxiv.org/abs/physics/0512106}.\n\n" + "networks using random walks, U{https://arxiv.org/abs/physics/0512106}.\n\n" "@param weights: name of an edge attribute or a list containing\n" " edge weights\n" "@return: a tuple with the list of merges and the modularity scores corresponding\n" diff --git a/src/igraph/__init__.py b/src/igraph/__init__.py index 7f0e328b7..0b1690849 100644 --- a/src/igraph/__init__.py +++ b/src/igraph/__init__.py @@ -860,7 +860,7 @@ def transitivity_avglocal_undirected(self, mode="nan", weights=None): networks. I{Nature} 393(6884):440-442, 1998. - Barrat A, Barthelemy M, Pastor-Satorras R and Vespignani A: The architecture of complex weighted networks. I{PNAS} 101, 3747 - (2004). U{http://arxiv.org/abs/cond-mat/0311416}. + (2004). U{https://arxiv.org/abs/cond-mat/0311416}. @param mode: defines how to treat vertices with degree less than two. If C{TRANSITIVITY_ZERO} or C{"zero"}, these vertices will have zero diff --git a/src/igraph/community.py b/src/igraph/community.py index e2dcb47da..0fdcdf154 100644 --- a/src/igraph/community.py +++ b/src/igraph/community.py @@ -37,12 +37,12 @@ def _community_infomap(graph, edge_weights=None, vertex_weights=None, trials=10) - M. Rosvall and C. T. Bergstrom: Maps of information flow reveal community structure in complex networks, I{PNAS} 105, 1118 (2008). - U{http://dx.doi.org/10.1073/pnas.0706851105}, - U{http://arxiv.org/abs/0707.0609}. + U{https://doi.org/10.1073/pnas.0706851105}, + U{https://arxiv.org/abs/0707.0609}. - M. Rosvall, D. Axelsson, and C. T. Bergstrom: The map equation, I{Eur Phys. J Special Topics} 178, 13 (2009). - U{http://dx.doi.org/10.1140/epjst/e2010-01179-1}, - U{http://arxiv.org/abs/0906.1405}. + U{https://doi.org/10.1140/epjst/e2010-01179-1}, + U{https://arxiv.org/abs/0906.1405}. @param edge_weights: name of an edge attribute or a list containing edge weights. @@ -125,7 +125,7 @@ def _community_label_propagation(graph, weights=None, initial=None, fixed=None): B{Reference}: Raghavan, U.N. and Albert, R. and Kumara, S. Near linear time algorithm to detect community structures in large-scale networks. - I{Phys Rev} E 76:036106, 2007. U{http://arxiv.org/abs/0709.2938}. + I{Phys Rev} E 76:036106, 2007. U{https://arxiv.org/abs/0709.2938}. @param weights: name of an edge attribute or a list containing edge weights @@ -165,7 +165,7 @@ def _community_multilevel(graph, weights=None, return_levels=False, resolution=1 B{Reference}: VD Blondel, J-L Guillaume, R Lambiotte and E Lefebvre: Fast unfolding of community hierarchies in large networks, I{J Stat Mech} - P10008 (2008). U{http://arxiv.org/abs/0803.0476} + P10008 (2008). U{https://arxiv.org/abs/0803.0476} @param weights: edge attribute name or a list containing edge weights @@ -271,11 +271,11 @@ def _community_spinglass(graph, *args, **kwds): - Reichardt J and Bornholdt S: Statistical mechanics of community detection. I{Phys Rev E} 74:016110 (2006). - U{http://arxiv.org/abs/cond-mat/0603718}. + U{https://arxiv.org/abs/cond-mat/0603718}. - Traag VA and Bruggeman J: Community detection in networks with positive and negative links. I{Phys Rev E} 80:036115 (2009). - U{http://arxiv.org/abs/0811.2329}. + U{https://arxiv.org/abs/0811.2329}. @keyword weights: edge weights to be used. Can be a sequence or iterable or even an edge attribute name. @@ -329,7 +329,7 @@ def _community_walktrap(graph, weights=None, steps=4): as a dendrogram. B{Reference}: Pascal Pons, Matthieu Latapy: Computing communities in large - networks using random walks, U{http://arxiv.org/abs/physics/0512106}. + networks using random walks, U{https://arxiv.org/abs/physics/0512106}. @param weights: name of an edge attribute or a list containing edge weights diff --git a/src/igraph/drawing/__init__.py b/src/igraph/drawing/__init__.py index e6d06b4bc..2725745f6 100644 --- a/src/igraph/drawing/__init__.py +++ b/src/igraph/drawing/__init__.py @@ -5,9 +5,9 @@ It also has experimental support for plotly. The Cairo backend is dependent on the C{pycairo} or C{cairocffi} libraries that -provide Python bindings to the popular U{Cairo library}. -This means that if you don't have U{pycairo} -or U{cairocffi} installed, you won't be able +provide Python bindings to the popular U{Cairo library}. +This means that if you don't have U{pycairo} +or U{cairocffi} installed, you won't be able to use the Cairo plotting backend. Whenever the documentation refers to the C{pycairo} library, you can safely replace it with C{cairocffi} as the two are API-compatible. @@ -21,8 +21,8 @@ If you do not want to (or cannot) install any of the dependencies outlined above, you can still save the graph to an SVG file and view it from -U{Mozilla Firefox} (free) or edit it in -U{Inkscape} (free), U{Skencil} +U{Mozilla Firefox} (free) or edit it in +U{Inkscape} (free), U{Skencil} (formerly known as Sketch, also free) or Adobe Illustrator. """ diff --git a/src/igraph/drawing/cairo/plot.py b/src/igraph/drawing/cairo/plot.py index ac98210db..f35db6ef1 100644 --- a/src/igraph/drawing/cairo/plot.py +++ b/src/igraph/drawing/cairo/plot.py @@ -6,7 +6,7 @@ The Cairo backend is dependent on the C{pycairo} or C{cairocffi} libraries that provide Python bindings to the popular U{Cairo library}. This means that if you don't have U{pycairo} -or U{cairocffi} installed, you won't be able +or U{cairocffi} installed, you won't be able to use the Cairo plotting backend. Whenever the documentation refers to the C{pycairo} library, you can safely replace it with C{cairocffi} as the two are API-compatible. @@ -17,8 +17,8 @@ If you do not want to (or cannot) install any of the dependencies outlined above, you can still save the graph to an SVG file and view it from -U{Mozilla Firefox} (free) or edit it in -U{Inkscape} (free), U{Skencil} +U{Mozilla Firefox} (free) or edit it in +U{Inkscape} (free), U{Skencil} (formerly known as Sketch, also free) or Adobe Illustrator. """ diff --git a/src/igraph/drawing/graph.py b/src/igraph/drawing/graph.py index ec326c48d..00f77f402 100644 --- a/src/igraph/drawing/graph.py +++ b/src/igraph/drawing/graph.py @@ -7,8 +7,8 @@ - Matplotlib axes (L{MatplotlibGraphDrawer}) It also contains routines to send an igraph graph directly to -(U{Cytoscape}) using the -(U{CytoscapeRPC plugin}), see +(U{Cytoscape}) using the +(U{CytoscapeRPC plugin}), see L{CytoscapeGraphDrawer}. L{CytoscapeGraphDrawer} can also fetch the current network from Cytoscape and convert it to igraph format. """ @@ -24,8 +24,8 @@ class CytoscapeGraphDrawer(AbstractXMLRPCDrawer, AbstractGraphDrawer): """Graph drawer that sends/receives graphs to/from Cytoscape using CytoscapeRPC. - This graph drawer cooperates with U{Cytoscape} - using U{CytoscapeRPC}. + This graph drawer cooperates with U{Cytoscape} + using U{CytoscapeRPC}. You need to install the CytoscapeRPC plugin first and start the XML-RPC server on a given port (port 9000 by default) from the appropriate Plugins submenu in Cytoscape. diff --git a/src/igraph/io/images.py b/src/igraph/io/images.py index 052be0500..202e39862 100644 --- a/src/igraph/io/images.py +++ b/src/igraph/io/images.py @@ -149,7 +149,7 @@ def _write_graph_to_svg( print('', file=f) print( - "", + "", file=f, ) print(file=f) diff --git a/tox.ini b/tox.ini index 221c56a55..e1b1944bb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,4 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests +# Tox (https://tox.wiki) is a tool for running tests # in multiple virtualenvs. This configuration file will run the # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory.