Skip to content

Commit

Permalink
tests: rename get_debug_points() to get_points_nodes()
Browse files Browse the repository at this point in the history
  • Loading branch information
ubitux committed Mar 25, 2024
1 parent e8b547b commit a1ec5ff
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion pynopegl-utils/pynopegl_utils/tests/cuepoints_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_grid_points(cols: int, rows: int) -> Mapping[str, Tuple[float, float]]:
return points


def get_debug_points(
def get_points_nodes(
cfg: ngl.SceneCfg,
points: Mapping[str, Tuple[float, float]],
radius: float = 0.025,
Expand Down
4 changes: 2 additions & 2 deletions pynopegl-utils/pynopegl_utils/tests/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import colorsys
import random

from pynopegl_utils.tests.cuepoints_utils import get_debug_points
from pynopegl_utils.tests.cuepoints_utils import get_points_nodes

import pynopegl as ngl

Expand Down Expand Up @@ -355,7 +355,7 @@ def get_field_scene(cfg: ngl.SceneCfg, spec, category, field_type, seed, debug_p

if debug_positions:
debug_points = get_data_debug_positions(fields)
dbg_circles = get_debug_points(cfg, debug_points, text_size=(0.2, 0.1))
dbg_circles = get_points_nodes(cfg, debug_points, text_size=(0.2, 0.1))
g = ngl.Group(children=(draw, dbg_circles))
return g

Expand Down
4 changes: 2 additions & 2 deletions tests/blending.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from typing import Mapping, Tuple

from pynopegl_utils.tests.cmp_cuepoints import test_cuepoints
from pynopegl_utils.tests.cuepoints_utils import get_debug_points
from pynopegl_utils.tests.cuepoints_utils import get_points_nodes
from pynopegl_utils.toolbox.colors import COLORS
from pynopegl_utils.toolbox.grid import AutoGrid, autogrid_queue, autogrid_simple

Expand Down Expand Up @@ -198,7 +198,7 @@ def _debug_overlay(cfg: ngl.SceneCfg, scene, grid_names, show_dbg_points=False,
dbg_positions = _get_dbg_positions(nb)
if show_labels:
dbg_positions = {name: (p[0], p[1] - text_height / 2.0 * ag.scale) for name, p in dbg_positions.items()}
dbg_points = get_debug_points(cfg, dbg_positions, radius=0.01, text_size=(0.08, 0.08))
dbg_points = get_points_nodes(cfg, dbg_positions, radius=0.01, text_size=(0.08, 0.08))

overlay.add_children(dbg_points)

Expand Down
8 changes: 4 additions & 4 deletions tests/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from pynopegl_utils.misc import get_shader
from pynopegl_utils.tests.cmp_cuepoints import test_cuepoints
from pynopegl_utils.tests.cmp_fingerprint import test_fingerprint
from pynopegl_utils.tests.cuepoints_utils import get_debug_points, get_grid_points
from pynopegl_utils.tests.cuepoints_utils import get_grid_points, get_points_nodes
from pynopegl_utils.toolbox.colors import COLORS

import pynopegl as ngl
Expand Down Expand Up @@ -243,7 +243,7 @@ def compute_histogram(cfg: ngl.SceneCfg, show_dbg_points=False):

group = ngl.Group(children=(clear_histogram, exec_histogram, draw))
if show_dbg_points:
group.add_children(get_debug_points(cfg, _CUEPOINTS))
group.add_children(get_points_nodes(cfg, _CUEPOINTS))
return group


Expand Down Expand Up @@ -384,7 +384,7 @@ def compute_image_load_store(cfg: ngl.SceneCfg, show_dbg_points=False):

if show_dbg_points:
cuepoints = _get_compute_histogram_cuepoints()
group.add_children(get_debug_points(cfg, cuepoints))
group.add_children(get_points_nodes(cfg, cuepoints))

return group

Expand Down Expand Up @@ -461,7 +461,7 @@ def _get_compute_image_layered_load_store_scene(cfg: ngl.SceneCfg, texture_cls,
group = ngl.Group(children=(compute_store, compute_load_store, draw))

if show_dbg_points:
group.add_children(get_debug_points(cfg, _CUEPOINTS))
group.add_children(get_points_nodes(cfg, _CUEPOINTS))

return group

Expand Down
4 changes: 2 additions & 2 deletions tests/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from pynopegl_utils.tests.cmp_cuepoints import test_cuepoints
from pynopegl_utils.tests.cmp_fingerprint import test_fingerprint
from pynopegl_utils.tests.cuepoints_utils import get_debug_points, get_grid_points
from pynopegl_utils.tests.cuepoints_utils import get_grid_points, get_points_nodes
from pynopegl_utils.tests.data import (
ANIM_DURATION,
LAYOUTS,
Expand Down Expand Up @@ -228,7 +228,7 @@ def _get_data_streamed_buffer_vec4_scene(cfg: ngl.SceneCfg, size, keyframes, sca
group = ngl.Group(children=(draw,))
if show_dbg_points:
cuepoints = get_grid_points(size, size)
group.add_children(get_debug_points(cfg, cuepoints))
group.add_children(get_points_nodes(cfg, cuepoints))
return group


Expand Down
6 changes: 3 additions & 3 deletions tests/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from pynopegl_utils.misc import load_media
from pynopegl_utils.tests.cmp_cuepoints import test_cuepoints
from pynopegl_utils.tests.cuepoints_utils import get_debug_points
from pynopegl_utils.tests.cuepoints_utils import get_points_nodes
from pynopegl_utils.tests.data import (
LAYOUTS,
gen_floats,
Expand All @@ -46,7 +46,7 @@ def _get_live_shared_uniform_scene(cfg: ngl.SceneCfg, color, debug_positions):
draw = ngl.DrawColor(color, geometry=quad)
group.add_children(draw)
if debug_positions:
group.add_children(get_debug_points(cfg, _SHARED_UNIFORM_CUEPOINTS))
group.add_children(get_points_nodes(cfg, _SHARED_UNIFORM_CUEPOINTS))
return group


Expand Down Expand Up @@ -76,7 +76,7 @@ def _get_live_shared_uniform_with_block_scene(cfg: ngl.SceneCfg, color, layout,
draw.update_frag_resources(data=block)
group.add_children(draw)
if debug_positions:
group.add_children(get_debug_points(cfg, _SHARED_UNIFORM_CUEPOINTS))
group.add_children(get_points_nodes(cfg, _SHARED_UNIFORM_CUEPOINTS))
return group


Expand Down
8 changes: 4 additions & 4 deletions tests/texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from pynopegl_utils.misc import get_shader, load_media
from pynopegl_utils.tests.cmp_cuepoints import test_cuepoints
from pynopegl_utils.tests.cmp_fingerprint import test_fingerprint
from pynopegl_utils.tests.cuepoints_utils import get_debug_points, get_grid_points
from pynopegl_utils.tests.cuepoints_utils import get_grid_points, get_points_nodes
from pynopegl_utils.toolbox.colors import COLORS, get_random_color_buffer

import pynopegl as ngl
Expand Down Expand Up @@ -466,7 +466,7 @@ def _get_texture_2d_array_from_mrt_scene(cfg: ngl.SceneCfg, show_dbg_points, sam

group = ngl.Group(children=(rtt, draw))
if show_dbg_points:
group.add_children(get_debug_points(cfg, _CUEPOINTS))
group.add_children(get_points_nodes(cfg, _CUEPOINTS))

return group

Expand Down Expand Up @@ -572,7 +572,7 @@ def _get_texture_3d_from_mrt_scene(cfg: ngl.SceneCfg, show_dbg_points, samples=0

group = ngl.Group(children=(rtt, draw))
if show_dbg_points:
group.add_children(get_debug_points(cfg, _CUEPOINTS))
group.add_children(get_points_nodes(cfg, _CUEPOINTS))

return group

Expand Down Expand Up @@ -640,7 +640,7 @@ def texture_mipmap(cfg: ngl.SceneCfg, show_dbg_points=False):

group = ngl.Group(children=(draw,))
if show_dbg_points:
group.add_children(get_debug_points(cfg, _MIPMAP_CUEPOINTS))
group.add_children(get_points_nodes(cfg, _MIPMAP_CUEPOINTS))

return group

Expand Down

0 comments on commit a1ec5ff

Please sign in to comment.