Git Product home page Git Product logo

sinap-ide's Introduction

Build Status

Project: Sinap

https://2graphic.github.io/
Created October 10, 2016

Example BFS

Founded by:

  • Sheyne Anderson
  • CJ Dimaano
  • Dyllon Gagnier
  • Daniel James

Command Line Tools

Sinap-CLI provides command line tools that operate on Sinap plugins and graph files.

Installing Sinap-CLI:

npm install -g sinap-cli

Sinap-CLI example:

$ sinap-run plugins/nfa examples/SimpleNFA.sinap 111222
true

More information can be found at sinap-cli.

Building and running Sinap-IDE

Step 1: Installing npm

Sinap-IDE is developed using Typescript, Angular4, and npm. Make sure you have npm version 4.2 or greater installed:

npm -v

If you don't have npm installed, you can find it along with nodejs here:

https://nodejs.org/en/download/

Note: for Linux developers, it is recommended to install npm and nodejs via the package manager.
Debian users

sudo apt-get install npm

Fedora/CentOS users
You may have to enable the epel repository before you can install npm:

sudo yum install epel-release

Install npm:

sudo yum install npm

If your version of npm is not at least 4.2, you must update it.

Note: there are various resources across the internet for updating npm and nodejs for your flavor of OS, so no discussion will be included here.

Step 2: Installing dependencies and building

Navigate to the project root directory:

cd /path/to/sinap-ide

Install dependencies:

npm install

Build the vendor DLL:

npm run build:dll

Note: Every time dependencies in vendor.ts are updated or the build directory is cleaned out, the vendor DLL must be rebuilt.

Build the project:

npm run build

It may be more convenient to have continuous building while actively coding:

npm run build:watch

This rebuilds the project any time one of the source files is changed.

Step 3: Running the development build

Run the development build with:

npm start

Note: other npm scripts exist such as npm run build:start, npm run clean, etc. Refer to package.json for a list of available npm scripts.

Note: cloning the Sinap-IDE repository does not come bundled with any plugins. To include some of the plugins available from 2graphic, use git submodule.

git submodule init
git submodule update

Packaging Sinap-IDE

Packaging Sinap-IDE requires at least nodejs 7. Check your version of nodejs before attempting to package:

node -v

If you don't have nodejs or don't have the correct version, see the notes in Step 1 of Building and running Sinap-IDE.

Package Sinap-IDE for deployment with:

node package.js

This builds and packages production versions of Sinap-IDE for Linux, Mac, and Windows. To package Sinap-IDE for a particular OS, use:

node package.js PLATFORM

where PLATFORM is one of linux, win32 (Windows), darwin (OSX), mas, or all (default).

Note: it is possible to package Sinap-IDE with debugging but not recommended. Use the following to package with debugging:

node package.js PLATFORM debug

Development Notes

Starting Points

app/index.ts = Starting point for Electron application.
app/main.ts = Starting point for Angular 2 application.
app/main.module.ts = Our module for the Sinap IDE
app/vendors.ts = Import all libraries we're using. These are built into a Webpack DLL with npm run build:dll

sinap-ide's People

Contributors

cj-dimaano avatar danielscottjames avatar sheyne avatar slaymaker1907 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

alberpad

sinap-ide's Issues

Update hit detection.

Hit detection needs to be updated for the new bezier edges. Either use the technique of mapping drawables to hit functions or utilize the native canvas hit regions.

Make Edges Directed

Right now they are just straight lines with no direction indicated. Simply make sure that it is an arrow instead of a line.

Files Panel

This lists files in the current directory similar to Atom or Visual Studio Code.

Unit Testing

Users should be able to write reusable tests as well as execute them on a graph. This fulfills part of the requirements of issue #7

Main Menu

This is the menu responsible for standard menu stuff like saving, loading, exporting, etc. While it is marked for the Prototype, it is an optional feature at that stage but is required for Alpha.

Plugin Group Declaration

A plugin should be able to declare itself as as part of a group of plugins (such as the formal languages and automata package (FLAP) group). This fulfills part of issue #1

Custom component rendering.

The graph editor needs to be able to handle user-defined drawing behavior for nodes and edges in addition to styling properties.

Save/Load graphs

There should be menu actions for saving and loading a graph. Relates to #16 #3. Needs to deal with the bridge between electron and angular to access the file system.

Command Line Interface

This will be a command line version of the JavaScript api in issue #8 for enabling easy use from other programming languages besides JavaScript.

Graph Editor Cosmetic Changes

Non-black borders look weird on my machine. It looks like it always draws a black border before drawing the colored border.

Selection messes with the look of a node/edge. Makes preview difficult. So for selected entities, draw a blue "shadow" (or larger thickness edge) and then draw the node/edge with no change to its styling on top.

Plugin API

Plugins should be able to be written in order to handle graph based programming languages that Sinap was not originally designed for.

Document Panel

This panel is the comprised of the graph editor and has tabs to indicate multiple open documents.

Graph Editor

This component is responsible for rendering and manipulating graphs and will directly manipulate the HTML canvas rather than being itself written in HTML.

Visual indication of valid edge creation.

When the user wants to create or move an edge, there needs to be some visual feedback indicating whether or not the edge can be successfully moved or created on the destination node.

Graph Editor - Select When Dragging

I think it’d make sense if when dragging an element it selects it before. Currently it selects an element on mouseup when you’re done dragging. (Or, don't select an element if just dragging it.)

Fix copy/paste.

Copy/paste shortcuts behave weird within electron. Without menu items for these, the functionality doesn't work.

Initial Edge creation throw

The lines:

    let rect = makeRect(
      e.source.x, e.source.y,
      e.destination.x, e.destination.y
    );

in drawEdge of graph-editor.component throw an error the first time an edge is created.

Change edge creation behavior.

Currently an edge is created by clicking and holding on a node for some delay. Change the implementation so that an edge can be created by clicking from some border region around the edge of a node. The region should be highlighted in some way to indicate that an edge will be created if clicked from within.

Input/Output Panel

This panel is responsible for things like tests as well as the REPL interface for interpreters.

File Format for Graphs

Graphs will be represented as a list of nodes and edges in JSON with any semantic properties contained therein.

If possible, two semantically equivalent graphs should have the identical serialization. However, if that is not possible, then they should be as diffable as possible (such as through using UUIDs instead of an incremental id).

This fulfills part of issue #1

JavaScript Sinap Interfaces

These interfaces are to be written for easy scripting and use of existing interpreters (for instance a headless Jenkins automated test server). This will be closely related to the plugin API ( issue #1 ) but differs in emphasis. This API will be focused at generating and running Sinap programs using given plugins.

Properties Panel

This panel displays the current properties of a selected component such as whether a node is a start/end node for automata.

Graph Description

Graphs should be able to describe various things about nodes, edges, as well as entire graphs such as what comprises a valid graph entity and the type of input to a graph.

Selection box hit testing needs to work on any part of any component.

Currently the selection box only works on nodes and only selects a node if the center of the node is in the selection box. Any edges connected to the selected node are also added to the selection set.

The selection box needs to be able to add components to the selection set if any part of a component is within the select region. E.g. if an edge passes through the select region, it should be added to the selection set.

Basic Plugin Description

Plugins should be able to describe various metadata properties about themselves such as name, version, author, licence, etc. This fulfills part of issue #1

Areas that need redesign after the prototype (now)

  1. Everything to do with computed properties on PropertiedEntities
  2. The interface for a graph that's passed to interpreters
  3. graph.ts, specifically the handler argument that most constructors take
    and the way that changes are detected and propagated.

REPL for I/O

This component should accept some input from the user and immediately evaluate the input, displaying the result (similar to a REPL in Python, LISP, etc.). This fulfills part of issue #7

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.