From 0a2a9c9ae4d446ac631edab679dfc78c87bc82ea Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 12 Oct 2024 20:53:41 +0530 Subject: [PATCH] fix: ci --- docs/examples/collision-particles.py | 5 ++++- docs/examples/viz_animated_surfaces.py | 5 ++++- docs/examples/viz_billboard_sdf_spheres.py | 20 +++++++++++++++----- docs/examples/viz_brownian_motion.py | 4 +++- docs/examples/viz_buttons.py | 4 +++- docs/examples/viz_camera.py | 8 ++++++-- docs/examples/viz_color_interpolators.py | 4 +++- docs/examples/viz_custom_interpolator.py | 4 +++- docs/examples/viz_drawpanel.py | 4 +++- docs/examples/viz_earth_animation.py | 9 +++++++-- docs/examples/viz_earth_coordinates.py | 4 +++- docs/examples/viz_fine_tuning_gl_context.py | 4 +++- docs/examples/viz_fractals.py | 5 ++++- docs/examples/viz_interaction.py | 4 +++- docs/examples/viz_interpolators.py | 4 +++- docs/examples/viz_network_animated.py | 10 ++++++++-- docs/examples/viz_no_interaction.py | 4 +++- docs/examples/viz_picking.py | 5 ++++- docs/examples/viz_play_video.py | 5 ++++- docs/examples/viz_robot_arm_animation.py | 5 ++++- docs/examples/viz_sdfactor.py | 4 +++- docs/examples/viz_shapes.py | 4 +++- docs/examples/viz_spinbox.py | 4 +++- docs/examples/viz_spline_interpolator.py | 4 +++- docs/examples/viz_ui.py | 4 +++- docs/examples/viz_ui_listbox.py | 4 +++- docs/examples/viz_ui_slider.py | 4 +++- docs/examples/viz_using_time_equations.py | 5 ++++- 28 files changed, 115 insertions(+), 35 deletions(-) diff --git a/docs/examples/collision-particles.py b/docs/examples/collision-particles.py index 73990c9d1..11fedc583 100644 --- a/docs/examples/collision-particles.py +++ b/docs/examples/collision-particles.py @@ -123,7 +123,10 @@ def collision(): box_directions = np.array([[0, 1, 0]]) box_colors = np.array([[1, 1, 1, 0.2]]) box_actor = actor.box( - box_centers, directions=box_directions, colors=box_colors, scales=(box_lx, box_ly, box_lz) + box_centers, + directions=box_directions, + colors=box_colors, + scales=(box_lx, box_ly, box_lz) ) scene.add(box_actor) diff --git a/docs/examples/viz_animated_surfaces.py b/docs/examples/viz_animated_surfaces.py index 0aea16c20..f1754ea86 100644 --- a/docs/examples/viz_animated_surfaces.py +++ b/docs/examples/viz_animated_surfaces.py @@ -207,4 +207,7 @@ def timer_callback(_obj, _event): if interactive: showm.start() -fury.window.record(scene=showm.scene, size=(600, 600), out_path="viz_animated_surfaces.png") +fury.window.record(scene=showm.scene, + size=(600, 600), + out_path="viz_animated_surfaces.png" +) diff --git a/docs/examples/viz_billboard_sdf_spheres.py b/docs/examples/viz_billboard_sdf_spheres.py index 74fd293d4..30995f58c 100644 --- a/docs/examples/viz_billboard_sdf_spheres.py +++ b/docs/examples/viz_billboard_sdf_spheres.py @@ -92,7 +92,9 @@ if interactive: fury.window.show(scene) else: - fury.window.record(scene=scene, size=(600, 600), out_path="viz_low_res_wireframe.png") + fury.window.record(scene=scene, + size=(600, 600), + out_path="viz_low_res_wireframe.png") ############################################################################### # Let's clean the scene and play with the parameters `phi` and `theta`. @@ -106,7 +108,9 @@ if interactive: fury.window.show(scene) else: - fury.window.record(scene=scene, size=(600, 600), out_path="viz_hi_res_wireframe.png") + fury.window.record(scene=scene, + size=(600, 600), + out_path="viz_hi_res_wireframe.png") ############################################################################### # As you might have noticed, these parameters control the resolution of the @@ -137,7 +141,9 @@ if interactive: fury.window.show(scene) else: - fury.window.record(scene=scene, size=(600, 600), out_path="viz_billboards_wireframe.png") + fury.window.record(scene=scene, + size=(600, 600), + out_path="viz_billboards_wireframe.png") ############################################################################### # If you interacted with this actor, you might have noticed how it always @@ -187,7 +193,9 @@ if interactive: fury.window.show(scene) else: - fury.window.record(scene=scene, size=(600, 600), out_path="viz_billboards_circles.png") + fury.window.record(scene=scene, + size=(600, 600), + out_path="viz_billboards_circles.png") ############################################################################### # Hold on, those actors don't look exactly like the ones we created using @@ -280,7 +288,9 @@ if interactive: fury.window.show(scene) else: - fury.window.record(scene=scene, size=(600, 600), out_path="viz_billboards_spheres.png") + fury.window.record(scene=scene, + size=(600, 600), + out_path="viz_billboards_spheres.png") ############################################################################### # References diff --git a/docs/examples/viz_brownian_motion.py b/docs/examples/viz_brownian_motion.py index 88fe8f206..d5cafdd14 100644 --- a/docs/examples/viz_brownian_motion.py +++ b/docs/examples/viz_brownian_motion.py @@ -155,4 +155,6 @@ def timer_callback(_obj, _event): showm.add_timer_callback(True, 30, timer_callback) showm.start() -fury.window.record(scene=showm.scene, size=(600, 600), out_path="viz_brownian_motion.png") +fury.window.record(scene=showm.scene, + size=(600, 600), + out_path="viz_brownian_motion.png") diff --git a/docs/examples/viz_buttons.py b/docs/examples/viz_buttons.py index 0cbc172ef..473a8db45 100644 --- a/docs/examples/viz_buttons.py +++ b/docs/examples/viz_buttons.py @@ -88,4 +88,6 @@ def change_icon_callback(i_ren, _obj, _button): if interactive: show_manager.start() -fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_button.png") +fury.window.record(scene=show_manager.scene, + size=current_size, + out_path="viz_button.png") diff --git a/docs/examples/viz_camera.py b/docs/examples/viz_camera.py index 5533ca5e5..213399082 100644 --- a/docs/examples/viz_camera.py +++ b/docs/examples/viz_camera.py @@ -87,7 +87,9 @@ # and radius. actors = [ fury.actor.sphere( - np.array([[0, 0, 0]]), np.random.random([1, 3]), radii=np.random.random([1, 3]) + np.array([[0, 0, 0]]), + np.random.random([1, 3]), + radii=np.random.random([1, 3]) ) ] @@ -176,4 +178,6 @@ if interactive: showm.start() -fury.window.record(scene=scene, out_path="viz_keyframe_animation_camera.png", size=(900, 768)) +fury.window.record(scene=scene, + out_path="viz_keyframe_animation_camera.png", + size=(900, 768)) diff --git a/docs/examples/viz_color_interpolators.py b/docs/examples/viz_color_interpolators.py index b38f5f7b8..c2ee88cc7 100644 --- a/docs/examples/viz_color_interpolators.py +++ b/docs/examples/viz_color_interpolators.py @@ -108,4 +108,6 @@ if interactive: showm.start() -window.record(scene=scene, out_path="viz_keyframe_animation_colors.png", size=(900, 768)) +window.record(scene=scene, + out_path="viz_keyframe_animation_colors.png", + size=(900, 768)) diff --git a/docs/examples/viz_custom_interpolator.py b/docs/examples/viz_custom_interpolator.py index 3d30f10e3..a9c25b780 100644 --- a/docs/examples/viz_custom_interpolator.py +++ b/docs/examples/viz_custom_interpolator.py @@ -164,4 +164,6 @@ def interpolate(t): if interactive: showm.start() -window.record(scene=scene, out_path="viz_keyframe_custom_interpolator.png", size=(900, 768)) +window.record(scene=scene, + out_path="viz_keyframe_custom_interpolator.png", + size=(900, 768)) diff --git a/docs/examples/viz_drawpanel.py b/docs/examples/viz_drawpanel.py index 9675c5474..0ad139b53 100644 --- a/docs/examples/viz_drawpanel.py +++ b/docs/examples/viz_drawpanel.py @@ -42,4 +42,6 @@ drawing_canvas.draw_shape(shape_type="circle", current_position=(275, 275)) drawing_canvas.shape_list[-1].resize((50, 50)) - fury.window.record(scene=showm.scene, size=current_size, out_path="viz_drawpanel.png") + fury.window.record(scene=showm.scene, + size=current_size, + out_path="viz_drawpanel.png") diff --git a/docs/examples/viz_earth_animation.py b/docs/examples/viz_earth_animation.py index acb988d23..30bc6597d 100644 --- a/docs/examples/viz_earth_animation.py +++ b/docs/examples/viz_earth_animation.py @@ -94,7 +94,10 @@ # Also creating a text actor to add below the sphere. text_actor = fury.actor.text_3d( - "Bloomington, Indiana", position=(-0.42, 0.31, 0.03), color=fury.window.colors.white, font_size=0.004 + "Bloomington, Indiana", + position=(-0.42, 0.31, 0.03), + color=fury.window.colors.white, + font_size=0.004 ) fury.utils.rotate(text_actor, rotation=(-90, 0, 1, 0)) @@ -166,4 +169,6 @@ def timer_callback(_obj, _event): showm.add_timer_callback(True, 35, timer_callback) showm.start() -fury.window.record(scene=showm.scene, size=(900, 768), out_path="viz_earth_animation.png") +fury.window.record(scene=showm.scene, + size=(900, 768), + out_path="viz_earth_animation.png") diff --git a/docs/examples/viz_earth_coordinates.py b/docs/examples/viz_earth_coordinates.py index 291fe91cd..a683795f8 100644 --- a/docs/examples/viz_earth_coordinates.py +++ b/docs/examples/viz_earth_coordinates.py @@ -156,4 +156,6 @@ def timer_callback(_obj, _event): showm.add_timer_callback(True, 25, timer_callback) showm.start() -fury.window.record(scene=showm.scene, size=(900, 768), out_path="viz_earth_coordinates.png") +fury.window.record(scene=showm.scene, + size=(900, 768), + out_path="viz_earth_coordinates.png") diff --git a/docs/examples/viz_fine_tuning_gl_context.py b/docs/examples/viz_fine_tuning_gl_context.py index 0bba26c58..d368913d6 100644 --- a/docs/examples/viz_fine_tuning_gl_context.py +++ b/docs/examples/viz_fine_tuning_gl_context.py @@ -154,4 +154,6 @@ def timer_callback(obj, event): if interactive: showm.start() -fury.window.record(scene=scene, out_path="viz_fine_tuning_gl_context.png", size=(600, 600)) +fury.window.record(scene=scene, + out_path="viz_fine_tuning_gl_context.png", + size=(600, 600)) diff --git a/docs/examples/viz_fractals.py b/docs/examples/viz_fractals.py index e6bd90660..f6883ccf9 100644 --- a/docs/examples/viz_fractals.py +++ b/docs/examples/viz_fractals.py @@ -221,7 +221,10 @@ def gen_centers(depth, pos, center, side): # the Scene and ShowManager. scene = fury.window.Scene() -showmgr = fury.window.ShowManager(scene=scene, title="Fractals", size=(800, 800), reset_camera=True) +showmgr = fury.window.ShowManager(scene=scene, + title="Fractals", + size=(800, 800), + reset_camera=True) ############################################################################### # These values are what work nicely on my machine without lagging. If you have diff --git a/docs/examples/viz_interaction.py b/docs/examples/viz_interaction.py index 932918dce..8ccc7c34e 100644 --- a/docs/examples/viz_interaction.py +++ b/docs/examples/viz_interaction.py @@ -141,4 +141,6 @@ stream.cleanup() stream_interaction.cleanup() - fury.window.record(scene=showm.scene, size=window_size, out_path="viz_interaction.png") + fury.window.record(scene=showm.scene, + size=window_size, + out_path="viz_interaction.png") diff --git a/docs/examples/viz_interpolators.py b/docs/examples/viz_interpolators.py index 4674e8b19..0a372a8c6 100644 --- a/docs/examples/viz_interpolators.py +++ b/docs/examples/viz_interpolators.py @@ -131,4 +131,6 @@ if interactive: showm.start() -fury.window.record(scene=scene, out_path="viz_keyframe_interpolator.png", size=(900, 768)) +fury.window.record(scene=scene, + out_path="viz_keyframe_interpolator.png", + size=(900, 768)) diff --git a/docs/examples/viz_network_animated.py b/docs/examples/viz_network_animated.py index 0966f5c02..9af4298eb 100644 --- a/docs/examples/viz_network_animated.py +++ b/docs/examples/viz_network_animated.py @@ -238,7 +238,11 @@ def _timer(_obj, _event): # more time. showm = fury.window.ShowManager( - scene=scene, reset_camera=False, size=(900, 768), order_transparent=True, multi_samples=8 + scene=scene, + reset_camera=False, + size=(900, 768), + order_transparent=True, + multi_samples=8 ) @@ -254,4 +258,6 @@ def _timer(_obj, _event): showm.start() -fury.window.record(scene=showm.scene, size=(900, 768), out_path="viz_animated_networks.png") +fury.window.record(scene=showm.scene, + size=(900, 768), + out_path="viz_animated_networks.png") diff --git a/docs/examples/viz_no_interaction.py b/docs/examples/viz_no_interaction.py index 035dbf1c0..d8dbb2844 100644 --- a/docs/examples/viz_no_interaction.py +++ b/docs/examples/viz_no_interaction.py @@ -99,4 +99,6 @@ stream.stop() stream.cleanup() - fury.window.record(scene=showm.scene, size=window_size, out_path="viz_no_interaction.png") + fury.window.record(scene=showm.scene, + size=window_size, + out_path="viz_no_interaction.png") diff --git a/docs/examples/viz_picking.py b/docs/examples/viz_picking.py index 8df9291d7..d0d03738f 100644 --- a/docs/examples/viz_picking.py +++ b/docs/examples/viz_picking.py @@ -47,7 +47,10 @@ [0, np.sqrt(2) / 2, np.sqrt(2) / 2], ] ) -fury_actor = fury.actor.cube(centers, directions=directions, colors=colors, scales=radii) +fury_actor = fury.actor.cube(centers, + directions=directions, + colors=colors, + scales=radii) ############################################################################### # Access the memory of the vertices of all the cubes diff --git a/docs/examples/viz_play_video.py b/docs/examples/viz_play_video.py index c75745071..ac07a7406 100644 --- a/docs/examples/viz_play_video.py +++ b/docs/examples/viz_play_video.py @@ -49,7 +49,10 @@ def __init__(self, video, time=10): self.initialize_scene() # Create a Show Manager and Initialize it self.show_manager = fury.window.ShowManager( - scene=self.scene, size=(900, 768), reset_camera=False, order_transparent=True + scene=self.scene, + size=(900, 768), + reset_camera=False, + order_transparent=True ) # Initialize the Scene with actors diff --git a/docs/examples/viz_robot_arm_animation.py b/docs/examples/viz_robot_arm_animation.py index cba585549..6c214c0bf 100644 --- a/docs/examples/viz_robot_arm_animation.py +++ b/docs/examples/viz_robot_arm_animation.py @@ -53,7 +53,10 @@ ############################################################################### # Creating animations -main_arm_animation = fury.animation.Animation(actors=[main_arm, joint_1], length=2 * np.pi) +main_arm_animation = fury.animation.Animation( + actors=[main_arm, joint_1], + length=2*np.pi +) child_arm_animation = fury.animation.Animation(actors=[sub_arm, joint_2]) drill_animation = fury.animation.Animation(actors=end) diff --git a/docs/examples/viz_sdfactor.py b/docs/examples/viz_sdfactor.py index a62d6034a..8b1b4c24e 100644 --- a/docs/examples/viz_sdfactor.py +++ b/docs/examples/viz_sdfactor.py @@ -53,7 +53,9 @@ # manager. current_size = (1024, 720) -showm = fury.window.ShowManager(scene=scene, size=current_size, title="Visualize SDF Actor") +showm = fury.window.ShowManager(scene=scene, + size=current_size, + title="Visualize SDF Actor") interactive = False diff --git a/docs/examples/viz_shapes.py b/docs/examples/viz_shapes.py index a095b8101..3d08559b2 100644 --- a/docs/examples/viz_shapes.py +++ b/docs/examples/viz_shapes.py @@ -51,4 +51,6 @@ if interactive: show_manager.start() -fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_shapes.png") +fury.window.record(scene=show_manager.scene, + size=current_size, + out_path="viz_shapes.png") diff --git a/docs/examples/viz_spinbox.py b/docs/examples/viz_spinbox.py index fb5000959..69f36a8b0 100644 --- a/docs/examples/viz_spinbox.py +++ b/docs/examples/viz_spinbox.py @@ -75,4 +75,6 @@ def rotate_cone(spinbox): if interactive: show_manager.start() -fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_spinbox.png") +fury.window.record(scene=show_manager.scene, + size=current_size, + out_path="viz_spinbox.png") diff --git a/docs/examples/viz_spline_interpolator.py b/docs/examples/viz_spline_interpolator.py index a9b80f827..b6c83454e 100644 --- a/docs/examples/viz_spline_interpolator.py +++ b/docs/examples/viz_spline_interpolator.py @@ -92,4 +92,6 @@ if interactive: showm.start() -fury.window.record(scene=scene, out_path="viz_keyframe_animation_spline.png", size=(900, 768)) +fury.window.record(scene=scene, + out_path="viz_keyframe_animation_spline.png", + size=(900, 768)) diff --git a/docs/examples/viz_ui.py b/docs/examples/viz_ui.py index 5cddcda8e..be309cdf8 100644 --- a/docs/examples/viz_ui.py +++ b/docs/examples/viz_ui.py @@ -310,4 +310,6 @@ def display_element(): if interactive: show_manager.start() -fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_fury.ui.png") +fury.window.record(scene=show_manager.scene, + size=current_size, + out_path="viz_fury.ui.png") diff --git a/docs/examples/viz_ui_listbox.py b/docs/examples/viz_ui_listbox.py index e7076c8f8..bf17e5fd7 100644 --- a/docs/examples/viz_ui_listbox.py +++ b/docs/examples/viz_ui_listbox.py @@ -76,4 +76,6 @@ def display_element(): if interactive: show_manager.start() -fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_listbox.png") +fury.window.record(scene=show_manager.scene, + size=current_size, + out_path="viz_listbox.png") diff --git a/docs/examples/viz_ui_slider.py b/docs/examples/viz_ui_slider.py index 02978e0e9..40654500d 100644 --- a/docs/examples/viz_ui_slider.py +++ b/docs/examples/viz_ui_slider.py @@ -149,4 +149,6 @@ def translate_cube_hor(slider): if interactive: show_manager.start() -fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_slider.png") +fury.window.record(scene=show_manager.scene, + size=current_size, + out_path="viz_slider.png") diff --git a/docs/examples/viz_using_time_equations.py b/docs/examples/viz_using_time_equations.py index 4f6c52f0e..10718e1d2 100644 --- a/docs/examples/viz_using_time_equations.py +++ b/docs/examples/viz_using_time_equations.py @@ -17,7 +17,10 @@ ) -cube = fury.actor.cube(np.array([[0, 0, 0]]), directions=(0, 0, 0), colors=(1, 0, 1), scales=6) +cube = fury.actor.cube(np.array([[0, 0, 0]]), + directions=(0, 0, 0), + colors=(1, 0, 1), + scales=6) ############################################################################### # Creating an ``Animation`` to animate the actor and show its motion path.