aboutsummaryrefslogtreecommitdiff
path: root/guix/graph.scm
Commit message (Collapse)AuthorAge
* graph: Add GraphML backend.Josselin Poiret2023-08-25
| | | | | | | * guix/graph.scm (emit-graphml-prologue, emit-graphml-epilogue, emit-graphml-node, emit-graphml-edge): New procedures. (%graphml-backend): New variable. (%graph-backends): Add %graphml-backend.
* guix: Strip #:use-module lists.Ludovic Courtès2023-03-13
| | | | | | | | | | | | This was obtained by setting up this environment: guix shell -D guix --with-input=guile@3.0.9=guile-next \ --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2 -- make -j5 then adding 'unused-module' to (@@ (guix build compiler) %warnings), building, and checking all the "unused module" warnings and removing those that were definitely unused.
* graph: Factorize 'lookup-backend'.Ludovic Courtès2022-03-18
| | | | | | | * guix/graph.scm (lookup-backend): New procedure. * guix/scripts/graph.scm (lookup-backend): Remove. * guix/scripts/system.scm (lookup-backend): Remove. * po/guix/POTFILES.in: Add 'guix/graph.scm'.
* graph: Add '--max-depth'.Ludovic Courtès2021-09-21
| | | | | | | | | | * guix/graph.scm (export-graph): Add #:max-depth and honor it, adding 'depths' argument to 'loop'. * guix/scripts/graph.scm (%options, show-help): Add '--max-depth'. (%default-options): Add 'max-depth'. (guix-graph): Pass #:max-depth to 'export-graph'. * tests/graph.scm ("package DAG, limited depth"): New test. * doc/guix.texi (Invoking guix graph): Document it.
* graph: Install JavaScript files.Ludovic Courtès2021-01-04
| | | | | | | | | | | | | | | Until now, 'guix graph --backend=d3js' wouldn't work outside the build tree. * d3.v3.js: Move to... * guix/d3.v3.js: ... here. * graph.js: Move to... * guix/graph.js: ... here. * Makefile.am (nobase_dist_guilemodule_DATA): Add them. (EXTRA_DIST): Remove them. * guix/graph.scm (emit-d3js-prologue, emit-d3js-epilogue): Adjust 'search-path' argument accordingly. * guix/self.scm (compiled-guix)[*extra-modules*]: Pass them via #:extra-files.
* graph: Don't insist on "Helvetica" in the Graphviz backend.Ludovic Courtès2020-10-22
| | | | | | Suggested by Fulbert <fulbert@bluewin.ch>. * guix/graph.scm (emit-node): Use "sans" instead of "Helvetica".
* graph: Fix typo in docstring.Ludovic Courtès2020-10-20
| | | | * guix/graph.scm (shortest-path): Fix typo in docstring.
* graph: Add 'shortest-path'.Ludovic Courtès2020-05-11
| | | | | | | * guix/graph.scm (shortest-path): New procedure. * tests/graph.scm ("shortest-path, packages + derivations") ("shortest-path, reverse packages") ("shortest-path, references"): New tests.
* Revert "graph: Provide access to the package record in the emit functions."Ludovic Courtès2017-08-24
| | | | | | This reverts commit 5d7e8543659874682b618bba799ba7cd6ffce554, which broke 'tests/graph.scm' and broke node types not related to <package> objects, such as '%reference-node-type'.
* graph: Provide access to the package record in the emit functions.Roel Janssen2017-08-01
| | | | | * guix/graph.scm (export-graph): Pass the node to the emit functions, instead of the node's label.
* graph: Add Cypher backend.Roel Janssen2017-05-11
| | | | | * guix/graph.scm (%cypher-backend): New variable. * doc/guix.texi: Add documentation for the Cypher backend of 'guix graph'.
* graph: Add d3js backend.Ricardo Wurmus2016-12-14
| | | | | | | | | * d3.v3.js, graph.js: New files. * Makefile.am (EXTRA_DIST): List them. * guix/graph.scm (%d3js-backend): New variable. (emit-d3js-prologue, emit-d3js-epilogue, emit-d3js-node, emit-d3js-edge): New procedures. (%graph-backends): Add %d3js-backend.
* graph: Add "list-backend" and "backend" options.Ricardo Wurmus2016-12-14
| | | | | | | | | | | * guix/graph.scm (%graph-backends): New variable. * guix/scripts/graph.scm (lookup-backend, list-backends): New procedures. (%options): Add options for "backend" and "list-backends". (show-help): Add help texts for "backend" and "list-backend" options. (%default-options): Add "backend" default. (guix-graph): Pass backend argument to "export-graph". * doc/guix.texi (Invoking guix graph): Document the new options.
* graph: Backend must have name and description.Ricardo Wurmus2016-12-14
| | | | | | | | | * guix/graph.scm (<graph-backend>): Add fields "name" and "description". (%graphviz-backend): Provide values for name and description. (export-graph): Ignore name and description when matching backends. (graph-backend-name, graph-backend-description): New procedures. * tests/graph.scm (make-recording-backend): Initialize name and description fields of test graph-backend.
* graph: Add 'node-reachable-count'.Ludovic Courtès2016-05-24
| | | | | * guix/graph.scm (node-reachable-count): New procedure. * tests/graph.scm ("node-reachable-count"): New test.
* graph: Expose 'traverse/depth-first'.Ludovic Courtès2016-05-24
| | | | | | * guix/graph.scm (traverse/depth-first): New procedure, based on code formerly in 'node-transitive-edges'. (node-transitive-edges): Rewrite in terms of it.
* graph: Allow store file names for 'derivation' and 'references' graphs.Ludovic Courtès2016-05-21
| | | | | | | | | | | | | | * guix/scripts/graph.scm (%derivation-node-type)[convert]: Add 'derivation-path?' and catch-all clauses. (%reference-node-type)[convert]: Add 'store-path?' and catch-all clauses. (assert-package, nodes-from-package): New procedures. (%package-node-type, %bag-node-type,%bag-with-origins-node-type) (%bag-emerged-node-type): Add 'convert' field (guix-graph): Rename 'packages' to 'items' and allow 'store-path?' arguments. * guix/graph.scm (<node-type>)[convert]: Adjust comment. * doc/guix.texi (Invoking guix graph): Document it.
* graph: Edges are colored based on their source node.Ludovic Courtès2016-04-02
| | | | | | * guix/graph.scm (%colors): New variable. (pop-color): New procedure. (emit-edge): Use it.
* graph: Add procedures to query a node's edges.Ludovic Courtès2015-11-21
| | | | | | | * guix/graph.scm (%node-edges, node-edges, node-back-edges) (node-transitive-edges): New procedures. * tests/graph.scm ("node-edges") ("node-transitive-edges + node-back-edges"): New tests.
* Add (guix graph).Ludovic Courtès2015-11-21
* guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it.