Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #12 from phovea/release_0.1.0
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
Samuel Gratzl authored Apr 5, 2017
2 parents 9f9dd90 + d665097 commit 5ef3609
Show file tree
Hide file tree
Showing 17 changed files with 304 additions and 77 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
# build config
*.npmignore text
*.bowerrc text
Dockerfile text eof=LF

# Heroku
Procfile text
Expand Down Expand Up @@ -123,4 +124,4 @@ AUTHORS text
# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).
# (among others).
38 changes: 22 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
language: python
sudo: required
env:
- TOXENV=py27
- TOXENV=py34

- TOXENV=py27
- TOXENV=py34
install:
- (!(test -f docker_packages.txt) || (cat docker_packages.txt | xargs sudo apt-get install -y))
- pip install -r requirements_dev.txt
- pip install -r requirements.txt

- "(!(test -f docker_packages.txt) || (cat docker_packages.txt | xargs sudo apt-get
install -y))"
- pip install -r requirements_dev.txt
- pip install -r requirements.txt
script: npm run dist

notifications:
slack:
secure: nDASe9U/8foQRcCed3gqmR4N5sKnZWvuogBWfF3rfxNdmkWhIlGgI1r+zzLHb9xJxPPX6hoq805t7NMkCPzb1Q46rZOSGxFTyiQnA/PCGe2ZUmV44f3ukIuy7ousqiylxvsbcTFzdaT64GjvrkThj/0VVGx4hldor6ggQIWngfZct5+JQB3L1Sn7g3JBMD3v2PGO77ziK/ps7uCJtvSlpaQMpxOiSC42O3oFU/giGYjXiggC10ztfSDGVNH0zm73FoQtVimzn6FkzqHzhOyTcMa9ehXm4FcO0TfYvnOJ3Ir/G80pHtc1KxoAh2c0daBpnNGqVPf12lqJ+9c7KwVx0csPPUvzeIG2G6Dn4lP891CDY03SOY/XtlzTQDvCTBDxgKSDbh9rxXM05eCdNk90h0Fi2lV0QnuJCBFjFDdVHKN3HIoUMHKCgYav5pOAiMA+WMIqk3BnkHsqVK1KHxDDxK4qK0xl6p75aiPvrBne/q67eLPfHC13mbDlexGy0sokOtN7S0HhW2oaTZ01t8ESUPGahknn0arBSiM88rPntgNTcWom2nfeqrbA0/cj7A9RXlh7NjDW4iUpLKDdlDnqNXtsUDPdyFqS0v1TfykOy/ladh2ktBvDZ2KfdLN7wktgE+P1Ebduja7Kv/dc54e8wc4t+vdXGbzb+cCXUjzbUwM=
on_success: change
on_failure: always
deploy:
provider: releases
- provider: releases
api_key:
secure: TK9/P34Bi3WuppiDrBCwVcn41yCBwmILaU8hXTBzUPbT7TbeFIwsC6/4CtH85Z+ZrUve4S5pTmWRNf2dQDxWw3uYu7+bJuemV2J1LHG76mognj+TNEiYxfLQUt3Gql4W7C7FcI4Rlx5/uMN9wY1wro8TWUBMwT6jjSrUWIvK3GXoojd5bHvJx07XpjWl9wCon4D0ruZiFoM2mdeP23lbc2GckETi32oEKswnQXxkMACmxbPzoWbvkxH4aK8Bt2Rj2sl2TbPhVkN6DAkHGkGAvLI+2/aRfG27+oo3OKsaDjbuGABct8TfZccJ970CbQ8kbnCjYxstvqkg1JWjF0W67sX/flBZZOEUA5l0OLWo6HqMGMxm7/lEQhIdPMsRmvXL+HVOxkMrB2dda58QzxVwiZp+rRqUaeabPZp8Kl5xodGrVxsBvxe6zAbJ5jCtCSumG6+kLyKI00/kYlghqQNrgUw0ZsYJlQ34h3lo/24QpaeyDpQoCkGWQgtgqiXGpeKSu7bCnOqIqAy3nbT9Utwj7K8gIasTG5idosEAz/THMampNbGDuyxxc340sYGNMg9Bhm1g2ILWRdtV470p5hwBtIDTKi3/PAizEO26+Wh0zI47Sg3ao57avcbCsTmzbZUeA5J4bojmchhJCHX8su9cSCGh/2fJA/1eBIgEvOQ8LNE=
secure: w39XcbAP1N2Y8QVlv4NL24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ILCGo/H/60NGHiSjrIv/Y9h6bQ9FDjo6TUyE4nbdPYN1RN9FQ5UbI9Y4Gi753H9mqnHWlEywBOzHxdZCAuz9Wh03CCF/blsvJ+Obbyo6Jrfe+g44jyi9kQdBNQ78qG6v4EXws8FiYao6x3PpgIwFix42Cpr+soAh5FpA3C1zHSAyZZpXF65/lrDl5yPNofK7Wy0B9bw+0I6Z/u7ZKFNVZXvYPGYvtUVcsALGBdmYc61+LCta36Po0KZseWVAlJj6QnOJDYzv0wvV/zsuf9A5KpYFGiqV9Q7zmtiO5FYF5sBy+lE7O9tHVO4O18IRndhRQgxhs=
on_success: change
on_failure: always
repo: phovea/phovea_data_mongo
- provider: pypi
user: caleydo-bot
password:
secure: e4v7ObSMoIejma3OSmJWvSKq74ejA2tnXgi4/3+rGwmVSe0S6LRkOT5bT/p4ZMYbnJFH4i83Y7RVtt61OA3EFxUiWxXg7MQ7FgvD4eHVbQeIiYbSbvkRImjz+kvlTT9+Jp6nq3/H5YoUKZ3uP+8Pk2XSX/vB7Aak60FNdi36TJRK4vfkeb3fVQ89OsJfMnHVJgHaphnAAMvodSBwOP+Y641QQTnVMcKxJwkIZUqXWHv7fl99ib0rDQ5AEJbvs+T1gLUaBANYe7OKkybkB496a4rnwUCKnZLVxAxhMSkf0lhGaA5F5iXXnnrHXFTTjMU/5NNdjiMfZKvT9IVJWw6cxA5euBY6OLedJiZUOhUSz0pK99hpsuiYrE2L+1gn6VIEUUEcJpkpYuDtfGqqbO2veOFrp6v/AxMKMpxGs5mXZl4dmOMmG4iGJnYu3CSX3iH/heAS3NgFCnI9CxfrhSXnXTdyUv1Gx5klhs7eysdcnE2tguZ+3/acrB9uVXQfs1iMNFc4130/Apkomk/TmlXQiYGWmMUqFnmGFzFA67XPx3G84SgelV/+5GeLQKln8+5SSNeLxDF9ya1JnfDnmRo7cTD1e4c60TeCI0Itv2+nrMtG9Cq4J1emeM8CsGG/TteydwHtQUEyBug+8mvFFuq0AFenY4OJiba8RAwgF3ik2Ok=
on:
tags: true
distributions: sdist bdist_wheel
repo: phovea/phovea_data_mongo
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npm run build
***

<a href="https://caleydo.org"><img src="http://caleydo.org/assets/images/logos/caleydo.svg" align="left" width="200px" hspace="10" vspace="6"></a>
This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform for developing web-based visualization applications. For tutorials, API docs, and more information about the build and deployment process, see the [documentation page](http://caleydo.org/documentation/).
This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform for developing web-based visualization applications. For tutorials, API docs, and more information about the build and deployment process, see the [documentation page](http://phovea.caleydo.org).


[phovea-image]: https://img.shields.io/badge/Phovea-Server%20Plugin-10ACDF.svg
Expand All @@ -40,5 +40,5 @@ This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform
[npm-url]: https://npmjs.org/package/phovea_data_mongo
[travis-image]: https://travis-ci.org/phovea/phovea_data_mongo.svg?branch=master
[travis-url]: https://travis-ci.org/phovea/phovea_data_mongo
[daviddm-image]: https://david-dm.org/phovea/phovea_data_mongo.svg?theme=shields.io
[daviddm-image]: https://david-dm.org/phovea/phovea_data_mongo/status.svg
[daviddm-url]: https://david-dm.org/phovea/phovea_data_mongo
51 changes: 51 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import shutil
from codecs import open
import json

__author__ = 'Samuel Gratzl'


def _git_head(cwd):
import subprocess
try:
output = subprocess.check_output(['git', 'rev-parse', '--verify', 'HEAD'], cwd=cwd)
return output.strip()
except subprocess.CalledProcessError:
return 'error'


def _resolve_plugin(repo, version):
import os.path
if os.path.isdir('.git') and repo:
if repo.endswith('.git'):
repo = repo[0:-4]
return repo + '/commit/' + _git_head('.')
# not a git repo
return version


def to_version(v):
import datetime
now = datetime.datetime.utcnow()
return v.replace('SNAPSHOT', now.strftime('%Y%m%d-%H%M%S'))


with open('package.json', 'r', encoding='utf-8') as f:
pkg = json.load(f)

name = pkg['name']
version = to_version(pkg['version'])
resolved = _resolve_plugin(pkg.get('repository', {}).get('url'), version)

# copy source code
shutil.rmtree('build/source/' + name, ignore_errors=True)
shutil.copytree(name, 'build/source/' + name, symlinks=False, ignore=shutil.ignore_patterns('*.pyc'))

# create buildInfo.json
build_info = dict(name=name, version=version, resolved=resolved, description=pkg['description'],
homepage=pkg.get('homepage'), repository=pkg.get('repository', {}).get('url'))

# TODO create build Info

with open('build/source/' + name + '/buildInfo.json', 'w', encoding='utf-8') as f:
json.dump(build_info, f, indent=2)
6 changes: 5 additions & 1 deletion deploy/docker-compose.partial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ services:
links:
- db_mongo:mongo
db_mongo:
image: mongo:3.2
image: mongo:3.2
volumes:
- db_mongo_data:/data/db
volumes:
db_mongo_data:
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/modules.rst
/phovea_server.rst

Empty file added docs/_static/touch.txt
Empty file.
Empty file added docs/_templates/touch.txt
Empty file.
126 changes: 126 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import sys
import os
import json
from codecs import open

sys.path.insert(0, os.path.abspath('..'))

with open('../package.json', encoding='utf-8') as json_data:
import json

pkg = json.load(json_data)

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_parsers = {
'.md': 'recommonmark.parser.CommonMarkParser',
}
source_suffix = ['.rst', '.md']

# The master toctree document.
master_doc = 'index'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['build', 'tests']

# General information about the project.
project = pkg['name']
copyright = pkg['license']
author = pkg['author']['name']

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = pkg['version']
# The full version, including alpha/beta/rc tags.
release = pkg['version']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = pkg['name'] + 'doc'

# Sort members by type
autodoc_member_order = 'groupwise'


# Ensure that the __init__ method gets documented.
def skip(app, what, name, obj, skip, options):
if name == '__init__':
return False
return skip


def setup(app):
app.connect('autodoc-skip-member', skip)


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
20 changes: 20 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. phovea_data_mongo documentation master file, created by
sphinx-quickstart on Tue Feb 7 19:42:32 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to phovea_data_mongo's documentation!
=========================================

.. toctree::
:maxdepth: 2
:caption: Contents:

modules

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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
{
"name": "phovea_data_mongo",
"description": "Data provider plugin for loading graph data stored in a MongoDB.",
"homepage": "https://phovea.caleydo.org",
"version": "0.1.0",
"author": {
"name": "The Caleydo Team",
"email": "[email protected]",
"url": "https://caleydo.org"
},
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/phovea/phovea_data_mongo/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/phovea/phovea_data_mongo.git"
},
"files": [
"phovea_data_mongo",
"__init__.py",
Expand All @@ -14,26 +31,9 @@
"pretest": "npm run check",
"test": "test ! -d tests || python setup.py test",
"predist": "npm run build && npm run docs",
"dist": "python setup.py bdist_egg",
"docs": "echo todo creating docs...",
"dist": "python setup.py bdist_egg && cd build && tar cvzf ../dist/phovea_data_mongo.tar.gz *",
"docs": "sphinx-apidoc -o docs -f ./phovea_data_mongo && sphinx-build ./docs build/docs",
"prebuild": "node -e \"process.exit(process.env.PHOVEA_SKIP_TESTS === undefined?1:0)\" || npm run test",
"build": "python -c \"from distutils.dir_util import mkpath ; mkpath('./build/source')\" && (tar -c ./phovea_data_mongo --exclude '*.pyc' | tar -xC build/source)"
},
"name": "phovea_data_mongo",
"description": "Data provider plugin for loading graph data stored in a MongoDB.",
"homepage": "https://phovea.caleydo.org",
"version": "0.0.5",
"author": {
"name": "The Caleydo Team",
"email": "[email protected]",
"url": "https://caleydo.org"
},
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/phovea/phovea_data_mongo/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/phovea/phovea_data_mongo.git"
"build": "python build.py"
}
}
3 changes: 2 additions & 1 deletion phovea_data_mongo/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"host": "mongo",
"port": 27017
"port": 27017,
"db": "graph"
}
Loading

0 comments on commit 5ef3609

Please sign in to comment.