Skip to content

Commit

Permalink
Rename Fragment Info API non_empty_domain -> nonempty_domain
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenv committed May 4, 2021
1 parent b12c36c commit 12e10cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/fragment_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def write_array_3():
print("is sparse: {}".format(fragment.sparse))
print("cell num: {}".format(fragment.cell_num))
print("has consolidated metadata: {}".format(fragment.has_consolidated_metadata))
print("non empty domain: {}".format(fragment.non_empty_domain))
print("nonempty domain: {}".format(fragment.nonempty_domain))
print("timestamp range: {}".format(fragment.timestamp_range))
print("number of fragments to vacuum: {}".format(fragment.to_vacuum_num))
print("uri of fragments to vacuum: {}".format(fragment.to_vacuum_uri))
Expand Down
4 changes: 2 additions & 2 deletions tiledb/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, array_uri, ctx=None):
self.uri = fi.fragment_uri()
self.__nums = fi.fragment_num()
self.version = fi.version()
self.non_empty_domain = fi.get_non_empty_domain(schema)
self.nonempty_domain = fi.get_non_empty_domain(schema)
self.cell_num = fi.cell_num()
self.timestamp_range = fi.timestamp_range()
self.dense = fi.dense()
Expand Down Expand Up @@ -86,7 +86,7 @@ def __init__(self, fragments: FragmentInfoList, num):
self.num = num
self.uri = fragments.uri[num]
self.version = fragments.version[num]
self.non_empty_domain = fragments.non_empty_domain[num]
self.nonempty_domain = fragments.nonempty_domain[num]
self.cell_num = fragments.cell_num[num]
self.timestamp_range = fragments.timestamp_range[num]
self.dense = fragments.dense[num]
Expand Down
20 changes: 10 additions & 10 deletions tiledb/tests/test_fragment_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_array_fragments(self):
fragments_info.has_consolidated_metadata, (False, False, False)
)
self.assertEqual(
fragments_info.non_empty_domain, (((0, 0),), ((1, 1),), ((2, 2),))
fragments_info.nonempty_domain, (((0, 0),), ((1, 1),), ((2, 2),))
)
self.assertEqual(fragments_info.sparse, (False, False, False))
self.assertEqual(fragments_info.timestamp_range, ((1, 1), (2, 2), (3, 3)))
Expand All @@ -68,7 +68,7 @@ def test_array_fragments(self):
self.assertEqual(frag.cell_num, 3)
self.assertEqual(frag.dense, True)
self.assertEqual(frag.has_consolidated_metadata, False)
self.assertEqual(frag.non_empty_domain, ((idx, idx),))
self.assertEqual(frag.nonempty_domain, ((idx, idx),))
self.assertEqual(frag.sparse, False)
self.assertEqual(frag.timestamp_range, (idx + 1, idx + 1))

Expand Down Expand Up @@ -112,12 +112,12 @@ def test_array_fragments_var(self):
fragments_info = tiledb.array_fragments(uri)

self.assertEqual(
fragments_info.non_empty_domain,
fragments_info.nonempty_domain,
((("one", "zero"),), (("one", "zero"),), (("one", "zero"),)),
)

for frag in fragments_info:
self.assertEqual(frag.non_empty_domain, (("one", "zero"),))
self.assertEqual(frag.nonempty_domain, (("one", "zero"),))

def test_dense_fragments(self):
fragments = 3
Expand Down Expand Up @@ -253,8 +253,8 @@ def test_sparse_fragments(self):
else:
self.assertEqual(fragment_info.version(), (9, 9, 9))

def test_non_empty_domain(self):
uri = self.path("test_non_empty_domain")
def test_nonempty_domain(self):
uri = self.path("test_nonempty_domain")
ctx = tiledb.default_ctx()
dom = tiledb.Domain(
tiledb.Dim(name="x", ctx=ctx, domain=(1, 4)),
Expand Down Expand Up @@ -313,8 +313,8 @@ def test_non_empty_domain(self):
(((1, 4), (-1.0, 2.0)), ((1, 3), (-1.5, -1.25))),
)

def test_non_empty_domain_date(self):
uri = self.path("test_non_empty_domain")
def test_nonempty_domain_date(self):
uri = self.path("test_nonempty_domain")
ctx = tiledb.default_ctx()
dom = tiledb.Domain(
tiledb.Dim(
Expand Down Expand Up @@ -381,8 +381,8 @@ def test_non_empty_domain_date(self):
),
)

def test_non_empty_domain_strings(self):
uri = self.path("test_non_empty_domain_strings")
def test_nonempty_domain_strings(self):
uri = self.path("test_nonempty_domain_strings")
ctx = tiledb.default_ctx()
dom = tiledb.Domain(
tiledb.Dim(name="x", ctx=ctx, domain=(None, None), dtype=np.bytes_),
Expand Down

0 comments on commit 12e10cf

Please sign in to comment.