This tool assists SysML API developers in tracing and visualizing the highly nested relationships within a SysML v2 model. It uses a Python script and Jupyter notebooks to generate interactive network graphs that display these relationships.
- An Anaconda environment is recommended for managing dependencies.
- Ensure a SysMLv2 Pilot Implementation API server is set up and accessible.
-
Clone this repository to your local machine.
-
Create a new conda environment:
conda create --name sysmlv2_vis python=3.8
-
Activate the newly created environment:
conda activate sysmlv2_vis
-
Install the required dependencies:
pip install -r requirements.txt
- Navigate to the
/notebooks
directory. - Open
simple_constraint_model.ipynb
with Jupyter Notebook or JupyterLab. - Follow the instructions within the notebook to create and publish the sample SysMLv2 model to your SysMLv2 Pilot Implementation API server.
- Still within the
/notebooks
directory, openquery_full_model.ipynb
. - Execute the notebook to query the simple model you previously published.
- The results of this notebook will be saved to
/data/query_results.json
. Keep the models simple to limit the size of the NetworkX graph.
-
Using the Python Script: Run the
sysml_graph.py
script. Upon completion, an interactive Plotly graph will be saved to/html_out/sysmlv2_network_graph.html
and automatically opened in your web browser for review. -
See an active plotly graph here https://nbviewer.org/github/avianinc/sysml_tracer/blob/main/notebooks/build_sysml_graph.ipynb
-
Using a Jupyter Notebook: Open
build_sysml_graph.ipynb
in the/notebooks
folder. This notebook replicates the capability of thesysml_graph.py
script, presenting the Plotly image within a notebook cell. A link to nbviewer online is provided for an example graph since Plotly network graphs do not render when committed to Git.
The purpose of this tool is to simplify the process of tracing the highly nested relationships of a SysMLv2 model for API developers. Limit the size of the NetworkX graph by keeping models simple to ensure efficient processing and visualization.
For further details or support, please refer to the official documentation of each tool and library used within this project.