Skip to content

Commit

Permalink
Fully integrate mxGraph 3.7.2 without dependencies.
Browse files Browse the repository at this point in the history
Fix #90 Fix #89
  • Loading branch information
Daniel Pollithy committed Aug 10, 2017
1 parent 7903b54 commit 69e2c3e
Show file tree
Hide file tree
Showing 225 changed files with 105,494 additions and 3 deletions.
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ install:
- ps: Install-Product node 6 x64
- git reset --hard HEAD
- npm install npm -g
- npm install -g grunt
- npm install electron-builder@next # force install next version to test electron-builder
- npm install
- npm prune
Expand Down
Binary file added docs/heatmap_performance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sphinx/_build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/sphinx/_build/doctrees/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/sphinx/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 342b41b28a66df2942a4913900c98b00
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file.
66 changes: 66 additions & 0 deletions docs/sphinx/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.. TransliterationApplication documentation master file, created by
sphinx-quickstart on Wed May 31 15:08:02 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to TransliterationApplication's documentation!
======================================================

This is a **technical documentation** of the components and how to use them.
It powers ~well written "articles" on general questions. See Articles_ section.

There is also an **API description** here:

`<https://danielpollithy.github.io/TransliterationApplication/api/>`_

Contents
--------

.. toctree::
:maxdepth: 2

sources/Deployment
sources/Configuration
sources/Heatmap
sources/Download
sources/CHANGELOG


Articles
========

The following article list will give you a good insight in all the knowledge about this application.

It is going to cover

- "Basic data flow description"
- "How mxGraph was modded",
- "Codec.js - mxGraph XML -> GraphML -> Neo4J",
- "The express.js server",
- "Pug templates",
- "Data storage XML and images",
- "Exif data extraction",
- "Electron application",
- "How to build the electron application cross platform",
- "Why Electron"
- "Could the server be used as a standalone?",
- "How does the autocomplete function work",
- "Asynchronous tests with mocha.js and chai.js"
- "About the code coverage"
- "Extending the mxGraph Editor"
- "What is not implemented"
- "Next steps"

Maybe
- "App performance struggle: Million of nodes, thousands of images and a lot of properties"
- "Codec.js - What is the biggest XML-Graph it can convert to Neo4J?"
- "A question of complexity: Cypher vs SQL for transliteration analyzes"
- "The use case of this application"

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

7 changes: 7 additions & 0 deletions docs/sphinx/_build/html/_sources/sources/CHANGELOG.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CHANGELOG
=========

make a list of changes connected and linked to by Downloads.rst

Keep track of Versions (link to semantic versioning)

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Configuration
=============

200 changes: 200 additions & 0 deletions docs/sphinx/_build/html/_sources/sources/Deployment.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
Deployment
==========

Deployment automation
---------------------

Since this project needs to be build on multiple platforms it is a good idea to not just run tests automated
but also use **TRAVIS-CI** and **AppVeyor** to build and deploy the application.
The configuration files can be found in the root directory of the repository.

Travis is used for linux 32bit and 64bit builds and AppVeyor for both architectures for windows (called win32).
See Deployment-Travis or Deployment-AppVeyor for configuration and documentation.

- `Deployment on Travis-CI`_


Trigger an automatic build
..........................

A build shall only be triggered on tag push. This is how to do this:
- Tag the commit in Git by :code:`git tag -a v0.0.0 -m "Release 0.0.0"`
- Push the tag :code:`git push origin v0.0.0`

Now the build triggers automatically the deployment to github releases.
After some minutes there is a new release on the GitHub-Page with the zipped applications attached.

How to Deploy manually
----------------------

If you made a change to the code and want to ship this change in an electron app
follow this procedure

- Tag the commit in Git by :code:`git tag -a v0.0.0 -m "Release 0.0.0"`
- Push the tag :code:`git push origin v0.0.0`
- Package the electron app for your platform with :code:`electron-packager`
- If you haven't done so, install :code:`electron-packager` globally: :code:`npm install -g electron-packager`
- If you are on the OS that you want to target with the build execute :code:`electron-packager`
(consulate the documentation of electron-packager)
- Compress the created folder. Example for linux: :code:`zip -r [archive-name].zip [name of the folder]`
- Navigate to the releases tab of the github repository
- Edit your release: Add the compressed archive.
- Add the release to the download section of the documentation
- Describe the changes made in the CHANGELIST of the documentation


Deployment on Travis-CI
-----------------------

This is an explanation of the configuration and how the workflow works.
If you know Travis-CI this will be boring.

What is Travis-CI
.................

It is a CI (continuous integration) provider that is free to use for public git repositories.
It provides virtual machines that can automatize jobs for you, e.g. run your unit tests or test your code with various
code versions and a lot more.

Setup Travis-CI
...............

It is easily setup if you have a github account.
You can use the github account as a single sign on for Travis-CI.org.
There you activate the wanted repository in the overview.

After you set that up, every time you push to the master branch Travis will start to work for you.

What does Travis do?
....................

He (look at the logo) will pull our code and look for a configuration file called :code:`.travis.yml`.
This file contains all the things we want Travis to do for us.

In our case this is:
- downloading and installing the latest neo4j-community server
- install all other dependencies
- run the tests
- build the electron application and package it
- deploy the package to github releases (if the release doesn't exist so far, he will create one)

Detailed description of the Configuration
.........................................

In Line 22 there is the installation script for neo4j triggered. This will only work on unix systems.

In Line 40 you see there is a BASH variable. If you want to use this deploy configuration
you have to go to github.com, login into your account, from there create an access token with the
option "repo" ticked and copy paste the generated token into the environment variables in the TRAVIS
web frontend. **Don't forget to activate encryption for this variable** or else everyone can access
your with ease.

.. code-block:: yaml
:linenos:
:emphasize-lines: 22, 40
osx_image: xcode7.3
sudo: required
dist: trusty
language: c
matrix:
include:
- os: osx
- os: linux
env: CC=clang CXX=clang++ npm_config_clang=1
compiler: clang
cache:
directories:
- node_modules
- "$HOME/.electron"
- "$HOME/.cache"
addons:
apt:
packages:
- libgnome-keyring-dev
- icnsutils
before_install:
- ./install_neo4j.sh
- mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([
"$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz
| tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi
install:
- nvm install 6
- npm install electron-builder@next
- npm install
- npm prune
script:
- npm run release
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
deploy:
provider: releases
api_key: "$GH_TOKEN"
file_glob: true
file: "*.zip"
skip_cleanup: true
on:
tags: false
Deployment on AppVeyor
----------------------

AppVeyor provides a similar service to Travis-CI but is focused on windows.
So they provide a **Power shell** on a win32 host system you can configure.

You have to put a :code:`appveyor.yml` file into the base dir of the repo which
might look like this.

This configuration excludes the test because we already ran the tests on travis
and at the moment you are going to have a hard time installing neo4j into their machines.

.. code-block:: yaml
:linenos:
:emphasize-lines: 22, 40
version: 0.1.{build}
platform:
- x86
- x64
cache:
- node_modules
- app\node_modules
- '%APPDATA%\npm-cache'
- '%USERPROFILE%\.electron'
init:
- git config --global core.autocrlf input
install:
- ps: Install-Product node 6 x64
- git reset --hard HEAD
- npm install npm -g
- npm install electron-builder@next # force install next version to test electron-builder
- npm install
- npm prune
build_script:
- node --version
- npm --version
- npm run release
test: off
deploy:
release: TransliterationApplication-v$(appveyor_build_version)
description: 'TransliterationApplication'
provider: GitHub
auth_token:
secure: QBn6bw8znM2WsrG32eTzA55Iu0iE6oymujVBos6XFUldN/biNahd6Csr6d9Y4u+E
artifact: '**\*.zip' # upload all NuGet packages to release assets
draft: true
prerelease: true
on:
branch: master # release from master branch only
Empty file.
Loading

0 comments on commit 69e2c3e

Please sign in to comment.