diff --git a/docs/roles/irods_guisync.md b/docs/roles/irods_guisync.md deleted file mode 100644 index c6e695b0..00000000 --- a/docs/roles/irods_guisync.md +++ /dev/null @@ -1,38 +0,0 @@ -# Role irods_guisync (deprecated) -[back to index](../index.md#Roles) - -## Summary -NB: irods-guisync is deprecated, please use myrods_sync instead. - -Installs desktop application to support data synchronization between a collection -located on an iRODS server and a workspace folder. - -## Requires -Ubuntu desktop environment, iRODS icommands - -## Description -The quisync function is a user-friendly version of the irsync command -found in the iRODS icommands set. The user can select a folder in -the workspace and a collection in the connected iRODS zone plus either -a retrieve or save action. The actual synchronization will be performed -through an irsync function of which the output is presented in a window. - -Guisync assumes an initialized iRODS environment (configured connection). -A desktop launcher for the [iselect](irods_iselect.md) command is installed -as well, to help users initialize their iRODS environment from the desktop. - -## Variables -``` -irods_guisync_dir: "/usr/local/lib/irods_guisync" -``` - -## See also -[irods_icommands](irods_icommands.md) -[myrods_sync](myrods_sync.md) - -## History -2021 Written by Ton Smeele (Utrecht University) - - - -[back to index](../index.md#Roles) diff --git a/playbooks/roles/irods_guisync/defaults/main.yml b/playbooks/roles/irods_guisync/defaults/main.yml deleted file mode 100644 index e5a79cca..00000000 --- a/playbooks/roles/irods_guisync/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -irods_guisync_dir: "/usr/local/lib/irods_guisync" diff --git a/playbooks/roles/irods_guisync/files/IrodsChooserDialog.py b/playbooks/roles/irods_guisync/files/IrodsChooserDialog.py deleted file mode 100644 index 2b13fd8a..00000000 --- a/playbooks/roles/irods_guisync/files/IrodsChooserDialog.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/python -# (c) 2021 Ton Smeele - Utrecht University -# -# class IrodsChooserDialog: -# a treeview dialog in which an iRODS object can be selected -# -# class IrodsChooserStore: -# builds an in-memory store of iRODS collection information -# used as input for the treeview -# -> depends on class IrodsStore, assumes iRODS zone connection established - -import gi -from gi.repository import Gtk -from IrodsStore import IrodsStore - - -class IrodsChooserDialog(Gtk.Dialog): - def __init__(self, store): - super().__init__() - - # initialize the treeview with the provided store data - self.h_store = store - treeview = Gtk.TreeView(model = store) - self.h_treeview = treeview - renderer = Gtk.CellRendererText() - column = Gtk.TreeViewColumn('Folder', renderer,text=0) - treeview.append_column(column) - - # and show result - self.add_buttons( - Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, - Gtk.STOCK_OK, Gtk.ResponseType.OK) - box = self.get_content_area() - box.add(treeview) - self.show_all() - - # returns the iRODS collection path selected by the user (or None) - def get_selection(self): - treeselection = self.h_treeview.get_selection() - model, treeiter = treeselection.get_selected() - if treeiter is not None: - path = model.get_path(treeiter) - pathname = '' - node = [] - for level in range(len(path)): - # retrieve name of path component and add this to pathname - node.append(path[level]) - node_iter = self.h_store.get_iter(node) - name = self.h_store.get_value(node_iter,0) - pathname = pathname + '/' + name - return pathname - return None - - - -class IrodsChooserStore(): - def __init__(self): - self.h_store = Gtk.TreeStore(str) - - # returns a handle to the in-memory store (for provisioning a treeview) - def get_store(self): - return self.h_store - - # loads iRODS collection names hierarchy into the in-memory store - def load_iRODS_collections(self): - # connect to iRODS using an existing access token in .irods - self.istore = IrodsStore() - # we start at /zone/home - root = self.istore.get_localzone_path() + '/home' - self.istore_root = root - self.load_an_iRODS_subcollection(None, root) - self.istore.disconnect() - - def load_an_iRODS_subcollection(self, parent_obj, parent_path): - for coll_path, coll_name in self.istore.subcollections(parent_path): - child_obj = self.h_store.append(parent_obj, [coll_name]) - # also load subtree of child - self.load_an_iRODS_subcollection(child_obj, coll_path) - - def get_path_prefix(self): - # returns /home which can be used as prefix to irods pathnames - return self.istore_root - - - # (only for debug purposes) - # ability to manually populate store with arbitrary label, returns handle to loaded label - def add_name(self, parent_obj, name): - return self.h_store.append(parent_obj, [name]) - diff --git a/playbooks/roles/irods_guisync/files/IrodsStore.py b/playbooks/roles/irods_guisync/files/IrodsStore.py deleted file mode 100644 index a1ebe200..00000000 --- a/playbooks/roles/irods_guisync/files/IrodsStore.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/python -# (c) 2021 Ton Smeele - Utrecht University -# -# IrodsStore manages the interaction with an iRODS zone -# -# -# It assumes that the user has executed iinit or equivalent authentication -# -import os -import json -import ssl -import irods -from irods.session import iRODSSession -from irods.exception import CollectionDoesNotExist - -IRODS_ENV_PATH = '~/.irods/irods_environment.json' - - -class IrodsStore(): - - def __init__(self): - self.session = None - try: - irods_env_file = os.environ['IRODS_ENVIRONMENT_FILE'] - except KeyError: - irods_env_file = os.path.expanduser(IRODS_ENV_PATH) - try: - with open(irods_env_file, 'rt') as f: - json.load(f) - self.irods_env_file = irods_env_file - except IOError: - self.irods_env_file = None - self.connect() - - def __del__(self): - if self.session is not None: - self.disconnect() - - - def connect(self): - if self.irods_env_file is None: - # this case is not yet supported, could ask for credentials - raise IOError('Unable to open iRODS environment file') - ssl_context = ssl.create_default_context( - purpose=ssl.Purpose.SERVER_AUTH, - cafile=None, capath=None, cadata=None) - ssl_settings = {'ssl_context': ssl_context} - self.session = iRODSSession( - irods_env_file=self.irods_env_file, **ssl_settings) - - def disconnect(self): - if self.session is not None: - self.session.cleanup - self.session = None - - def get_hostname(self): - if self.session is None: - return '' - return self.session.host - - - def get_localzone_path(self): - return '/' + self.session.zone - - - # generator - def subcollections(self, path): - try: - coll = self.session.collections.get(path) - except: - # collection does not exist or is inaccessible, just pretend no children - raise StopIteration - for subcoll in coll.subcollections: - yield subcoll.path, subcoll.name diff --git a/playbooks/roles/irods_guisync/files/LogWindow.py b/playbooks/roles/irods_guisync/files/LogWindow.py deleted file mode 100644 index 0ecf29a2..00000000 --- a/playbooks/roles/irods_guisync/files/LogWindow.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/python -# (c) 2021 Ton Smeele - Utrecht University -# -# manages a window that shows (and updates) data read from a textfile -# - -from subprocess import Popen, PIPE -import fcntl -import gi -from gi.repository import Gtk, GLib -import os - -class LogWindow(Gtk.Window): - def __init__(self, shell_command, title): - super().__init__() - self.shell_command = shell_command - if title is not None: - self.props.title = title - self.setup() - - def setup(self): - self.set_default_size(600,400) - self.set_destroy_with_parent(True) - - textview = Gtk.TextView() - self.textview = textview - - scroll = Gtk.ScrolledWindow() - scroll.add(textview) - self.add(scroll) - self.show_all() - - # execute the shell command and collect its output via pipe - sub_process = Popen(self.shell_command, stdout= PIPE, shell= True) - self.sub_process = sub_process - self.timeout_id = GLib.timeout_add(100,self.update_terminal, None) - self.activity_mode = False - - def non_block_read(self, output): - fd = output.fileno() - flags = fcntl.fcntl(fd, fcntl.F_GETFL) - fcntl.fcntl(fd, fcntl.F_SETFL, flags | os.O_NONBLOCK) - try: - return output.read().decode("utf-8") - except: - return '' - - def update_terminal(self, user_data): - self.textview.get_buffer().insert_at_cursor( - self.non_block_read(self.sub_process.stdout)) - return self.sub_process.poll() is None - diff --git a/playbooks/roles/irods_guisync/files/MainWindow.py b/playbooks/roles/irods_guisync/files/MainWindow.py deleted file mode 100644 index 5fc616d5..00000000 --- a/playbooks/roles/irods_guisync/files/MainWindow.py +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/python -# (c) 2021 Ton Smeele - Utrecht University -# -# MainWindow manages the application window -# use the config() method to pass a dict with information - -import gi -from gi.repository import Gtk, GdkPixbuf, Gdk -from IrodsChooserDialog import IrodsChooserDialog, IrodsChooserStore -from IrodsStore import IrodsStore -from LogWindow import LogWindow - -LOGO_FILE = 'UU_logo_2021_EN_RGB_transparant.png' -CSS_FILE = 'guisync.css' -EMPTY_SELECTION = '-> Click to select ' - -# synctypes: 0 = save (to iRODS) 1 = retrieve (from iRODS) -SYNCTYPES = [ - '-> save ->', - '<- retrieve <-' - ] - - -class MainWindow(Gtk.Window): - def __init__(self, data): - super().__init__() - self.data = data - self.setup() - - def setup(self): - self.props.title = self.data['program_name'] - - vbox = Gtk.Box(orientation = Gtk.Orientation.VERTICAL) - vbox.set_spacing(5) - - # show logo and instructions in top/header section of window - header = Gtk.Box() - logo = self.widget_logo() - header.add(logo) - label = Gtk.Label() - label.set_markup('Save valuable data to a Yoda server') - header.add(label) - vbox.add(header) - - # show content in center section of window - grid = Gtk.Grid() - self.h_grid = grid - self.h_grid_rows = 0 - self.add_grid_header() - self.add_grid_row() - vbox.add(grid) - - self.add(vbox) - - # set css style for window - # see: https://docs.gtk.org/gtk3/css-overview.html - css_provider = Gtk.CssProvider() - dirname = self.data['program_directory'] - css_provider.load_from_path(dirname + '/' + CSS_FILE) - Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), - css_provider, - Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) - - def widget_logo(self): - dirname = self.data['program_directory'] - pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale( - filename= dirname + '/' + LOGO_FILE, - width=200, height=200, - preserve_aspect_ratio=True) - logo = Gtk.Image.new_from_pixbuf(pixbuf) - return logo - - def widget_synctype_selector(self): - combo = Gtk.ComboBoxText() - for i in range(len(SYNCTYPES)): - combo.insert(i, str(i), SYNCTYPES[i]) - combo.set_active(0) - return combo - - def widget_clicklabel(self, location): - button = Gtk.Button(label = EMPTY_SELECTION + location) - return button - - - def on_local_folder_clicked(self, widget): - dialog = Gtk.FileChooserDialog( - title = 'Select a directory to synchronize', - parent = self, - action = Gtk.FileChooserAction.SELECT_FOLDER) - dialog.add_buttons( - Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, - Gtk.STOCK_OPEN, Gtk.ResponseType.OK) - current_label = widget.get_label() - if not current_label.startswith(EMPTY_SELECTION): - dialog.set_filename(current_label) - response = dialog.run() - if response == Gtk.ResponseType.OK: - widget.set_label(dialog.get_filename()) - widget.completed = True - dialog.destroy() - - def on_irods_folder_clicked(self, widget): - data = IrodsChooserStore() - data.load_iRODS_collections() - - dialog = IrodsChooserDialog(data.get_store()) - response = dialog.run() - if response == Gtk.ResponseType.OK: - irods_path = dialog.get_selection() - if irods_path is not None: - widget.set_label(irods_path) - widget.path_prefix = data.get_path_prefix() - widget.completed = True - dialog.destroy() - - def on_run_now_clicked(self, widget): - # only act if both local and remote folders are known - if widget.h_local_folder.completed and widget.h_remote_folder.completed: -# print('local folder is :' + widget.h_local_folder.get_label()) -# print('remote folder is:' + widget.h_remote_folder.get_label()) - cmd = build_run_command( - widget.h_local_folder.get_label(), - widget.h_remote_folder.path_prefix + widget.h_remote_folder.get_label(), - widget.h_sync_type.get_active() - ) - log = LogWindow(cmd, 'Synchronization log') - - - def add_grid_header(self): - label_local = Gtk.Label() - label_local.set_markup('Workspace folder') - label_remote = Gtk.Label() - try: - irods_host = IrodsStore().get_hostname() - label_remote.set_markup('Server at ' + irods_host + '') - except: - label_remote.set_markup('Error: No connection to Yoda/iRODS Server, please run "iselect" first') - row = self.h_grid_rows - self.h_grid.attach(label_local, 0, row, 1, 1) - self.h_grid.attach(label_remote, 2, row, 1, 1) - self.h_grid_rows = row + 1 - - - def add_grid_row(self): - # create widgets for the 4 cells: local / sync / remote / run-now - local_folder = self.widget_clicklabel('local folder') - local_folder.completed = False - local_folder.connect("clicked", self.on_local_folder_clicked) - - sync_type = self.widget_synctype_selector() - - remote_folder = self.widget_clicklabel('Yoda/iRODS folder') - remote_folder.completed = False - remote_folder.connect("clicked", self.on_irods_folder_clicked) - - run_now = Gtk.Button(label = 'Run!', border_width = 20) - run_now.h_local_folder = local_folder - run_now.h_remote_folder= remote_folder - run_now.h_sync_type = sync_type - run_now.connect("clicked", self.on_run_now_clicked) - - # place the created widgets in the grid cells of a new row - row = self.h_grid_rows # get current # of rows - self.h_grid.attach(local_folder, 0, row, 1, 1) - self.h_grid.attach(sync_type, 1, row, 1, 1) - self.h_grid.attach(remote_folder, 2, row, 1, 1) - self.h_grid.attach(run_now, 3, row, 1, 1) - self.h_grid_rows = row + 1 - - -def build_run_command(local, remote, sync): - done = ';echo "-- END OF LOG --"' - cmd = 'irsync -r -v ' - if sync == 0: - cmd = cmd + local + ' i:' + remote - if sync == 1: - cmd = cmd + 'i:' + remote + ' ' + local - return cmd + ';echo "DONE!"' diff --git a/playbooks/roles/irods_guisync/files/UU_logo_2021_EN_RGB_transparant.png b/playbooks/roles/irods_guisync/files/UU_logo_2021_EN_RGB_transparant.png deleted file mode 100644 index ca9fcddc..00000000 Binary files a/playbooks/roles/irods_guisync/files/UU_logo_2021_EN_RGB_transparant.png and /dev/null differ diff --git a/playbooks/roles/irods_guisync/files/guisync.css b/playbooks/roles/irods_guisync/files/guisync.css deleted file mode 100644 index f8e14d1e..00000000 --- a/playbooks/roles/irods_guisync/files/guisync.css +++ /dev/null @@ -1,19 +0,0 @@ -@define-color uu_yellow #ffcd00; -@define-color uu_red #c00a35; -@define-color uu_creme #ffe6ab; -@define-color uu_oranje #f3965e; -@define-color uu_bordeauxrood #aa1555; -@define-color uu_bruin #6e3b23; -@define-color uu_groen #24a793; -@define-color uu_blauw #5287c6; -@define-color uu_donkerblauw #001240; -@define-color uu_paars #5b2182; - -window { -background-color: @uu_creme; -} - - - - - diff --git a/playbooks/roles/irods_guisync/files/guisync.py b/playbooks/roles/irods_guisync/files/guisync.py deleted file mode 100755 index a415e6c6..00000000 --- a/playbooks/roles/irods_guisync/files/guisync.py +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/python3 -# (C) 2021 Ton Smeele - Utrecht University -# -# guisync is a wrapper around irsync to provide for a graphical user interface -# -# For using Gtk3 please see: -# https://python-gtk-3-tutorial.readthedocs.io/en/latest/layout.html - -PROGRAM_NAME = 'Yoda-sync' -PROGRAM_VERSION = '0.2' - -import gi -import os -from os.path import realpath, dirname -import sys -import getopt - -# GUI related imports, first check if user interface is compatible -if not 'DISPLAY' in os.environ: - print('Error: This program requires a graphical user interface') - exit(1) -gi.require_version("Gtk", "3.0") -from gi.repository import Gtk -from MainWindow import * - - -def main(opts, args): - program_dir = os.path.dirname(os.path.realpath(__file__)) - data = { - 'program_name' : PROGRAM_NAME, - 'program_version' : PROGRAM_VERSION, - 'program_directory': program_dir, - 'opts' : opts, - 'args' : args - } - try: - win = MainWindow(data) - win.connect("destroy", Gtk.main_quit) - win.show_all() - Gtk.main() - except: - print('Error: Could not initiate GUI') - exit(2) - - -def help(): - text = ''' - Usage: guisync [-hv] - - Options: - -h show this help - -v show program version - ''' - print(text) - - -# main program -if __name__ == "__main__": - - try: - opts, args = getopt.getopt(sys.argv[1:], 'hv') - except: - print('Error: Invalid program arguments specified. Use -h for help.') - exit(1) - - quit = False - for opt, arg in opts: - opt = opt.lower() - if opt == '-v': - print(PROGRAM_NAME + ' release ' + PROGRAM_VERSION) - quit = True - if opt == '-h': - help() - quit = True - if quit: - exit(0) - - main(opts, args) - diff --git a/playbooks/roles/irods_guisync/files/icon-irods.txt b/playbooks/roles/irods_guisync/files/icon-irods.txt deleted file mode 100644 index 34042e9b..00000000 --- a/playbooks/roles/irods_guisync/files/icon-irods.txt +++ /dev/null @@ -1 +0,0 @@ -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtAgMAAABHdAoJAAAHY3pUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjazVhbtusqDvzXKHoIFiAQw+G51p1BD79L2Hlu5yQn+350vGI7GCOoKj0Ijf/+M+k/+PiQNwqSNOYYN3xCDtkV3Oi2f/Yrb2Gd18f14xk/ttP1gUOTx9XvP+M4+he0y+2FFI72+thOqR3j6DEQXwdeH2+W7f7op8dA3u3tfPymfLxXwt1yjq9rx7CXZT39DglgdMF43pEbnv2Gs5oVb1/2BVe/zoJOjLaC33m1pHPs6Hr7BN717gm7rRzt/hEK2uLRIT5hdLSzPLX7qxn3MCO+WX54oO0C70/s5uw659hXV0IEUpGORV2Wsu7QsQJKv16LOBK+gvu0joxDscQGxjrMVRyNOLMD2pMDdy48eaxr44YpBjdcwtW5Bg6sTX1y2TVvFAQ7eLoEGjp5BScNrHk0u+tceNnNy15jheXO6OkYgxmLPw46a/zmuA40p2HLvOkVK8zLmaYxDWPOzugFQngemMrCdx10p5vtjlgPBmXBrFhg2eo+RBW+acsvnj36yRZo212DUz8GAESwLZgMezCwRfbCkbfkX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AlkHliIbg4rCGInEY4ZaicxCuxuCgeI76AADvbShpY5W8qAAAAABJRU5ErkJggg== diff --git a/playbooks/roles/irods_guisync/files/irods-48x48.png b/playbooks/roles/irods_guisync/files/irods-48x48.png deleted file mode 100644 index e5dad050..00000000 Binary files a/playbooks/roles/irods_guisync/files/irods-48x48.png and /dev/null differ diff --git a/playbooks/roles/irods_guisync/meta/main.yml b/playbooks/roles/irods_guisync/meta/main.yml deleted file mode 100644 index 818d0f68..00000000 --- a/playbooks/roles/irods_guisync/meta/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -dependencies: - - irods_icommands diff --git a/playbooks/roles/irods_guisync/tasks/desktop.yml b/playbooks/roles/irods_guisync/tasks/desktop.yml deleted file mode 100644 index 51f7250a..00000000 --- a/playbooks/roles/irods_guisync/tasks/desktop.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -# generic script to configure a Linux application as desktop menu item -# the following files must be present in role/files: -# -# multiple icon files: ( {{ s }} refers to a size in pixels -# {{ app-name }}-{{s}}x{{s}}.png -# -# launcher file: -# {{ app-name }}.desktop -# -# customize this script for an application by changing the set_fact task -# so that app_name refers to the application -# and add/delete resolution sizes in the with_items for the icon files -# -- name: install xdg utilities - package: - name: "xdg-utils" - state: present - -- name: set app_name - set_fact: - app_name: "irods" - -- name: copy icon files to /tmp - copy: - src: "{{ app_name }}-{{ item }}x{{ item }}.png" - dest: "/tmp/{{ app_name }}-{{ item }}x{{ item }}.png" - mode: 0644 - with_items: - # - "16" - #- "22" - #- "32" - - "48" - #- "96" - #- "128" - -- name: install icons as xdg resource - command: "xdg-icon-resource install --novendor --context apps --size {{ item }} /tmp/{{ app_name }}-{{ item }}x{{ item }}.png {{ app_name }}" - with_items: - #- "16" - #- "22" - #- "32" - - "48" - #- "96" - #- "128" - -- name: copy desktop launcher file to /tmp - template: - src: "{{ item }}.desktop.j2" - dest: "/tmp/{{ item }}.desktop" - mode: 0644 - with_items: - - "irods_guisync" - - "irods_iselect" - -- name: install launcher in system-wide desktop menu - command: "xdg-desktop-menu install --novendor /tmp/{{ item }}.desktop" - with_items: - - "irods_guisync" - - "irods_iselect" - - - - diff --git a/playbooks/roles/irods_guisync/tasks/main.yml b/playbooks/roles/irods_guisync/tasks/main.yml deleted file mode 100644 index c9875e74..00000000 --- a/playbooks/roles/irods_guisync/tasks/main.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- - -- name: pip install python-irodsclient - pip: - name: python-irodsclient - executable: pip3 - -- name: create target directory for guisync files - file: - dest: "{{ irods_guisync_dir }}" - state: directory - mode: 0755 - owner: root - group: root - -- name: copy irods_guisync files to target dir - copy: - src: "{{ item }}" - dest: "{{ irods_guisync_dir }}/{{ item }}" - mode: 0755 - with_items: - - "guisync.py" - - "guisync.css" - - "UU_logo_2021_EN_RGB_transparant.png" - - "MainWindow.py" - - "LogWindow.py" - - "IrodsStore.py" - - "IrodsChooserDialog.py" - -- name: install desktop launcher for irods_guisync - include: desktop.yml diff --git a/playbooks/roles/irods_guisync/templates/irods_guisync.desktop.j2 b/playbooks/roles/irods_guisync/templates/irods_guisync.desktop.j2 deleted file mode 100644 index 56ea8e38..00000000 --- a/playbooks/roles/irods_guisync/templates/irods_guisync.desktop.j2 +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Yoda data-sync -Exec={{ irods_guisync_dir }}/guisync.py -Icon={{ app_name }} -Terminal=false -StartupNotify=true -Type=Application -Categories=Development;Science diff --git a/playbooks/roles/irods_guisync/templates/irods_iselect.desktop.j2 b/playbooks/roles/irods_guisync/templates/irods_iselect.desktop.j2 deleted file mode 100644 index 0d7884e9..00000000 --- a/playbooks/roles/irods_guisync/templates/irods_iselect.desktop.j2 +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Yoda iSelect (connect Yoda server) -Exec=/usr/bin/iselect -Icon={{ app_name }} -Terminal=true -StartupNotify=true -Type=Application -Categories=Development;Science