How to use the fury.deprecator.deprecate_with_version function in fury

To help you get started, we’ve selected a few fury examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fury-gl / fury / fury / window.py View on Github external
@deprecate_with_version("'fury.window.clear' function deprecated, use "
                        "'fury.window.Scene().clear' instead",
                        since='0.2.0', until='0.6.0')
def clear(scene):
    """Remove all actors from the scene.

    .. deprecated:: 0.2.0
          `ren` will be removed in Fury 0.6.0, it is replaced by
          `Scene().clear`
    """
    scene.clear()
github fury-gl / fury / fury / window.py View on Github external
@deprecate_with_version("'fury.window.analyze_renderer' function deprecated, "
                        "use 'fury.window.analyze_scene' instead",
                        since='0.2.0', until='0.6.0')
def analyze_renderer(scene):
    """Report number of actors on the scene.

    .. deprecated:: 0.2.0
        `analyze_renderer` will be removed in Fury 0.3.0, it is replaced by
        `analyze_scene()`
    """
    return analyze_scene(scene)
github fury-gl / fury / fury / window.py View on Github external
@deprecate_with_version("'fury.window.ren' function deprecated, use "
                        "'fury.window.Scene' instead",
                        since='0.2.0', until='0.6.0')
def ren(background=None):
    """Create a Scene.

    .. deprecated:: 0.2.0
          `ren` will be removed in Fury 0.6.0, it is replaced by
          `Scene()`
    """
    return renderer(background=background)
github fury-gl / fury / fury / window.py View on Github external
@deprecate_with_version("'fury.window.renderer' function deprecated, use "
                        "'fury.window.Scene' instead",
                        since='0.2.0', until='0.6.0')
def renderer(background=None):
    """Create a Scene.

    .. deprecated:: 0.2.0
          `renderer` will be removed in Fury 0.6.0, it is replaced by the
          class `Scene()`

    Parameters
    ----------
    background : tuple
        Initial background color of scene

    Returns
    -------
github fury-gl / fury / fury / window.py View on Github external
@deprecate_with_version("'fury.window.add' function deprecated, use "
                        "'fury.window.Scene().add' instead",
                        since='0.2.0', until='0.6.0')
def add(scene, a):
    """Add a specific actor to the scene.

    .. deprecated:: 0.2.0
          `ren` will be removed in Fury 0.6.0, it is replaced by
          `Scene().add`
    """
    scene.add(a)
github fury-gl / fury / fury / window.py View on Github external
@deprecate_with_version("'fury.window.rm' function deprecated, use "
                        "'fury.window.Scene().rm' instead",
                        since='0.2.0', until='0.6.0')
def rm(scene, a):
    """Remove a specific actor from the scene.

    .. deprecated:: 0.2.0
          `ren` will be removed in Fury 0.6.0, it is replaced by
          `Scene().rm`
    """
    scene.rm(a)
github fury-gl / fury / fury / window.py View on Github external
    @deprecate_with_version("Renderer() deprecated, Please use Scene()"
                            "instead", since='0.2.0', until='0.6.0')
    def __init__(self, _parent=None):
        """Init old class with a warning."""
        pass