Skip to content

Commit

Permalink
Merge pull request #50 from marionleborgne/make-buildable
Browse files Browse the repository at this point in the history
Make buildable and create entrypoint for subcommands
  • Loading branch information
willwnekowicz committed Aug 31, 2015
2 parents a60d850 + 25c3cf8 commit 95d6f98
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 191 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.pyc
.env
cloudbrain/subscribers/bin/osx
cloudbrain/subscribers/bin/ubuntu
cloudbrain/publishers/bin/osx
Expand Down
376 changes: 188 additions & 188 deletions LICENSE.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include README.md LICENSE.txt
33 changes: 33 additions & 0 deletions cloudbrain/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import argparse
import subprocess
import sys

import cloudbrain.publishers.sensor_publisher

def publish(args):
sys.argv = args or ['-h']
cloudbrain.publishers.sensor_publisher.main()

def subscribe(args):
return NotImplemented

def parse_args():
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()

publish_parser = subparsers.add_parser('publish',
help="Publish data stream - For example: cloudbrain publish --mock -n muse -i octopicorn")
publish_parser.set_defaults(func=publish)

subscribe_parser = subparsers.add_parser('subscribe',
help="Subscribe to data stream - For example: cloudbrain subscribe -n muse -i octopicorn")
subscribe_parser.set_defaults(func=subscribe)

args, unknown = parser.parse_known_args()
args.func(unknown)

def main():
parse_args()

if __name__ == "__main__":
main()
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-e [email protected]:marionleborgne/cloudbrain.git@01629005fda226b36dfe8d91f97cb821c72b739a#egg=cloudbrain-make-buildable
pika==0.9.14
pyliblo==0.9.2
wheel==0.24.0
16 changes: 13 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@ def read(fname):


setup(name="cloudbrain",
version="0.0",
description="CloudBrain",
version="0.2.0",
description="Platform for real-time sensor data analysis and visualization.",
packages=find_packages(),
install_requires=['pika', 'pyliblo'],
long_description=read("README.md"))
include_package_data=True,
long_description=read("README.md"),
license='GNU Affero General Public License v3',
classifiers=[
'License :: OSI Approved :: GNU Affero General Public License v3'
],
entry_points = {
'console_scripts': [
'cloudbrain = cloudbrain.run:main'
]
})

0 comments on commit 95d6f98

Please sign in to comment.