From a1ec5ff8473eed9df29e541b542a873cde73359d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Mon, 25 Mar 2024 13:26:45 +0100 Subject: [PATCH] tests: rename get_debug_points() to get_points_nodes() --- pynopegl-utils/pynopegl_utils/tests/cuepoints_utils.py | 2 +- pynopegl-utils/pynopegl_utils/tests/data.py | 4 ++-- tests/blending.py | 4 ++-- tests/compute.py | 8 ++++---- tests/data.py | 4 ++-- tests/live.py | 6 +++--- tests/texture.py | 8 ++++---- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pynopegl-utils/pynopegl_utils/tests/cuepoints_utils.py b/pynopegl-utils/pynopegl_utils/tests/cuepoints_utils.py index b057dc856..32188f199 100644 --- a/pynopegl-utils/pynopegl_utils/tests/cuepoints_utils.py +++ b/pynopegl-utils/pynopegl_utils/tests/cuepoints_utils.py @@ -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, diff --git a/pynopegl-utils/pynopegl_utils/tests/data.py b/pynopegl-utils/pynopegl_utils/tests/data.py index 081710747..6e753a3ab 100644 --- a/pynopegl-utils/pynopegl_utils/tests/data.py +++ b/pynopegl-utils/pynopegl_utils/tests/data.py @@ -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 @@ -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 diff --git a/tests/blending.py b/tests/blending.py index e2f3f0589..025e879b8 100644 --- a/tests/blending.py +++ b/tests/blending.py @@ -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 @@ -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) diff --git a/tests/compute.py b/tests/compute.py index 73002b084..fdb9095d1 100644 --- a/tests/compute.py +++ b/tests/compute.py @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/tests/data.py b/tests/data.py index 05080e525..0a5c80c7d 100644 --- a/tests/data.py +++ b/tests/data.py @@ -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, @@ -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 diff --git a/tests/live.py b/tests/live.py index 2a81a3a5c..14ca5dfca 100644 --- a/tests/live.py +++ b/tests/live.py @@ -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, @@ -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 @@ -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 diff --git a/tests/texture.py b/tests/texture.py index 44bebe8a8..aad00dd47 100644 --- a/tests/texture.py +++ b/tests/texture.py @@ -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 @@ -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 @@ -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 @@ -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