[ARVADOS] updated: 34110141b39878d60b9223b55932f7d36e59f405
git at public.curoverse.com
git at public.curoverse.com
Mon Sep 8 15:54:39 EDT 2014
Summary of changes:
sdk/python/arvados/util.py | 7 +++++++
services/fuse/arvados_fuse/__init__.py | 8 +-------
services/fuse/tests/test_mount.py | 19 ++-----------------
3 files changed, 10 insertions(+), 24 deletions(-)
via 34110141b39878d60b9223b55932f7d36e59f405 (commit)
via 837cb95f2897411533cf35a62f50d62ca9ee3e3b (commit)
from bd86112ffba029e0f2c29c7d12ae6192e4097e18 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 34110141b39878d60b9223b55932f7d36e59f405
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Sep 8 15:54:35 2014 -0400
3644: Update tests broken by merge
diff --git a/services/fuse/tests/test_mount.py b/services/fuse/tests/test_mount.py
index 8287a19..55f565b 100644
--- a/services/fuse/tests/test_mount.py
+++ b/services/fuse/tests/test_mount.py
@@ -161,16 +161,6 @@ class FuseMagicTest(MountTestBase):
class FuseTagsTest(MountTestBase):
- def setUp(self):
- super(FuseTagsTest, self).setUp()
-
- cw = arvados.CollectionWriter()
-
- cw.start_new_file('foo')
- cw.write("foo")
-
- self.testcollection = cw.finish()
-
def runTest(self):
operations = fuse.Operations(os.getuid(), os.getgid())
e = operations.inodes.add_entry(fuse.TagsDirectory(llfuse.ROOT_INODE, operations.inodes, self.api))
@@ -194,13 +184,6 @@ class FuseTagsTest(MountTestBase):
d3.sort()
self.assertEqual(['foo'], d3)
- files = {}
- files[os.path.join(self.mounttmp, 'foo_tag', 'zzzzz-4zz18-fy296fx3hot09f7', 'foo')] = 'foo'
-
- for k, v in files.items():
- with open(os.path.join(self.mounttmp, k)) as f:
- self.assertEqual(v, f.read())
-
class FuseTagsUpdateTest(MountTestBase):
def runRealTest(self):
@@ -276,6 +259,7 @@ class FuseSharedTest(MountTestBase):
self.assertEqual(['A Project',
"Empty collection",
"Empty collection.link",
+ "Pipeline Template with Input Parameter with Search.pipelineTemplate",
"Pipeline Template with Jobspec Components.pipelineTemplate",
"pipeline_with_job.pipelineInstance"
], d2)
@@ -284,6 +268,7 @@ class FuseSharedTest(MountTestBase):
d3.sort()
self.assertEqual(["A Subproject",
"Two Part Pipeline Template.pipelineTemplate",
+ "collection_to_move_around",
"zzzzz-4zz18-fy296fx3hot09f7 added sometime"
], d3)
commit 837cb95f2897411533cf35a62f50d62ca9ee3e3b
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Sep 8 15:37:55 2014 -0400
3644: Moved some common regex patterns into SDK
diff --git a/sdk/python/arvados/util.py b/sdk/python/arvados/util.py
index 0889ffc..ada1aec 100644
--- a/sdk/python/arvados/util.py
+++ b/sdk/python/arvados/util.py
@@ -9,6 +9,13 @@ from arvados.collection import *
HEX_RE = re.compile(r'^[0-9a-fA-F]+$')
+portable_data_hash_pattern = re.compile(r'[0-9a-f]{32}\+\d+')
+uuid_pattern = re.compile(r'[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}')
+collection_uuid_pattern = re.compile(r'[a-z0-9]{5}-4zz18-[a-z0-9]{15}')
+group_uuid_pattern = re.compile(r'[a-z0-9]{5}-j7d0g-[a-z0-9]{15}')
+user_uuid_pattern = re.compile(r'[a-z0-9]{5}-tpzed-[a-z0-9]{15}')
+link_uuid_pattern = re.compile(r'[a-z0-9]{5}-o0j2j-[a-z0-9]{15}')
+
def clear_tmpdir(path=None):
"""
Ensure the given directory (or TASK_TMPDIR if none given)
diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index c3f913e..4d2dfee 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -19,16 +19,10 @@ import logging
import time
import calendar
import threading
+from arvados.util import portable_data_hash_pattern, uuid_pattern, collection_uuid_pattern, group_uuid_pattern, user_uuid_pattern, link_uuid_pattern
_logger = logging.getLogger('arvados.arvados_fuse')
-portable_data_hash_pattern = re.compile(r'[0-9a-f]{32}\+\d+')
-uuid_pattern = re.compile(r'[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}')
-collection_uuid_pattern = re.compile(r'[a-z0-9]{5}-4zz18-[a-z0-9]{15}')
-group_uuid_pattern = re.compile(r'[a-z0-9]{5}-j7d0g-[a-z0-9]{15}')
-user_uuid_pattern = re.compile(r'[a-z0-9]{5}-tpzed-[a-z0-9]{15}')
-link_uuid_pattern = re.compile(r'[a-z0-9]{5}-o0j2j-[a-z0-9]{15}')
-
class SafeApi(object):
'''Threadsafe wrapper for API object. This stores and returns a different api
object per thread, because httplib2 which underlies apiclient is not
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list