Name | colcon-gephi JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Extension for colcon to support support generating gexf files which can be inspected in Gephi |
upload_time | 2025-08-17 00:20:07 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
colcon
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# colcon_gephi
Colcon plugin to generate a rich dependency graph for packages in a ROS 2 workspace. Resulting graph is intended for
viewing in [Gephi](https://gephi.org/), but should be usable in other graph viewing tools like [GraphViz](https://graphviz.org/)
or [Graphia](https://graphia.app/), although these have not been verified.
Below is an example graph of the [workspace for the ros2 rolling repos](https://docs.ros.org/en/rolling/Installation/Alternatives/Ubuntu-Development-Setup.html#get-ros-2-code).
For details on what the graph actually is showing, see [Example Graph](#example-graph).

## Features
Currently supports exporting in:
- **DOT** (default, for Graphviz and other generic graph tools)
- **GML** (human-readable text format, supported by many graph libraries)
- **GEXF** (ideal for Gephi, preserves complex attributes)
Unlike `colcon graph`, this extension preserves extra package metadata (e.g., maintainers, repository info, build type)
as node attributes. This makes it easier to analyze dependency relationships visually in Gephi.
- Generates a graph file from your ROS 2 workspace using the same package descriptors as `colcon graph`.
- Automatically includes the following as node attributes:
- Package path
- Build type
- Maintainers
- Version
- Git repository name and remote URL (if applicable)
- Lines of Code (LOC) stats (see [Optional Dependencies](#optional-dependencies))
- Includes edges for build, run, and test dependencies between packages in the workspace.
- Produces output ready to open in Gephi — no manual attribute editing required.
## Install from PyPI
```bash
python3 -m pip install colcon_gephi
```
## Usage
```bash
cd ros2_rolling/
colcon gephi_graph
```
The generated `.dot` file will have the name of the directory the command was run in. So in this case,
it is `ros2_rolling.dot`.
To change the file format, pass the `--format` flag.
```bash
colcon gephi_graph --format gml
```
## Optional Dependencies
This package optionally depends on [cloc](https://github.com/AlDanial/cloc/) to LOC-related node attributes.
If `cloc` is not found on the system, a warning is printed, and the LOC-related attributes are not added.
## Gephi Tips
Gephi can be quite complex to use. It is recommended to read a [few tutorials on usage](https://gephi.org/users/).
### Node Size Based on Attribute
For whatever reason, when networkx exports a graph, the resulting (by default) `.dot` file will not respect data types.
Everything will be a string. This means that you cannot do things like change the size of nodes based on attributes like
`lines_of_code` by default. You need to make a new column, and copy the data over to this new column with the
appropriate data type.
### Example Graph
The graph generated at the top of this README was laid out by following this [video](https://www.youtube.com/watch?v=eI2YSIJxPLw).
Larger nodes are nodes with more "in-degree" edges (i.e. edges pointing into them), which gives a visual representation of how many packages depend on them.
Finally, the colors are based on the package build_type (i.e. ros.ament_cmake, ros.ament_python, etc).

Raw data
{
"_id": null,
"home_page": null,
"name": "colcon-gephi",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "colcon",
"author": null,
"author_email": "Sam Privett <sam@privett.dev>",
"download_url": "https://files.pythonhosted.org/packages/fd/30/44359f2535e7e6fd496c165d25c1b91d8ba756fc45043faf70d62cb88fa9/colcon_gephi-0.1.0.tar.gz",
"platform": null,
"description": "# colcon_gephi\n\nColcon plugin to generate a rich dependency graph for packages in a ROS 2 workspace. Resulting graph is intended for \nviewing in [Gephi](https://gephi.org/), but should be usable in other graph viewing tools like [GraphViz](https://graphviz.org/)\nor [Graphia](https://graphia.app/), although these have not been verified.\n\nBelow is an example graph of the [workspace for the ros2 rolling repos](https://docs.ros.org/en/rolling/Installation/Alternatives/Ubuntu-Development-Setup.html#get-ros-2-code).\nFor details on what the graph actually is showing, see [Example Graph](#example-graph).\n\n\n## Features\n\nCurrently supports exporting in:\n- **DOT** (default, for Graphviz and other generic graph tools)\n- **GML** (human-readable text format, supported by many graph libraries)\n- **GEXF** (ideal for Gephi, preserves complex attributes)\n\nUnlike `colcon graph`, this extension preserves extra package metadata (e.g., maintainers, repository info, build type)\nas node attributes. This makes it easier to analyze dependency relationships visually in Gephi.\n\n- Generates a graph file from your ROS 2 workspace using the same package descriptors as `colcon graph`.\n- Automatically includes the following as node attributes:\n - Package path\n - Build type\n - Maintainers\n - Version\n - Git repository name and remote URL (if applicable)\n - Lines of Code (LOC) stats (see [Optional Dependencies](#optional-dependencies))\n- Includes edges for build, run, and test dependencies between packages in the workspace.\n- Produces output ready to open in Gephi \u2014 no manual attribute editing required.\n\n## Install from PyPI\n```bash\npython3 -m pip install colcon_gephi\n```\n\n## Usage\n\n```bash\ncd ros2_rolling/\ncolcon gephi_graph\n```\n\nThe generated `.dot` file will have the name of the directory the command was run in. So in this case,\nit is `ros2_rolling.dot`.\n\nTo change the file format, pass the `--format` flag.\n```bash\ncolcon gephi_graph --format gml\n```\n\n## Optional Dependencies\nThis package optionally depends on [cloc](https://github.com/AlDanial/cloc/) to LOC-related node attributes. \nIf `cloc` is not found on the system, a warning is printed, and the LOC-related attributes are not added.\n\n## Gephi Tips\nGephi can be quite complex to use. It is recommended to read a [few tutorials on usage](https://gephi.org/users/).\n\n### Node Size Based on Attribute\nFor whatever reason, when networkx exports a graph, the resulting (by default) `.dot` file will not respect data types.\nEverything will be a string. This means that you cannot do things like change the size of nodes based on attributes like\n`lines_of_code` by default. You need to make a new column, and copy the data over to this new column with the \nappropriate data type.\n\n### Example Graph\nThe graph generated at the top of this README was laid out by following this [video](https://www.youtube.com/watch?v=eI2YSIJxPLw). \nLarger nodes are nodes with more \"in-degree\" edges (i.e. edges pointing into them), which gives a visual representation of how many packages depend on them.\nFinally, the colors are based on the package build_type (i.e. ros.ament_cmake, ros.ament_python, etc).\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Extension for colcon to support support generating gexf files which can be inspected in Gephi",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"colcon"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9a67efdba73d3f6285e404073aed0ec753d71f52d322c535c3cf5b2d0fe064bc",
"md5": "fa9c93b8335d478d707cfe6a24835973",
"sha256": "7c95e4218d98fabc16247ad1b1ede5a2960e7d71ca23bdea0fbc4e7694e1af4a"
},
"downloads": -1,
"filename": "colcon_gephi-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fa9c93b8335d478d707cfe6a24835973",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10171,
"upload_time": "2025-08-17T00:20:06",
"upload_time_iso_8601": "2025-08-17T00:20:06.359519Z",
"url": "https://files.pythonhosted.org/packages/9a/67/efdba73d3f6285e404073aed0ec753d71f52d322c535c3cf5b2d0fe064bc/colcon_gephi-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fd3044359f2535e7e6fd496c165d25c1b91d8ba756fc45043faf70d62cb88fa9",
"md5": "2cab00d3bc7608f58f038ed307114914",
"sha256": "b8fd934e46489d59872eba4aa4a0b56310e2074a2632f36ddceb2481567b3285"
},
"downloads": -1,
"filename": "colcon_gephi-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "2cab00d3bc7608f58f038ed307114914",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9494,
"upload_time": "2025-08-17T00:20:07",
"upload_time_iso_8601": "2025-08-17T00:20:07.701786Z",
"url": "https://files.pythonhosted.org/packages/fd/30/44359f2535e7e6fd496c165d25c1b91d8ba756fc45043faf70d62cb88fa9/colcon_gephi-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-17 00:20:07",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "colcon-gephi"
}