Make graphs of HasProperties class networks
Project description
properties-inheritance-graph
----------------------------
[![pypi](https://img.shields.io/pypi/v/properties-inheritance-graph.svg)](https://pypi.org/project/properties-inheritance-graph)
[![travis](https://travis-ci.org/seequent/properties-inheritance-graph.svg?branch=master)](https://travis-ci.org/seequent/properties-inheritance-graph)
[![codecov](https://codecov.io/gh/seequent/properties-inheritance-graph/branch/master/graph/badge.svg?token=yyj42i2C5k)](https://codecov.io/gh/seequent/properties-inheritance-graph)
The purpose of this library is to quickly and easily create UML graphs
that show inheritance structure of `HasProperties` class hierarchies.
For more information on `HasProperties` classes, see
[properties](https://github.com/seequent/properties).
To install
```
pip install properties_inheritance_graph
```
then in Python
```python
from properties_inheritance_graph import make_graph
import omf # or any other library built on properties
graph, registry = make_graph(
registry=omf.PointSetElement._REGISTRY,
expand_props=True,
only_new_props=True,
abstract_regex='^.*Model$',
)
```
In the above example, the properties-based [OMF](https://github.com/gmggroup/omf)
library is used for demonstration.
To render these graphs to file or in a Jupyter notebook, you may use
[nxpd](https://github.com/chebee7i/nxpd). [Graphviz](https://graphviz.gitlab.io/)
must also be installed.
```python
import nxpd
nxpd.draw(graph, filename='inheritance_graph.png')
```
![Inheritance Graph](https://raw.githubusercontent.com/seequent/properties-inheritance-graph/master/docs/inheritance_graph.png)
----------------------------
[![pypi](https://img.shields.io/pypi/v/properties-inheritance-graph.svg)](https://pypi.org/project/properties-inheritance-graph)
[![travis](https://travis-ci.org/seequent/properties-inheritance-graph.svg?branch=master)](https://travis-ci.org/seequent/properties-inheritance-graph)
[![codecov](https://codecov.io/gh/seequent/properties-inheritance-graph/branch/master/graph/badge.svg?token=yyj42i2C5k)](https://codecov.io/gh/seequent/properties-inheritance-graph)
The purpose of this library is to quickly and easily create UML graphs
that show inheritance structure of `HasProperties` class hierarchies.
For more information on `HasProperties` classes, see
[properties](https://github.com/seequent/properties).
To install
```
pip install properties_inheritance_graph
```
then in Python
```python
from properties_inheritance_graph import make_graph
import omf # or any other library built on properties
graph, registry = make_graph(
registry=omf.PointSetElement._REGISTRY,
expand_props=True,
only_new_props=True,
abstract_regex='^.*Model$',
)
```
In the above example, the properties-based [OMF](https://github.com/gmggroup/omf)
library is used for demonstration.
To render these graphs to file or in a Jupyter notebook, you may use
[nxpd](https://github.com/chebee7i/nxpd). [Graphviz](https://graphviz.gitlab.io/)
must also be installed.
```python
import nxpd
nxpd.draw(graph, filename='inheritance_graph.png')
```
![Inheritance Graph](https://raw.githubusercontent.com/seequent/properties-inheritance-graph/master/docs/inheritance_graph.png)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for properties-inheritance-graph-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 485cde460123bce8b488fae2c00bf79d3b59bfa0663f14426e09d921beeafa11 |
|
MD5 | 7ae3d5efb2d1e336f96bf3c7322c1e2f |
|
BLAKE2b-256 | b3a125c12aabe8a5486bc309360855984c677f6005dbadb93d5d7ab64061b955 |
Close
Hashes for properties_inheritance_graph-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f5be0ec753592aa5eff4e085d8c9a2c9bfbbc9f264b935b459553be0e2d4a21 |
|
MD5 | 590b68a630a5d5b1839ac22f7d8d88be |
|
BLAKE2b-256 | 08502d223e13dd757457ef07b9baa07cb8f4e337dc2360d86d07ca702bb2f5ee |