Git Product home page Git Product logo

davidhstocker / graphyne Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 1.36 MB

Graphyne is a smart graph - a property graph capable to actively reacting to changes and incorporating decision making logic, written in Python. It is designed to be easy to integrate into your Python projects, simple to use and very powerful. It uses Memetic as its graph definition and query language. It is capable of running with or without persistence.

License: Apache License 2.0

Python 99.76% JavaScript 0.24%
memes property-graph python python3 smart-graph smartgraph

graphyne's People

Contributors

davidhstocker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

python3pkg

graphyne's Issues

Not Throwing Exceptions.ScriptError when no script is installed

If the an entity exists in the catalog, but its meme is not derived from Memetic.DNA.Script or it has no valid script attached, then it currently throws a Exceptions.NoSuchEntityError exception; as if it were not there at all. This misinforms the user and developer as to the actual problem.

Graph.api.evaluateEntity() needs to throw a Exceptions.ScriptError exception in this case.

ValidationSatus.xhtml creation needs to be removedt

This is a transient, placeholder file. It has been many, many changelists (since long before Graphyne was forked as an independent project, from the Angela R<L interpreter project on sourceforge) since Graphyne created its validation results inside its own location. It now put them into ///Graphyne. The original purpose is to give a placeholder webpage to the designer while the repo was being validated.

1 - Unless the repo is massive, validation happens quickly.
2 - It is XHTML. How quaint!
3- Once I get around to making a tag and pypi setup, then this file will be generated within the python install path. This needs to be fixed BEFORE the first tag is made.

Need script command for Traverse Enumeration

Right now, it is very difficult to debug traverse queries. It requires the designer to run graphyne in debug mode and sift through the schema xml documents, to research the proper path and what would be expected. This is difficult, designer unfriendly and not possible with ad-hoc graphs. You can only do this if you defined the entire graph via schema and are not creating nodes via generic memes.

Graphyne needs a script command for returning the entities (and metadata) along a traverse path, along with their nearest neighbors.

Expand State Event List to include PropertyChanged and Link handling

Add three new event types to State Event list. This will let us execute a script whenever a property changes, a link is added or eliminated.

The following three entres need to be added to State Event Restriction:
propertyChange
linkAdded
linkRemoved

The following api methods will also need to trigger these events:
addEntityLink()
removeEntityLink()
addEntityDecimalProperty()
addEntityIntegerProperty()
addEntityListProperty()
addEntityStringProperty()
addEntityBooleanProperty()

addEntityLink needs to have parameter order changed

addEntityLink takes four parameters, two mandatory and two optional. entityUUID1 and entityUUID2 are mandatory. linkType is the third positional and the first optional. linkAttributes is the fourth positional and second optional.

linkType is a bit esoteric and its use case might not be a real world one. That is, I set up members of an entity in a schema with a subatomic link. They are visible when directly traversing from any of the entities created in this cluster, but the subatomic links are not traversed when travelling from the outside. They are effectively invisible to the rest of the graph.

This use case might be useful, sometime. linkAttributes are useful very often. It is poor API UX to have a (presumptively) commonly used optional parameter behind a rarely used one. The positions of these two need to be swapped, so that the order is:

entityUUID1, entityUUID2, linkAttributes, linkType

Problem with new versions of python?

Hello, I am wanting to test graphyne with python 3.7, is it a problem with the python version or the windows?

from graphyne import Graph
Traceback (most recent call last):
File "", line 1, in
File "c:\users\bios-pc\appdata\local\programs\python\python37\lib\site-packages\graphyne\Graph.py", line 30, in
from .DatabaseDrivers import SQLDictionary
ModuleNotFoundError: No module named 'graphyne.DatabaseDrivers'

No module named 'graphyne.DatabaseDrivers'

Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
Graphyne-1.2

Update getLinkCounterparts()

This api method is supposed to get all of the nearest neighbors of a given entity. It uses a different code clock than getLinkCounterpartsByType(), but there is no testcase and in any cases where the smoketest does check for all nearest neighbors, getLinkCounterpartsByType(entityID, "*") is used. The latter is the canonical method, as using the single wildcard for meme type yields every nearest neighbor.

getLinkCounterparts() needs to become a wrapper for getLinkCounterpartsByType(entityID, "*")

Add getCluster() method to API

getClusterMembers() returns a list of entities in the current entity's cluster. We need a method that returns the entity list and the link information, ideally in a format close t compatible with d3's Force Directed Graph ( d3.layout.force() ).

Memetic Repository Subpackages don't Support Script Content

Memetic packages may contain sub-packages.

E.g. you could have a Bar subfolder inside a Foo repository folder and import only the Foo folder. A meme from another repo would access meme XXX inside of Boo via “Foo.Bar.XXX”. Right now, Graphyne supports this if the content contains only templates, but not if the subpackages contain Python code. This is because Graphyne walks the folder structure of declared repository folders and adds each to the Python path individually. Python3 does not allow us to import Foo and then import Bar.

We need to look into adding the repositories to the Python path and then using absolute import paths to clean this up.

need a resetEntity method

Currently, in order to fully reset an entity to the original meme specification, you have to fire off two commands: , revertEntityPropertyValues and removeAllCustomPropertiesFromEntity. This is needlessly complex and we need a wrapper api method that fires off both.

Add/Remove/Update link attributes api command

Right now, link attributes are set when when a link is created between two entities. They are then frozen in time. This is not a critical showstopper... yet.

The Problems

1 - It could become a potential performance issue. Two entities may share n links. I can always add more links with new attributes. If I have a large number of link attributes, I may want to start condensing them where possible, in order to increase performance.

2 - Right now, updating a link is a two step process. use graph.api.removeEntityLink() to remove the existing link (filtering for the desired attribute) and then graph.api.addEntityLink(). What if the link has other attributes?

Gotchas and Things to Consider

We should not replace this workflow with another two step - get Link, update attribute - one. We're going to need an SQL style where clause; ideally using the same syntax that we already use with the link attribute filters of traverse paths.

"Humanize" the State Event Restriction List

Currently, the State Event Script uses a numeric Memetic restriction, 0, 1 or 2. This is in no way human readable and presents a UX problem for the designer. Currently from setStateEventScript()

            if state == 0:
                self.initScript = function
            elif state == 1:    
                self.execScript = function
            elif state == 2:    
                self.terminateScript = function  

These integer values should be strings:
initialization
execution
termination

This should be done before the first tag is created, so that we don't introduce incompatible changes.

Needs "Schemaless" Entity support

Right now, Graphyne is incapable of creating entities that are not already defined by a Memetic Meme. Memetic is awesome and all, but devs should be able to create a hello world graph without first writing XML, and presumably, they could get away with never, ever defining any schemas. We need to be able to define schemaless, generic entities at runtime, without a Memetic definition.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.