Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Showing with 27 additions and 6 deletions.
  1. +21 −0 changelog.md
  2. +1 −1 dronestore/model.py
  3. +3 −3 test/test_drone.py
  4. +2 −2 test/test_merge.py
View
21 changelog.md
@@ -0,0 +1,21 @@
+Changelog
+=========
+
+0.2.0
+------
+
+WARNING: backwards incompatible
+
+* Replaced internal ``datastore`` package with the standalone
+[datastore](https://github.com/jbenet/datastore) project.
+* Changed Key structure to conform to that in ``datastore``. Namely ``/parent/type/name`` turned into ``/type:name``.
+
+0.1.11
+------
+
+* Lots of things
+
+0.1
+---
+
+* Initial release
View
2 dronestore/model.py
@@ -245,7 +245,7 @@ def _initialize_new(self, key_name, parentKey):
if '/' in key_name:
raise ValueError('Key name %s includes slashes. It must not.' % key_name)
- key = Key('/%s/%s' % (self.__dstype__, key_name))
+ key = Key('/%s:%s' % (self.__dstype__, key_name))
if parentKey:
key = parentKey.child(key)
View
6 test/test_drone.py
@@ -83,7 +83,7 @@ def test_stress(self):
def randomPerson(drone):
i = random.randint(0, num_people - 1)
- return drone.get(Key('/PersonM/person%s' % i))
+ return drone.get(Key('/PersonM:person%s' % i))
def updateField(field):
d = random.choice(drones)
@@ -123,7 +123,7 @@ def shuffle():
for d in drones:
print 'Drone: ', d.droneid
for i in range(num_people):
- key = Key('/PersonM/person%s' % i)
+ key = Key('/PersonM:person%s' % i)
p = d.get(key)
if p is None:
@@ -132,7 +132,7 @@ def shuffle():
print p
for i in range(num_people):
- key = Key('/PersonM/person%s' % i)
+ key = Key('/PersonM:person%s' % i)
p = drones[0].get(key)
for d in drones:
p = d.merge(p)
View
4 test/test_merge.py
@@ -75,8 +75,8 @@ def subtest_commits(self, p1, p2, diff=None):
def test_basic(self):
a1 = PersonM('Tesla')
a2 = PersonM('Tesla')
- self.assertEqual(a1.key, Key('/PersonM/Tesla'))
- self.assertEqual(a2.key, Key('/PersonM/Tesla'))
+ self.assertEqual(a1.key, Key('/PersonM:Tesla'))
+ self.assertEqual(a2.key, Key('/PersonM:Tesla'))
self.assertEqual(a1.__dstype__, 'PersonM')
self.assertEqual(a2.__dstype__, 'PersonM')
self.subtest_assert_blank_person(a1)

No commit comments for this range

Something went wrong with that request. Please try again.