Skip to content

Commit

Permalink
Replace the test script with a (simpler) zoo specimen
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Sep 12, 2024
1 parent 07c6bf3 commit 500939a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 55 deletions.
32 changes: 32 additions & 0 deletions tests/python/chunk_zoo/chunk_zoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import argparse
from typing import Sequence

import numpy as np
import rerun as rr
import rerun.components as rrc

Expand Down Expand Up @@ -114,6 +115,37 @@ def specimen_archetype_without_clamp_join_semantics():
)


def specimen_many_rows_with_mismatched_instance_count():
"""Points2D across many timestamps with varying and mismatch instance counts."""

# Useful for dataframe view row expansion testing.

np.random.seed(0)
positions_partitions = np.random.randint(
3,
15,
size=100,
)
batch_size = np.sum(positions_partitions)

# Shuffle the color partitions to induce the mismatch
colors_partitions = positions_partitions.copy()
np.random.shuffle(colors_partitions)

positions = np.random.rand(batch_size, 2)
colors = np.random.randint(0, 255, size=(batch_size, 4))

rr.send_columns(
"/many_rows_with_mismatched_instance_count",
times(range(len(positions_partitions))),
[
rrc.Position2DBatch(positions).partition(positions_partitions),
rrc.ColorBatch(colors).partition(colors_partitions),
],
)
rr.log_components("/many_rows_with_mismatched_instance_count", [rr.Points2D.indicator()], static=True)


# TODO(ab): add variants (unordered, overlapping timestamps, etc.)
def specimen_scalars_interlaced_in_two_chunks():
"""Scalar column stored in two chunks, with interlaced timestamps."""
Expand Down
55 changes: 0 additions & 55 deletions tests/python/instance_count_test/instance_count_test.py

This file was deleted.

0 comments on commit 500939a

Please sign in to comment.