-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from marionleborgne/make-buildable
Make buildable and create entrypoint for subcommands
- Loading branch information
Showing
6 changed files
with
240 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include README.md LICENSE.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters