Welcome to HyperMorph

Fully operational Python API for information management and in-memory data transformations-analytics on Associative Semiotic Hypergraph Development Framework. Watch the demo, are you speechless ? Powered by:

png

png

Know more Install

Speechless HyperMorph Screencast

What if you can …

Hypermorph speaks for itself

Watch the demo, check youtube settings and make sure video quality is at 1080p HD. You may also set the playback speed at 0.75 to increase the time of executing commands.

Now you know that you can and the only limit on what you can is your imagination.

Installation

Table of Contents

Native Installation Guide

Current release of Hypermorph is dependent on Python graph-tool package. Generally speaking graph-tool native installation is not easy because it has many C++ dependencies which are not installable via Python-only package management systems such as pip. Your best option is to use either a Docker image, we have not built one with HyperMorph yet, or use the Conda package manager for both GNU/Linux and MacOS, via conda-forge. This is included in requirements_conda.txt (see install dependencies).

Python Environment

HyperMorph is written in Python 3. We recommend you create a virtual environment with the latest Anaconda 64-Bit Python 3.8 distribution.

Anaconda Environment Setup

    conda create --name hmorph python=3.8
    conda activate hmorph
    python -m site

You can also add command conda activate hmorph at the end of .bashrc file

Install HyperMorph package

    pip install hypermorph
    ln -s ~/anaconda3/envs/hmorph/lib/python3.8/site-packages/hypermorph HyperMorph

Install dependencies

    cd HyperMorph
    conda install --file requirements_conda.txt
    pip install -r requirements_pip.txt

Test Package Installation

    pip install ipython
    ipython

copy and paste the following commands in IPython console and examine the output

from hypermorph import MIS
mis = MIS(debug=1, rebuild=True, warning=False, net_name='demo_schema', net_format='gt', net_path='data/DemoData/Schemata')

HyperMorph v0.1
Operational API for information management and data transformations on Associative Semiotic Hypergraph Development Framework
(C) 2015-2020 Athanassios I. Hatzis

Python 3.8.5 | packaged by conda-forge | (default, Aug 21 2020, 18:21:27) 
[GCC 7.5.0] on linux
Session Started on  Wed, 26 Aug 2020 08:48:02 +0000


Please wait, rebuilding metadata graph schema ...

 Done.

get an overview of the subsystems

mis.overview

Out[1]: 
                nid                                        cname alias ntype ctype  counter
dim4 dim3 dim2                                                                             
0    0    0       0   *** HyperMorph METADATA CATALOG SYSTEM ***   MMS   SYS   SYS        4
1    0    0       1  *** HyperMorph DATA RESOURCES Subsystem ***   DRS   SYS    DS        0
2    0    0       2     *** HyperMorph DATA MODELS Subsystem ***   DMS   SYS    DM        0
3    0    0       3     *** HyperMorph HYPER LINKS Subsystem ***   HLS   SYS    HL        0
4    0    0       4    *** HyperMorph SCHEMA LINKS Subsystem ***   SLS   SYS    SL        4

save your schema

mis.save()
'/home/vagrant/anaconda3/envs/hmorph/lib/python3.8/site-packages/hypermorph/data/DemoData/Schemata/demo_schema.gt'

If you did not get any warnings or errors, HyperMorph package and its dependencies have been succesffully installed. Congratulations you have completed successfully the installation guide. Now you may continue testing with our demo guide or see a draft of the documentation for the project.

Demo Test

Python Scripts

Change to the location of HyperMorph package

ln -s ~/anaconda3/envs/hmorph/lib/python3.8/site-packages/hypermorph HyperMorph
cd HyperMorph

If you have followed our installation guide you can find the script files at

ls -lh ~/HyperMorph/demo

otherwise look at the /site-packages/hypermorph/demo folder of your environment.

Add Resources

Open demo/add_resources.py and execute commands.

Warning: net_path parameter is assigned a relative path

from hypermorph import MIS

# rebuild TRIADB Schema
mis = MIS(debug=1, rebuild=True, warning=False,
          net_name='demo_schema', net_format='gt', net_path='data/DemoData/Schemata')

If you want to add those MySQL database resources included with the demo then you have to restore them in your MySQL DBMS (see create/restore databases). Or change the parameters of the add() command accordingly to use your own data resources.

Alternatively you may also execute the whole script and create HyperMorph Schema python demo/add_resources.py

HyperMorph v0.1
Operational API for information management and data transformations on Associative Semiotic Hypergraph Development Framework
(C) 2015-2020 Athanassios I. Hatzis

Python 3.8.5 | packaged by conda-forge | (default, Aug 21 2020, 18:21:27) 
[GCC 7.5.0] on linux
Session Started on  Wed, 26 Aug 2020 11:36:34 +0000


Please wait, rebuilding metadata graph schema ...

 Done.

Create databases

sudo mysql

    GRANT ALL PRIVILEGES ON *.* TO 'demo'@'localhost' IDENTIFIED BY 'demo';
    CREATE DATABASE SPC;
    CREATE DATABASE Northwind;
    CREATE DATABASE TRIADB;
    USE TRIADB;
    CREATE TABLE Nodes (id int DEFAULT NULL);
    CREATE TABLE Edges (id int DEFAULT NULL);

Restore databases from SQL dump files

cd ~/HyperMorph/data/MySQLDumps
mysql -u demo -pdemo SPC < dump-SPC-201909050814.sql
mysql -u demo -pdemo Northwind < dump-Northwind8Entities-201909061113.sql

Other Demo Scripts

A quick review on other scripts included in the demo folder of the distribution.

Script file Description
operations_schema.py Commands for fetching metadata from HyperGraph Schema. You must create a schema first see add_resources.py
operations_data.py Commands to fetch data from data resources that have been included in the Schema. You must create a schema first see add_resources.py
add_aset_from_additional_data_resource.py Creates Associative Entity Set (ASET) from a extra data resource that is added on the fly. The script requires that you download Physician_Compare.fr.gz file and extract it inside ~/HyperMorph/data/DemoData/Feather/Physicians folder.
operations_aset.py Operations in normal filtering mode or in associative filtering mode
video_scenario.py This is the script for the screencast demo
# Comment out
# from graph_tool.draw import graph_draw, sfdp_layout, fruchterman_reingold_layout, arf_layout, radial_tree_layout
#
# you will not be able to run graph_draw() commands