From 3634d6aee26407b23d600b9ee6e2ffee7eb976d4 Mon Sep 17 00:00:00 2001 From: Szucs Krisztian Date: Tue, 31 Jan 2017 10:10:56 +0100 Subject: [PATCH 1/2] rename satyr -> mentor --- README.md | 60 +++++++++---------- {satyr => mentor}/__init__.py | 2 +- {satyr => mentor}/apis/__init__.py | 0 {satyr => mentor}/apis/futures.py | 0 {satyr => mentor}/apis/multiprocessing.py | 0 {satyr => mentor}/apis/tests/test_futures.py | 6 +- .../apis/tests/test_multiprocessing.py | 8 +-- {satyr => mentor}/binpack.py | 0 {satyr => mentor}/executor.py | 0 {satyr => mentor}/interface.py | 0 {satyr => mentor}/messages.py | 4 +- {satyr => mentor}/protobuf.py | 0 {satyr => mentor}/proxies/__init__.py | 0 {satyr => mentor}/proxies/executor.py | 0 {satyr => mentor}/proxies/messages.py | 0 {satyr => mentor}/proxies/scheduler.py | 0 .../proxies/tests/test_executor_proxies.py | 4 +- .../proxies/tests/test_message_proxies.py | 2 +- .../proxies/tests/test_scheduler_proxies.py | 4 +- {satyr => mentor}/queue.py | 0 {satyr => mentor}/scheduler.py | 0 {satyr => mentor}/tests/sample.proto | 0 {satyr => mentor}/tests/sample_pb2.py | 0 {satyr => mentor}/tests/test_binpack.py | 4 +- {satyr => mentor}/tests/test_executor.py | 6 +- {satyr => mentor}/tests/test_framework.py | 10 ++-- {satyr => mentor}/tests/test_messages.py | 6 +- {satyr => mentor}/tests/test_protobuf.py | 2 +- {satyr => mentor}/tests/test_queue.py | 14 ++--- {satyr => mentor}/tests/test_scheduler.py | 6 +- {satyr => mentor}/tests/test_utils.py | 2 +- {satyr => mentor}/utils.py | 0 setup.py | 8 +-- 33 files changed, 74 insertions(+), 74 deletions(-) rename {satyr => mentor}/__init__.py (85%) rename {satyr => mentor}/apis/__init__.py (100%) rename {satyr => mentor}/apis/futures.py (100%) rename {satyr => mentor}/apis/multiprocessing.py (100%) rename {satyr => mentor}/apis/tests/test_futures.py (93%) rename {satyr => mentor}/apis/tests/test_multiprocessing.py (92%) rename {satyr => mentor}/binpack.py (100%) rename {satyr => mentor}/executor.py (100%) rename {satyr => mentor}/interface.py (100%) rename {satyr => mentor}/messages.py (97%) rename {satyr => mentor}/protobuf.py (100%) rename {satyr => mentor}/proxies/__init__.py (100%) rename {satyr => mentor}/proxies/executor.py (100%) rename {satyr => mentor}/proxies/messages.py (100%) rename {satyr => mentor}/proxies/scheduler.py (100%) rename {satyr => mentor}/proxies/tests/test_executor_proxies.py (93%) rename {satyr => mentor}/proxies/tests/test_message_proxies.py (99%) rename {satyr => mentor}/proxies/tests/test_scheduler_proxies.py (94%) rename {satyr => mentor}/queue.py (100%) rename {satyr => mentor}/scheduler.py (100%) rename {satyr => mentor}/tests/sample.proto (100%) rename {satyr => mentor}/tests/sample_pb2.py (100%) rename {satyr => mentor}/tests/test_binpack.py (92%) rename {satyr => mentor}/tests/test_executor.py (92%) rename {satyr => mentor}/tests/test_framework.py (94%) rename {satyr => mentor}/tests/test_messages.py (96%) rename {satyr => mentor}/tests/test_protobuf.py (98%) rename {satyr => mentor}/tests/test_queue.py (83%) rename {satyr => mentor}/tests/test_scheduler.py (95%) rename {satyr => mentor}/tests/test_utils.py (88%) rename {satyr => mentor}/utils.py (100%) diff --git a/README.md b/README.md index c8efcf8..4b955fb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -[![Build Status](http://drone.lensa.com:8000/api/badges/lensacom/satyr/status.svg)](http://drone.lensa.com:8000/lensacom/satyr) -[![Join the chat at https://gitter.im/lensacom/satyr](https://badges.gitter.im/lensacom/satyr.svg)](https://gitter.im/lensacom/satyr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](http://drone.daskos.com:8000/api/badges/daskos/mentor/status.svg)](http://drone.daskos.com:8000/daskos/mentor) +[![Join the chat at https://gitter.im/daskos/mentor](https://badges.gitter.im/daskos/mentor.svg)](https://gitter.im/daskos/mentor?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -![satyr](https://s3.amazonaws.com/lensa-rnd-misc/satyr2.png) +![mentor](https://s3.amazonaws.com/daskos-rnd-misc/mentor2.png) # An extensible Mesos library for Python ###### aka. the distributed snake-charmer @@ -21,7 +21,7 @@ levels of complexity needs. ## Install -`pip install satyr` or use [lensa/satyr](https://hub.docker.com/r/lensa/satyr/) Docker image +`pip install mentor` or use [daskos/mentor](https://hub.docker.com/r/daskos/mentor/) Docker image Requirements: - mesos.interface (installable via pip) @@ -40,8 +40,8 @@ It's almost identical to python's but runs processes on a Mesos cluster (concurrently). ```python -from satyr.apis.futures import MesosPoolExecutor -from satyr.proxies.messages import Cpus, Mem +from mentor.apis.futures import MesosPoolExecutor +from mentor.proxies.messages import Cpus, Mem with MesosPoolExecutor(name='futures-pool') as executor: def mul(a, b): @@ -63,10 +63,10 @@ but runs processes on a Mesos cluster (concurrently). ```python from __future__ import print_function -from satyr.apis.multiprocessing import Pool +from mentor.apis.multiprocessing import Pool -with Pool(name='satyr-pool') as pool: +with Pool(name='mentor-pool') as pool: def mul(a, b): return a * b @@ -88,16 +88,16 @@ Basic scheduler to submit various kind of workloads, eg.: ```python from __future__ import print_function -from satyr.scheduler import QueueScheduler, Running -from satyr.messages import PythonTask -from satyr.proxies.messages import Disk, Mem, Cpus +from mentor.scheduler import QueueScheduler, Running +from mentor.messages import PythonTask +from mentor.proxies.messages import Disk, Mem, Cpus scheduler = QueueScheduler() -task = PythonTask(fn=sum, args=[range(10)], name='satyr-task', +task = PythonTask(fn=sum, args=[range(10)], name='mentor-task', resources=[Cpus(0.1), Mem(128), Disk(512)]) -with Running(scheduler, name='satyr-scheduler'): +with Running(scheduler, name='mentor-scheduler'): res = scheduler.submit(task) # return AsyncResult print(res.get(timeout=30)) ``` @@ -105,15 +105,15 @@ with Running(scheduler, name='satyr-scheduler'): ### Custom Scheduler You can make your own scheduler built on QueueScheduler or for more complex -needs there's a [Scheduler](satyr/interface.py) interface which you can use +needs there's a [Scheduler](mentor/interface.py) interface which you can use to create one from scratch. (However in this case you'll have to implement -some of the functionalities already in [QueueScheduler](satyr/scheduler.py)) +some of the functionalities already in [QueueScheduler](mentor/scheduler.py)) ```python from __future__ import print_function -from satyr.scheduler import QueueScheduler, Running -from satyr.messages import PythonTask -from satyr.proxies.messages import Disk, Mem, Cpus +from mentor.scheduler import QueueScheduler, Running +from mentor.messages import PythonTask +from mentor.proxies.messages import Disk, Mem, Cpus class CustomScheduler(QueueScheduler): @@ -131,10 +131,10 @@ class CustomScheduler(QueueScheduler): scheduler = CustomScheduler() -task = PythonTask(fn=sum, args=[range(9)], name='satyr-task', +task = PythonTask(fn=sum, args=[range(9)], name='mentor-task', resources=[Cpus(0.1), Mem(128), Disk(512)]) -with Running(scheduler, name='satyr-custom-scheduler'): +with Running(scheduler, name='mentor-custom-scheduler'): res = scheduler.submit(task) print(res.get(timeout=60)) ``` @@ -145,8 +145,8 @@ helping hand with comparable Offers and TaskInfos (basic arithmetic operators are also overloaded). ```python -from satyr.interface import Scheduler -from satyr.proxies.messages import Offer, TaskInfo +from mentor.interface import Scheduler +from mentor.proxies.messages import Offer, TaskInfo class CustomScheduler(Scheduler): @@ -173,7 +173,7 @@ Satyr implements multiple weighted heuristics to solve the - Best-Fit - Best-Fit-Decreasing -see [binpack.py](satyr/binpack.py). +see [binpack.py](mentor/binpack.py). The benefits of using bin-packing has been proven by [Netflix/Fenzo](https://github.com/Netflix/Fenzo) in @@ -188,24 +188,24 @@ value with `/bin/sh -c`. Also, if you want to run your task in a Docker container you can provide some additional information for the task. ```python -from satyr.proxies.messages import TaskInfo, CommandInfo +from mentor.proxies.messages import TaskInfo, CommandInfo task = TaskInfo(name='command-task', command=CommandInfo(value='echo 100')) task.container.type = 'DOCKER' -task.container.docker.image = 'lensacom/satyr:latest' +task.container.docker.image = 'daskos/mentor:latest' ``` ### Python -[PythonTask](/satyr/messages.py) is capable of running arbitrary python code on +[PythonTask](/mentor/messages.py) is capable of running arbitrary python code on your cluster. It sends [cloudpickled](https://github.com/cloudpipe/cloudpickle) methods and arguments to the matched mesos-slave for execution. -Note that python tasks run in [lensa/satyr](https://hub.docker.com/r/lensa/satyr/) +Note that python tasks run in [daskos/mentor](https://hub.docker.com/r/daskos/mentor/) Docker container by default. ```python -from satyr.messages import PythonTask +from mentor.messages import PythonTask # You can pass a function or a lambda in place of sum for fn. @@ -214,7 +214,7 @@ task = PythonTask(name='python-task', fn=sum, args=[range(5)]) ## Custom Task -Customs tasks can be written by extending [TaskInfo](/satyr/proxies/messages.py) +Customs tasks can be written by extending [TaskInfo](/mentor/proxies/messages.py) or any existing descendants. If you're walking down the former path you'll most likely have to deal with protobuf in your code; worry not, we have some magic wrappers for you to provide @@ -222,7 +222,7 @@ customizable messages. ```python from __future__ import print_function -from satyr.proxies.messages import TaskInfo +from mentor.proxies.messages import TaskInfo from mesos.interface import mesos_pb2 diff --git a/satyr/__init__.py b/mentor/__init__.py similarity index 85% rename from satyr/__init__.py rename to mentor/__init__.py index 0f074ad..5be231b 100644 --- a/satyr/__init__.py +++ b/mentor/__init__.py @@ -7,7 +7,7 @@ from .messages import PythonTask, PythonTaskStatus # important to register classes -__version__ = _pkg_resources.get_distribution('satyr').version +__version__ = _pkg_resources.get_distribution('mentor').version __all__ = ('QueueScheduler', 'OneOffExecutor', diff --git a/satyr/apis/__init__.py b/mentor/apis/__init__.py similarity index 100% rename from satyr/apis/__init__.py rename to mentor/apis/__init__.py diff --git a/satyr/apis/futures.py b/mentor/apis/futures.py similarity index 100% rename from satyr/apis/futures.py rename to mentor/apis/futures.py diff --git a/satyr/apis/multiprocessing.py b/mentor/apis/multiprocessing.py similarity index 100% rename from satyr/apis/multiprocessing.py rename to mentor/apis/multiprocessing.py diff --git a/satyr/apis/tests/test_futures.py b/mentor/apis/tests/test_futures.py similarity index 93% rename from satyr/apis/tests/test_futures.py rename to mentor/apis/tests/test_futures.py index 544afa3..8865e2c 100644 --- a/satyr/apis/tests/test_futures.py +++ b/mentor/apis/tests/test_futures.py @@ -5,9 +5,9 @@ from collections import Iterator import pytest -from satyr.apis.futures import Future, MesosPoolExecutor -from satyr.proxies.messages import Cpus, Disk, Mem -from satyr.utils import RemoteException, TimeoutError, timeout +from mentor.apis.futures import Future, MesosPoolExecutor +from mentor.proxies.messages import Cpus, Disk, Mem +from mentor.utils import RemoteException, TimeoutError, timeout @pytest.fixture diff --git a/satyr/apis/tests/test_multiprocessing.py b/mentor/apis/tests/test_multiprocessing.py similarity index 92% rename from satyr/apis/tests/test_multiprocessing.py rename to mentor/apis/tests/test_multiprocessing.py index 0fa89b7..11ed8e0 100644 --- a/satyr/apis/tests/test_multiprocessing.py +++ b/mentor/apis/tests/test_multiprocessing.py @@ -4,9 +4,9 @@ import cloudpickle as cp import pytest -from satyr.apis.multiprocessing import AsyncResult, Pool, Queue -from satyr.proxies.messages import Cpus, Disk, Mem -from satyr.utils import TimeoutError +from mentor.apis.multiprocessing import AsyncResult, Pool, Queue +from mentor.proxies.messages import Cpus, Disk, Mem +from mentor.utils import TimeoutError @pytest.fixture @@ -61,7 +61,7 @@ def test_queue_apply_async(zk, resources): def feed(i, queue): queue.put(cp.dumps(i)) - queue = Queue(zk, '/satyr/test-pool') + queue = Queue(zk, '/mentor/test-pool') with Pool(name='test-pool') as pool: results = [pool.apply_async(feed, [i, queue], resources=resources) for i in range(5)] diff --git a/satyr/binpack.py b/mentor/binpack.py similarity index 100% rename from satyr/binpack.py rename to mentor/binpack.py diff --git a/satyr/executor.py b/mentor/executor.py similarity index 100% rename from satyr/executor.py rename to mentor/executor.py diff --git a/satyr/interface.py b/mentor/interface.py similarity index 100% rename from satyr/interface.py rename to mentor/interface.py diff --git a/satyr/messages.py b/mentor/messages.py similarity index 97% rename from satyr/messages.py rename to mentor/messages.py index 3dee128..6359b50 100644 --- a/satyr/messages.py +++ b/mentor/messages.py @@ -48,8 +48,8 @@ class PythonTask(PickleMixin, TaskInfo): def __init__(self, fn=None, args=[], kwargs={}, resources=[Cpus(0.1), Mem(128), Disk(0)], - command='python -m satyr.executor', envs={}, uris=[], - docker='lensa/satyr:latest', force_pull=False, retries=3, + command='python -m mentor.executor', envs={}, uris=[], + docker='daskos/mentor:latest', force_pull=False, retries=3, **kwds): super(PythonTask, self).__init__(**kwds) self.status = PythonTaskStatus(task_id=self.id, state='TASK_STAGING') diff --git a/satyr/protobuf.py b/mentor/protobuf.py similarity index 100% rename from satyr/protobuf.py rename to mentor/protobuf.py diff --git a/satyr/proxies/__init__.py b/mentor/proxies/__init__.py similarity index 100% rename from satyr/proxies/__init__.py rename to mentor/proxies/__init__.py diff --git a/satyr/proxies/executor.py b/mentor/proxies/executor.py similarity index 100% rename from satyr/proxies/executor.py rename to mentor/proxies/executor.py diff --git a/satyr/proxies/messages.py b/mentor/proxies/messages.py similarity index 100% rename from satyr/proxies/messages.py rename to mentor/proxies/messages.py diff --git a/satyr/proxies/scheduler.py b/mentor/proxies/scheduler.py similarity index 100% rename from satyr/proxies/scheduler.py rename to mentor/proxies/scheduler.py diff --git a/satyr/proxies/tests/test_executor_proxies.py b/mentor/proxies/tests/test_executor_proxies.py similarity index 93% rename from satyr/proxies/tests/test_executor_proxies.py rename to mentor/proxies/tests/test_executor_proxies.py index 43dd29b..0655785 100644 --- a/satyr/proxies/tests/test_executor_proxies.py +++ b/mentor/proxies/tests/test_executor_proxies.py @@ -1,6 +1,6 @@ from mesos.interface import mesos_pb2 -from satyr.proxies import ExecutorDriverProxy, ExecutorProxy -from satyr.proxies.messages import TaskStatus +from mentor.proxies import ExecutorDriverProxy, ExecutorProxy +from mentor.proxies.messages import TaskStatus def test_executor_event_handlers(mocker): diff --git a/satyr/proxies/tests/test_message_proxies.py b/mentor/proxies/tests/test_message_proxies.py similarity index 99% rename from satyr/proxies/tests/test_message_proxies.py rename to mentor/proxies/tests/test_message_proxies.py index 9e959b5..78bc3d7 100644 --- a/satyr/proxies/tests/test_message_proxies.py +++ b/mentor/proxies/tests/test_message_proxies.py @@ -2,7 +2,7 @@ import pytest from mesos.interface import mesos_pb2 -from satyr.proxies.messages import (CommandInfo, Cpus, Disk, FrameworkID, +from mentor.proxies.messages import (CommandInfo, Cpus, Disk, FrameworkID, FrameworkInfo, Map, Mem, MessageProxy, Offer, RegisterProxies, ResourcesMixin, ScalarResource, TaskID, TaskInfo, diff --git a/satyr/proxies/tests/test_scheduler_proxies.py b/mentor/proxies/tests/test_scheduler_proxies.py similarity index 94% rename from satyr/proxies/tests/test_scheduler_proxies.py rename to mentor/proxies/tests/test_scheduler_proxies.py index 784afeb..75ced02 100644 --- a/satyr/proxies/tests/test_scheduler_proxies.py +++ b/mentor/proxies/tests/test_scheduler_proxies.py @@ -1,6 +1,6 @@ from mesos.interface import mesos_pb2 -from satyr.proxies import SchedulerDriverProxy, SchedulerProxy -from satyr.proxies.messages import (Cpus, ExecutorID, Mem, OfferID, Operation, +from mentor.proxies import SchedulerDriverProxy, SchedulerProxy +from mentor.proxies.messages import (Cpus, ExecutorID, Mem, OfferID, Operation, Request, SlaveID, TaskInfo, TaskStatus) diff --git a/satyr/queue.py b/mentor/queue.py similarity index 100% rename from satyr/queue.py rename to mentor/queue.py diff --git a/satyr/scheduler.py b/mentor/scheduler.py similarity index 100% rename from satyr/scheduler.py rename to mentor/scheduler.py diff --git a/satyr/tests/sample.proto b/mentor/tests/sample.proto similarity index 100% rename from satyr/tests/sample.proto rename to mentor/tests/sample.proto diff --git a/satyr/tests/sample_pb2.py b/mentor/tests/sample_pb2.py similarity index 100% rename from satyr/tests/sample_pb2.py rename to mentor/tests/sample_pb2.py diff --git a/satyr/tests/test_binpack.py b/mentor/tests/test_binpack.py similarity index 92% rename from satyr/tests/test_binpack.py rename to mentor/tests/test_binpack.py index eecf37f..29d211a 100644 --- a/satyr/tests/test_binpack.py +++ b/mentor/tests/test_binpack.py @@ -1,8 +1,8 @@ from __future__ import absolute_import, division, print_function import pytest -from satyr.binpack import bf, bfd, ff, ffd, mr, weight -from satyr.proxies.messages import Cpus, Mem, Offer, TaskInfo +from mentor.binpack import bf, bfd, ff, ffd, mr, weight +from mentor.proxies.messages import Cpus, Mem, Offer, TaskInfo @pytest.fixture diff --git a/satyr/tests/test_executor.py b/mentor/tests/test_executor.py similarity index 92% rename from satyr/tests/test_executor.py rename to mentor/tests/test_executor.py index 58f4987..60973be 100644 --- a/satyr/tests/test_executor.py +++ b/mentor/tests/test_executor.py @@ -1,8 +1,8 @@ from __future__ import absolute_import, division, print_function -from satyr.executor import OneOffExecutor, Running -from satyr.messages import PythonTask, PythonTaskStatus -from satyr.utils import RemoteException +from mentor.executor import OneOffExecutor, Running +from mentor.messages import PythonTask, PythonTaskStatus +from mentor.utils import RemoteException class FakeThread(object): diff --git a/satyr/tests/test_framework.py b/mentor/tests/test_framework.py similarity index 94% rename from satyr/tests/test_framework.py rename to mentor/tests/test_framework.py index e05e7c2..70ef87e 100644 --- a/satyr/tests/test_framework.py +++ b/mentor/tests/test_framework.py @@ -1,11 +1,11 @@ from __future__ import absolute_import, division, print_function import pytest -from satyr.messages import PythonTask -from satyr.proxies.messages import (CommandInfo, ContainerInfo, Cpus, Disk, +from mentor.messages import PythonTask +from mentor.proxies.messages import (CommandInfo, ContainerInfo, Cpus, Disk, DockerInfo, Mem, TaskID, TaskInfo) -from satyr.scheduler import QueueScheduler, Running -from satyr.utils import RemoteException +from mentor.scheduler import QueueScheduler, Running +from mentor.utils import RemoteException @pytest.fixture @@ -25,7 +25,7 @@ def docker_command(): command=CommandInfo(value='echo 100'), container=ContainerInfo( type='DOCKER', - docker=DockerInfo(image='lensa/satyr'))) + docker=DockerInfo(image='daskos/mentor'))) return task diff --git a/satyr/tests/test_messages.py b/mentor/tests/test_messages.py similarity index 96% rename from satyr/tests/test_messages.py rename to mentor/tests/test_messages.py index 5dd2c66..883d619 100644 --- a/satyr/tests/test_messages.py +++ b/mentor/tests/test_messages.py @@ -2,9 +2,9 @@ import cloudpickle from mesos.interface import mesos_pb2 -from satyr.messages import PythonTask, PythonTaskStatus -from satyr.proxies.messages import TaskID, decode, encode -from satyr.utils import RemoteException +from mentor.messages import PythonTask, PythonTaskStatus +from mentor.proxies.messages import TaskID, decode, encode +from mentor.utils import RemoteException def test_python_task_status_decode(): diff --git a/satyr/tests/test_protobuf.py b/mentor/tests/test_protobuf.py similarity index 98% rename from satyr/tests/test_protobuf.py rename to mentor/tests/test_protobuf.py index c043fdf..5bd562a 100644 --- a/satyr/tests/test_protobuf.py +++ b/mentor/tests/test_protobuf.py @@ -2,7 +2,7 @@ import pytest from sample_pb2 import MessageOfTypes -from satyr.protobuf import dict_to_protobuf, protobuf_to_dict +from mentor.protobuf import dict_to_protobuf, protobuf_to_dict @pytest.fixture diff --git a/satyr/tests/test_queue.py b/mentor/tests/test_queue.py similarity index 83% rename from satyr/tests/test_queue.py rename to mentor/tests/test_queue.py index c9d3232..0701397 100644 --- a/satyr/tests/test_queue.py +++ b/mentor/tests/test_queue.py @@ -5,24 +5,24 @@ import cloudpickle as cp import pytest -from satyr.queue import LockingQueue, Queue +from mentor.queue import LockingQueue, Queue def test_queue_put_get(zk): - queue = Queue(zk, '/satyr/putget') + queue = Queue(zk, '/mentor/putget') queue.put(cp.dumps(range(5))) assert cp.loads(queue.get()) == range(5) def test_locking_queue_put_get(zk): - queue = LockingQueue(zk, '/satyr/putget_locking') + queue = LockingQueue(zk, '/mentor/putget_locking') queue.put(cp.dumps(range(5))) assert queue.get() == cp.dumps(range(5)) queue.consume() def test_queue_serde(zk): - queue = Queue(zk, '/satyr/serde') + queue = Queue(zk, '/mentor/serde') queue.put(cp.dumps({'a': 1, 'b': 2})) queue.put(cp.dumps({'c': 3})) @@ -34,7 +34,7 @@ def test_queue_serde(zk): def test_locking_queue_serde(zk): - queue = LockingQueue(zk, '/satyr/serde_locking') + queue = LockingQueue(zk, '/mentor/serde_locking') queue.put(cp.dumps({'a': 1, 'b': 2})) queue.put(cp.dumps({'c': 3})) @@ -48,7 +48,7 @@ def test_locking_queue_serde(zk): def test_queue_size(zk): - queue = Queue(zk, '/satyr/size') + queue = Queue(zk, '/mentor/size') assert queue.empty() assert queue.qsize() == 0 @@ -58,7 +58,7 @@ def test_queue_size(zk): def test_queue_blocking_get(zk): - queue = Queue(zk, '/satyr/blocking') + queue = Queue(zk, '/mentor/blocking') def delayed_put(): import time diff --git a/satyr/tests/test_scheduler.py b/mentor/tests/test_scheduler.py similarity index 95% rename from satyr/tests/test_scheduler.py rename to mentor/tests/test_scheduler.py index dff3699..542fcc7 100644 --- a/satyr/tests/test_scheduler.py +++ b/mentor/tests/test_scheduler.py @@ -1,10 +1,10 @@ from __future__ import absolute_import, division, print_function import pytest -from satyr.messages import PythonTask, PythonTaskStatus -from satyr.proxies.messages import (Cpus, Disk, Mem, Offer, OfferID, SlaveID, +from mentor.messages import PythonTask, PythonTaskStatus +from mentor.proxies.messages import (Cpus, Disk, Mem, Offer, OfferID, SlaveID, TaskID) -from satyr.scheduler import QueueScheduler, Running +from mentor.scheduler import QueueScheduler, Running @pytest.fixture diff --git a/satyr/tests/test_utils.py b/mentor/tests/test_utils.py similarity index 88% rename from satyr/tests/test_utils.py rename to mentor/tests/test_utils.py index c519c0e..cb5ec85 100644 --- a/satyr/tests/test_utils.py +++ b/mentor/tests/test_utils.py @@ -1,6 +1,6 @@ from __future__ import absolute_import, division, print_function -from satyr.utils import remote_exception +from mentor.utils import remote_exception def test_remote_exception(): diff --git a/satyr/utils.py b/mentor/utils.py similarity index 100% rename from satyr/utils.py rename to mentor/utils.py diff --git a/setup.py b/setup.py index 5afc1b5..b450a31 100755 --- a/setup.py +++ b/setup.py @@ -5,15 +5,15 @@ from setuptools import setup -setup(name='satyr', +setup(name='mentor', version='0.2.1', description='Extensible Python Framework for Apache Mesos', - url='http://github.com/lensacom/satyr', + url='http://github.com/daskos/mentor', maintainer='Krisztián Szűcs', - maintainer_email='krisztian.szucs@lensa.com', + maintainer_email='krisztian.szucs@daskos.com', license='Apache License, Version 2.0', keywords='mesos framework multiprocessing', - packages=['satyr', 'satyr.proxies', 'satyr.apis'], + packages=['mentor', 'mentor.proxies', 'mentor.apis'], long_description=(open('README.md').read() if exists('README.md') else ''), install_requires=['cloudpickle', 'kazoo', 'futures'], From 772b952574fce3a540c06bc02fccc5d2bd632f8f Mon Sep 17 00:00:00 2001 From: Szucs Krisztian Date: Tue, 31 Jan 2017 10:11:53 +0100 Subject: [PATCH 2/2] missing renames in readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4b955fb..4533b4f 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ ###### aka. the distributed snake-charmer -Satyr's intention is to simplify the process of writing python frameworks -for Mesos. Satyr provides multiple components and interfaces to cover various +Mentor's intention is to simplify the process of writing python frameworks +for Mesos. Mentor provides multiple components and interfaces to cover various levels of complexity needs. ## Notable Features @@ -164,7 +164,7 @@ class CustomScheduler(Scheduler): ## Optimized Task Placement -Satyr implements multiple weighted heuristics to solve the +Mentor implements multiple weighted heuristics to solve the [Bin-Packing Problem](https://en.wikipedia.org/wiki/Bin_packing_problem): - First-Fit