Skip to content

Commit

Permalink
RF: remove deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
skoudoro committed Dec 11, 2024
1 parent b30a665 commit bd7437c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 41 deletions.
1 change: 0 additions & 1 deletion fury/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ from .shaders import (
attribute_to_actor as attribute_to_actor,
compose_shader as compose_shader,
import_fury_shader as import_fury_shader,
load as load,
load_shader as load_shader,
replace_shader_in_actor as replace_shader_in_actor,
shader_apply_effects as shader_apply_effects,
Expand Down
2 changes: 0 additions & 2 deletions fury/shaders/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ __all__ = [
"compose_shader",
"import_fury_shader",
"load_shader",
"load",
"replace_shader_in_actor",
"shader_apply_effects",
"shader_to_actor",
Expand All @@ -15,7 +14,6 @@ from .base import (
attribute_to_actor,
compose_shader,
import_fury_shader,
load,
load_shader,
replace_shader_in_actor,
shader_apply_effects,
Expand Down
24 changes: 0 additions & 24 deletions fury/shaders/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import fury
from fury.decorators import warn_on_args_to_kwargs
from fury.deprecator import deprecate_with_version
from fury.io import load_text
from fury.lib import (
VTK_OBJECT,
Expand Down Expand Up @@ -146,29 +145,6 @@ def load_shader(shader_file):
return load_text(shader_file)


@deprecate_with_version(
message="Load function has been reimplemented as import_fury_shader.",
since="0.8.1",
until="0.9.0",
)
def load(filename):
"""Load a Fury shader file.
Parameters
----------
filename : str
Filename of the shader file.
Returns
-------
code: str
Shader code.
"""
with open(os.path.join(SHADERS_DIR, filename)) as shader_file:
return shader_file.read()


@warn_on_args_to_kwargs()
def shader_to_actor(
actor,
Expand Down
14 changes: 0 additions & 14 deletions fury/shaders/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
import numpy.testing as npt

from fury import actor, window
from fury.deprecator import ExpiredDeprecationError
from fury.lib import Actor, CellArray, Points, PolyData, PolyDataMapper, numpy_support
from fury.shaders import (
add_shader_callback,
attribute_to_actor,
compose_shader,
import_fury_shader,
load,
load_shader,
replace_shader_in_actor,
shader_to_actor,
Expand Down Expand Up @@ -344,18 +342,6 @@ def test_load_shader():
npt.assert_string_equal(load_shader(fname_test), str_test)


def test_load():
dummy_file_name = "dummy.txt"
dummy_file_contents = "This is some dummy text."

dummy_file = open(os.path.join(SHADERS_DIR, dummy_file_name), "w")
dummy_file.write(dummy_file_contents)
dummy_file.close()

npt.assert_raises(ExpiredDeprecationError, load, dummy_file_name)
os.remove(os.path.join(SHADERS_DIR, dummy_file_name))


def test_replace_shader_in_actor(interactive=False):
scene = window.Scene()
test_actor = generate_points()
Expand Down

0 comments on commit bd7437c

Please sign in to comment.