Name | pipforester JSON |
Version |
1.0.1
JSON |
| download |
home_page | |
Summary | A tool to analyze the dependency graph of a pip package. |
upload_time | 2023-07-14 16:54:11 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | BSD 2-Clause License |
keywords |
pip
graph
analysis
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pipforester
Forester tools for [pipdeptree](https://pypi.org/project/pipdeptree/) outputs to analyze and cleanup the dependency graph of installed pip packages.
## Features
- clean up a graph to remove direct dependencies if a transitive dependency exists and output it as dot-file.
- detect transitive cyclic dependencies
- color them in the graph
- show them as separate graphs in one dot-file
- exit *pipforester* with exit code 1 if there are cycles detected
### Installation:
- Create an empty virtual environment, separate from the environment to work on.
- `pip install pipdeptree pipforester`
Dependent on your operation system you
- want to install a program to view dot-files, like [xdot](https://pypi.org/project/xdot/) i.e. with `apt install xdot` on Debian/Ubuntu-based systems.
- or use [graphviz](https://www.graphviz.org/) to convert dot-files to PNG/SVG.
## Usage
First, call *pipdeptree* on a virtual environment to create a JSON file of the installed dependencies,
and second call *pipforester* to create a cleaned-up dot file.
```shell
pipdeptree --python path/to/venv/bin/python -j >forest.json
pipforester -i forest.json -o forest.dot
```
Finally use a Graphviz DOT-file visualizer, i.e. *xdot* on Linux, to view the graph.
```
xdot forest.dot
```
Or use the *dot* command line program to generate an SVG or PNG:
```
dot -Tsvg -o forest.svg forest.dot
dot -Tpng -o forest.png forest.dot
```
To generate a graph containing only cyclic transitive dependencies, use the `--cycles` option:
```shell
pipdeptree -j >forest.json
pipforester -i forest.json -o forest.dot --cycles
```
To detect cyclic transitive dependencies and exit with `1` if there is at least one, use the `--check-cycles` option.
It does not generate an output graph and is meant for usage in CI.
```shell
pipdeptree -j >forest.json
pipforester -i forest.json --check-cycles
```
See `pipforester --help` for details.
## Changes
## 1.0.1 (2023-07-14)
- use transitive_reduction from the NetworkX module to speed up edge removal. [@gogobd]
### 1.0.0 (2023-05-16)
- fix the cyclic dependency display to show all edges of a cycle in dark violet. [@jensens]
- fix graph of cycles not to show graph multiple times. [@jensens]
### 1.0.0a1 (2023-05-15)
- initial code [@jensens]
# License
Copyright (c) 2022-2023, mxstack Contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Raw data
{
"_id": null,
"home_page": "",
"name": "pipforester",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "pip,graph,analysis",
"author": "",
"author_email": "Jens Klein et al <jk@kleinundpartner.at>",
"download_url": "https://files.pythonhosted.org/packages/58/e8/16f3bd48c69cef63b725f2bd418f5bce960a0e59ba3adb2fc1536fa378d7/pipforester-1.0.1.tar.gz",
"platform": null,
"description": "# pipforester\n\nForester tools for [pipdeptree](https://pypi.org/project/pipdeptree/) outputs to analyze and cleanup the dependency graph of installed pip packages.\n\n## Features\n\n- clean up a graph to remove direct dependencies if a transitive dependency exists and output it as dot-file.\n- detect transitive cyclic dependencies\n - color them in the graph\n - show them as separate graphs in one dot-file\n - exit *pipforester* with exit code 1 if there are cycles detected\n\n### Installation:\n\n- Create an empty virtual environment, separate from the environment to work on.\n- `pip install pipdeptree pipforester`\n\nDependent on your operation system you\n- want to install a program to view dot-files, like [xdot](https://pypi.org/project/xdot/) i.e. with `apt install xdot` on Debian/Ubuntu-based systems.\n- or use [graphviz](https://www.graphviz.org/) to convert dot-files to PNG/SVG.\n\n\n## Usage\n\nFirst, call *pipdeptree* on a virtual environment to create a JSON file of the installed dependencies,\nand second call *pipforester* to create a cleaned-up dot file.\n\n```shell\npipdeptree --python path/to/venv/bin/python -j >forest.json\npipforester -i forest.json -o forest.dot\n```\n\nFinally use a Graphviz DOT-file visualizer, i.e. *xdot* on Linux, to view the graph.\n\n```\nxdot forest.dot\n```\n\nOr use the *dot* command line program to generate an SVG or PNG:\n\n```\ndot -Tsvg -o forest.svg forest.dot\ndot -Tpng -o forest.png forest.dot\n```\n\nTo generate a graph containing only cyclic transitive dependencies, use the `--cycles` option:\n\n```shell\npipdeptree -j >forest.json\npipforester -i forest.json -o forest.dot --cycles\n```\n\nTo detect cyclic transitive dependencies and exit with `1` if there is at least one, use the `--check-cycles` option.\nIt does not generate an output graph and is meant for usage in CI.\n\n```shell\npipdeptree -j >forest.json\npipforester -i forest.json --check-cycles\n```\n\nSee `pipforester --help` for details.\n\n\n## Changes\n\n## 1.0.1 (2023-07-14)\n\n- use transitive_reduction from the NetworkX module to speed up edge removal. [@gogobd]\n\n### 1.0.0 (2023-05-16)\n\n- fix the cyclic dependency display to show all edges of a cycle in dark violet. [@jensens]\n- fix graph of cycles not to show graph multiple times. [@jensens]\n\n### 1.0.0a1 (2023-05-15)\n\n- initial code [@jensens]\n\n# License\n\nCopyright (c) 2022-2023, mxstack Contributors\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n list of conditions and the following disclaimer in the documentation and/or\n other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
"bugtrack_url": null,
"license": "BSD 2-Clause License",
"summary": "A tool to analyze the dependency graph of a pip package.",
"version": "1.0.1",
"project_urls": {
"Bug Reports": "https://github.com/collective/pipforester/issues",
"Homepage": "https://github.com/collective/pipforester",
"Source": "https://github.com/collective/pipforester/"
},
"split_keywords": [
"pip",
"graph",
"analysis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a76c961becc2c3b4631ef47725fde11250c2dfe3add6e0bf2b5c5329c963bf50",
"md5": "486c9a74d93e64a84c65109bb0704f41",
"sha256": "17ddb5a904c9ad70e6474f74cbdf757afcbc3c8188f51b94f0c5ce125d59af7f"
},
"downloads": -1,
"filename": "pipforester-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "486c9a74d93e64a84c65109bb0704f41",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5484,
"upload_time": "2023-07-14T16:54:09",
"upload_time_iso_8601": "2023-07-14T16:54:09.329904Z",
"url": "https://files.pythonhosted.org/packages/a7/6c/961becc2c3b4631ef47725fde11250c2dfe3add6e0bf2b5c5329c963bf50/pipforester-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "58e816f3bd48c69cef63b725f2bd418f5bce960a0e59ba3adb2fc1536fa378d7",
"md5": "577d464ecd84df6a3c85f58a9987c4c8",
"sha256": "b5e21bc33ddb0030d77f00e9cca72fd962d3a34915bfdfd8537d826372657c50"
},
"downloads": -1,
"filename": "pipforester-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "577d464ecd84df6a3c85f58a9987c4c8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 4970,
"upload_time": "2023-07-14T16:54:11",
"upload_time_iso_8601": "2023-07-14T16:54:11.907215Z",
"url": "https://files.pythonhosted.org/packages/58/e8/16f3bd48c69cef63b725f2bd418f5bce960a0e59ba3adb2fc1536fa378d7/pipforester-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-14 16:54:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "collective",
"github_project": "pipforester",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pipforester"
}