From 894e0cb2c0828f89ab626ec14b17d157cb5101ce Mon Sep 17 00:00:00 2001 From: ayuhsya Date: Tue, 15 Aug 2017 01:46:11 +0900 Subject: [PATCH 1/8] Changed lists to set --- .DS_Store | Bin 0 -> 6148 bytes distalg/process.py | 4 ++-- distalg/simulation.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6e54c8ffccc5b544ca7f3b40af1df3dc3d1aca08 GIT binary patch literal 6148 zcmeHK%TB{U3>-rck+}58aesk7SXJc<`U5~yA*7%nrAQoe@fPFo@}wl2WwyP#{2g3%_|fLDluY+)0r<(R|6+U zr$b`+khoc5LJ_;2=NBu7RL6{|Kq@d-;L?{X?f>`mALjo#DOagLD)6TikY=;ptocgO zTNf{O?qtTf+Ix&9)RF||=;5QUF0+%Kx A0{{R3 literal 0 HcmV?d00001 diff --git a/distalg/process.py b/distalg/process.py index 5dd6724..945f006 100644 --- a/distalg/process.py +++ b/distalg/process.py @@ -30,8 +30,8 @@ def _receive_msgs(): def __init__(self, pid=None): self._id = pid or shortuuid.uuid() - self.in_channels = [] - self.out_channels = [] + self.in_channels = set() + self.out_channels = set() self.incoming_msgs = asyncio.Queue() self.receive_msgs = self._receive_msgs_creator() diff --git a/distalg/simulation.py b/distalg/simulation.py index 946c43f..756791d 100644 --- a/distalg/simulation.py +++ b/distalg/simulation.py @@ -43,8 +43,8 @@ def __init__(self, embedding_graph=None, process_type=Process, channel_type=Chan channel._back = rev_channel rev_channel._back = channel - process_n.out_channels.append(channel) - process_nbr.in_channels.append(channel) + process_n.out_channels.add(channel) + process_nbr.in_channels.add(channel) async def start_all(self): self.tasks += [asyncio.ensure_future(process.run()) for process in self.node_map] \ From 22901e8f3f4a7fe4fb18d4cd8ec76b80398eb7c2 Mon Sep 17 00:00:00 2001 From: ayuhsya Date: Tue, 15 Aug 2017 02:40:51 +0900 Subject: [PATCH 2/8] Removed temporary binary file .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes .gitignore | 1 + 2 files changed, 1 insertion(+) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 6e54c8ffccc5b544ca7f3b40af1df3dc3d1aca08..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%TB{U3>-rck+}58aesk7SXJc<`U5~yA*7%nrAQoe@fPFo@}wl2WwyP#{2g3%_|fLDluY+)0r<(R|6+U zr$b`+khoc5LJ_;2=NBu7RL6{|Kq@d-;L?{X?f>`mALjo#DOagLD)6TikY=;ptocgO zTNf{O?qtTf+Ix&9)RF||=;5QUF0+%Kx A0{{R3 diff --git a/.gitignore b/.gitignore index 37a2088..1495c09 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__/* .cache/* .*.swp */.ipynb_checkpoints/* +*.DS_Store # Project files .ropeproject From 38edb80d470debac666811964fdc7c878cb9ea4d Mon Sep 17 00:00:00 2001 From: ayuhsya Date: Fri, 18 Aug 2017 23:06:25 +0900 Subject: [PATCH 3/8] setting up travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7b59f70..de89261 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ sudo: false language: python +python: + - "3.5" virtualenv: system_site_packages: true env: From 0454cf87da9b7bf478d8a513d3817b3af0a23f03 Mon Sep 17 00:00:00 2001 From: ayuhsya Date: Fri, 18 Aug 2017 23:12:43 +0900 Subject: [PATCH 4/8] simplified .travis.yml --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index de89261..e17bbe9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,14 +6,6 @@ sudo: false language: python python: - "3.5" -virtualenv: - system_site_packages: true -env: - matrix: - - DISTRIB="ubuntu" PYTHON_VERSION="2.7" COVERAGE="true" - - DISTRIB="conda" PYTHON_VERSION="2.7" COVERAGE="false" - - DISTRIB="conda" PYTHON_VERSION="3.3" COVERAGE="false" - - DISTRIB="conda" PYTHON_VERSION="3.4" COVERAGE="false" addons: apt: packages: From 3c18c91857cf0c01dd716e92f340339049181ffd Mon Sep 17 00:00:00 2001 From: ayuhsya Date: Fri, 18 Aug 2017 23:17:09 +0900 Subject: [PATCH 5/8] removed install travis --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e17bbe9..57bb3c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ addons: - git - python-pip install: - - source tests/travis_install.sh - pip install -r requirements.txt before_script: - git config --global user.email "you@example.com" From 9bb90a3ca1623c2bd75a9fc1f777273351c6d42c Mon Sep 17 00:00:00 2001 From: ayuhsya Date: Fri, 18 Aug 2017 23:26:04 +0900 Subject: [PATCH 6/8] set PYTHONPATH --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 57bb3c5..af628b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,8 @@ addons: packages: - git - python-pip +env: + - export PYTHONPATH=/home/travis/build/ayuhsya/Distributed-Algorithms install: - pip install -r requirements.txt before_script: From ec021c225f1bfba477d4f5060b5142d6fa5762d4 Mon Sep 17 00:00:00 2001 From: ayuhsya Date: Fri, 18 Aug 2017 23:31:30 +0900 Subject: [PATCH 7/8] added wrapt in requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 4d435c8..a16de93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,3 +13,4 @@ python-dateutil==2.6.0 pytz==2017.2 shortuuid==0.5.0 six==1.10.0 +wrapt==1.10.11 From 389a295ea055447741b8eb01f045fd88d5bac52d Mon Sep 17 00:00:00 2001 From: ayuhsya Date: Fri, 18 Aug 2017 23:53:25 +0900 Subject: [PATCH 8/8] setting PYTHONPATH to TRAVIS_BUILD_DIR --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index af628b4..aa63d41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ addons: - git - python-pip env: - - export PYTHONPATH=/home/travis/build/ayuhsya/Distributed-Algorithms + - export PYTHONPATH=$TRAVIS_BUILD_DIR install: - pip install -r requirements.txt before_script: