How to use the jupyter-innotater.jupyter_innotater.__meta__.semver_range function in jupyter-innotater

To help you get started, we’ve selected a few jupyter-innotater 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 ideonate / jupyter-innotater / jupyter-innotater / jupyter_innotater / innotaterwidget.py View on Github external
import ipywidgets as widgets
from ipywidgets import HBox, VBox, IntSlider, Button
from traitlets import Int, observe, Unicode, Bool

from .manager import DataManager
from .__meta__ import semver_range
from .mixins import ChildrenChangeNotifierMixin, DataChangeNotifierMixin

@widgets.register
class Innotater(VBox):  #VBox
    _view_name = Unicode('InnotaterView').tag(sync=True)
    _model_name = Unicode('InnotaterModel').tag(sync=True)
    _view_module = Unicode('jupyter-innotater').tag(sync=True)
    _model_module = Unicode('jupyter-innotater').tag(sync=True)
    _view_module_version = Unicode(semver_range).tag(sync=True)
    _model_module_version = Unicode(semver_range).tag(sync=True)

    index = Int().tag(sync=True)
    keyboard_shortcuts = Bool(False).tag(sync=True)
    is_dirty = Bool(False).tag(sync=True)

    def __init__(self, inputs, targets, indexes=None, keyboard_shortcuts=True, save_hook=None):

        self.path = ''

        self.dirty_uindexes = set()

        self.save_hook = save_hook

        self.datamanager = DataManager(inputs, targets, indexes)
github ideonate / jupyter-innotater / jupyter-innotater / jupyter_innotater / innotaterwidget.py View on Github external
import ipywidgets as widgets
from ipywidgets import HBox, VBox, IntSlider, Button
from traitlets import Int, observe, Unicode, Bool

from .manager import DataManager
from .__meta__ import semver_range
from .mixins import ChildrenChangeNotifierMixin, DataChangeNotifierMixin

@widgets.register
class Innotater(VBox):  #VBox
    _view_name = Unicode('InnotaterView').tag(sync=True)
    _model_name = Unicode('InnotaterModel').tag(sync=True)
    _view_module = Unicode('jupyter-innotater').tag(sync=True)
    _model_module = Unicode('jupyter-innotater').tag(sync=True)
    _view_module_version = Unicode(semver_range).tag(sync=True)
    _model_module_version = Unicode(semver_range).tag(sync=True)

    index = Int().tag(sync=True)
    keyboard_shortcuts = Bool(False).tag(sync=True)
    is_dirty = Bool(False).tag(sync=True)

    def __init__(self, inputs, targets, indexes=None, keyboard_shortcuts=True, save_hook=None):

        self.path = ''

        self.dirty_uindexes = set()

        self.save_hook = save_hook

        self.datamanager = DataManager(inputs, targets, indexes)

        slider = IntSlider(min=0, max=0)
github ideonate / jupyter-innotater / jupyter-innotater / jupyter_innotater / customwidgets.py View on Github external
import ipywidgets as widgets
from ipywidgets.widgets import CallbackDispatcher
from traitlets import Unicode
from .__meta__ import semver_range


@widgets.register
class FocusText(widgets.Text):
    _view_name = Unicode('FocusTextView').tag(sync=True)
    _view_module = Unicode('jupyter-innotater').tag(sync=True)
    _view_module_version = Unicode(semver_range).tag(sync=True)

    def __init__(self, **kwargs):
        super(FocusText, self).__init__(**kwargs)
        self._click_handlers = CallbackDispatcher()
        self.on_msg(self._handle_focustext_msg)

    def on_click(self, callback, remove=False):
        """Register a callback to execute when the button is clicked.

        The callback will be called with one argument, the clicked button
        widget instance.

        Parameters
        ----------
        remove: bool (optional)
            Set to true to remove the callback from the list of callbacks.