From 4cea592391b31ff8d63c6967b4e96a57d7ca01cb Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Tue, 16 Jan 2018 14:22:53 +0100 Subject: [PATCH 1/8] [setup] Fix README PyPI display hickup --- setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.py b/setup.py index c5f1733..5c6ea8b 100644 --- a/setup.py +++ b/setup.py @@ -39,9 +39,6 @@ class PackageNotFoundError(Exception): with open(readme) as f: description_text = f.read() -with open("LICENSE") as f: - license_text = f.read() - packages = [ 'odmlui', 'odmlui.dnd', @@ -72,6 +69,6 @@ class PackageNotFoundError(Exception): data_files=data_files, long_description=description_text, classifiers=CLASSIFIERS, - license=license_text, + license="BSD", test_suite='test' ) From 1e25cc2330bcff2457dc8a1c10f72090c02db010 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Wed, 17 Jan 2018 11:29:01 +0100 Subject: [PATCH 2/8] [travis] Reduce osx builds to one --- .travis.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33659ea..64bfebe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,13 +42,6 @@ matrix: - CONDA=Y - CONDAPY=3.5 - - os: osx - language: generic - env: - - OSXENV=2.7 - - CONDA=Y - - CONDAPY=2.7 - - os: osx language: generic env: @@ -56,6 +49,27 @@ matrix: - CONDA=Y - CONDAPY=3.5 +# Keep only one osx branch active for now +# since currently osx builds on travis +# are frequently stalled or indefinitely delayed. +# - os: osx +# language: generic +# env: +# - OSXENV=2.7 +# - CONDA=Y +# - CONDAPY=2.7 +# - os: osx +# language: generic +# env: +# - OSXENV=2.7 +# - CONDA=N +# - os: osx +# language: generic +# env: +# - OSXENV=3.5 +# - CONDA=N + + before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash resources/install_osx_virtualenv.sh; fi - if [[ "$CONDA" == "N" ]]; then bash resources/install_dependencies.sh; fi From 3a3e041ea6e41ff5cd05ef178258a4caac7cddd9 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Thu, 11 Jan 2018 13:01:18 +0100 Subject: [PATCH 3/8] [Wizard] Remove intro page Closes #103 --- odmlui/Wizard.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/odmlui/Wizard.py b/odmlui/Wizard.py index 934a241..31a81b6 100644 --- a/odmlui/Wizard.py +++ b/odmlui/Wizard.py @@ -12,7 +12,6 @@ import odml import odml.terminology as terminology - class Table(object): def __init__(self, cols): self.table = gtk.Table(rows=1, columns=cols) @@ -63,17 +62,6 @@ def finalize(self): pass -class IntroPage(Page): - type = gtk.ASSISTANT_PAGE_INTRO - complete = True - - def init(self): - label = gtk.Label("Welcome! This assistant will guide you trough the first " + - "steps of creating a new odML-Document") - label.set_line_wrap(True) - self.pack_start(label, True, True, 0) - - def get_username(): import getpass username = getpass.getuser() @@ -203,21 +191,19 @@ def __init__(self): assistant = gtk.Assistant() assistant.set_title("New odML-Document wizard") - assistant.set_default_size(-1, 500) + assistant.set_default_size(800, 500) assistant.set_position(gtk.WIN_POS_CENTER_ALWAYS) assistant.connect("apply", self.apply) assistant.connect("close", self.cancel) assistant.connect("cancel", self.cancel) - IntroPage().deploy(assistant, "New Document Wizard") - data_page = DataPage() - data_page.deploy(assistant, "General document information") + data_page.deploy(assistant, "Document information") self.data_page = data_page section_page = SectionPage() section_page.data = data_page - section_page.deploy(assistant, "Select which sections to import from the repository") + section_page.deploy(assistant, "Repository section import") self.section_page = section_page SummaryPage().deploy(assistant, "Complete") From 2bb904b2fcab9beb8a326d510a9ad3c6690db85c Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Wed, 17 Jan 2018 14:37:21 +0100 Subject: [PATCH 4/8] [PropertyModel] Update column order --- odmlui/treemodel/PropertyModel.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/odmlui/treemodel/PropertyModel.py b/odmlui/treemodel/PropertyModel.py index ec190ff..ca1094a 100644 --- a/odmlui/treemodel/PropertyModel.py +++ b/odmlui/treemodel/PropertyModel.py @@ -16,15 +16,15 @@ debug = lambda x: 0 -ColMapper = ColumnMapper({"Name" : (0, "name"), - "Value" : (1, "value"), - "Definition" : (2, "definition"), - "Type" : (3, "dtype"), - "Unit" : (4, "unit"), - "Comment" : (5, "comment"), - "Endcoder" : (6, "encoder"), - "Filename" : (7, "filename"), - "Reference" : (8, "reference")}) +ColMapper = ColumnMapper({"Name": (0, "name"), + "Value": (1, "value"), + "Unit": (2, "unit"), + "Type": (3, "dtype"), + "Definition": (4, "definition"), + "Comment": (5, "comment"), + "Endcoder": (6, "encoder"), + "Filename": (7, "filename"), + "Reference": (8, "reference")}) class PropertyModel(TreeModel): def __init__(self, section): From e6235f91b282e3050603b16e8ae14ed1cc09f559 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Wed, 17 Jan 2018 14:38:01 +0100 Subject: [PATCH 5/8] [PropertyModel] Add missing uncertainty --- odmlui/treemodel/PropertyModel.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/odmlui/treemodel/PropertyModel.py b/odmlui/treemodel/PropertyModel.py index ca1094a..9c961dd 100644 --- a/odmlui/treemodel/PropertyModel.py +++ b/odmlui/treemodel/PropertyModel.py @@ -19,12 +19,13 @@ ColMapper = ColumnMapper({"Name": (0, "name"), "Value": (1, "value"), "Unit": (2, "unit"), - "Type": (3, "dtype"), - "Definition": (4, "definition"), - "Comment": (5, "comment"), - "Endcoder": (6, "encoder"), - "Filename": (7, "filename"), - "Reference": (8, "reference")}) + "Uncertainty": (3, "uncertainty"), + "Type": (4, "dtype"), + "Definition": (5, "definition"), + "Comment": (6, "comment"), + "Endcoder": (7, "encoder"), + "Filename": (8, "filename"), + "Reference": (9, "reference")}) class PropertyModel(TreeModel): def __init__(self, section): From 072f1b52e0a4c9f308bde62df6efbba68a62a5b8 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Wed, 17 Jan 2018 14:57:08 +0100 Subject: [PATCH 6/8] [Editor] Change Attributes view height Change the default attributes height to make sure all attributes are always displayed without scrolling. --- odmlui/Editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odmlui/Editor.py b/odmlui/Editor.py index cf42df4..5c2f5ea 100644 --- a/odmlui/Editor.py +++ b/odmlui/Editor.py @@ -297,7 +297,7 @@ def __init__(self, parent=None): vpaned = gtk.VPaned() vpaned.show() - vpaned.set_position(350) + vpaned.set_position(290) vpaned.pack1(hpaned, resize=True, shrink=False) vpaned.pack2(frame, resize=False, shrink=True) From d4860c92d0afbddbe970347a2ec537f47de5e40b Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Wed, 17 Jan 2018 15:19:22 +0100 Subject: [PATCH 7/8] [Editor] Adjust default app size --- odmlui/Editor.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/odmlui/Editor.py b/odmlui/Editor.py index 5c2f5ea..015114f 100644 --- a/odmlui/Editor.py +++ b/odmlui/Editor.py @@ -184,6 +184,13 @@ def __init__(self, parent=None): self.set_title("odML Editor") self.set_default_size(800, 600) + # Check available screen size and adjust default app size to 1024x768 if possible. + screen = self.get_screen() + currmon = screen.get_monitor_at_window(screen.get_active_window()) + mondims = screen.get_monitor_geometry(currmon) + if mondims.width >= 1024 and mondims.height >= 768: + self.set_default_size(1024, 768) + icons = load_icon_pixbufs("odml-logo") self.set_icon_list(icons) From d22f19057592445f47b5409633eff11374b23476 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Wed, 17 Jan 2018 15:19:40 +0100 Subject: [PATCH 8/8] [Editor] Adjust Attribute view starting pos --- odmlui/Editor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/odmlui/Editor.py b/odmlui/Editor.py index 015114f..2bd04cc 100644 --- a/odmlui/Editor.py +++ b/odmlui/Editor.py @@ -304,7 +304,9 @@ def __init__(self, parent=None): vpaned = gtk.VPaned() vpaned.show() - vpaned.set_position(290) + # Adjust Attribute view position to default window size + vpaned.set_position(self.get_default_size().height - 315) + vpaned.pack1(hpaned, resize=True, shrink=False) vpaned.pack2(frame, resize=False, shrink=True)