From adbae003cd23e09151bc7a7183291a7efd89b205 Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@gmail.com> Date: Fri, 10 Nov 2017 16:46:22 +0000 Subject: [PATCH] Add workbench package target + import test Refs #20381 --- qt/CMakeLists.txt | 2 ++ qt/applications/CMakeLists.txt | 17 ++++++++++++ qt/applications/workbench/__init__.py | 26 +++++++++++++++++++ qt/applications/workbench/test/import_test.py | 13 ++++++++++ 4 files changed, 58 insertions(+) create mode 100644 qt/applications/CMakeLists.txt create mode 100644 qt/applications/workbench/__init__.py create mode 100644 qt/applications/workbench/test/import_test.py diff --git a/qt/CMakeLists.txt b/qt/CMakeLists.txt index f32ea2d43b6..5bcca3a84f4 100644 --- a/qt/CMakeLists.txt +++ b/qt/CMakeLists.txt @@ -12,3 +12,5 @@ add_subdirectory ( scientific_interfaces ) if ( MAKE_VATES ) add_subdirectory ( paraview_ext ) endif ( MAKE_VATES ) + +add_subdirectory ( applications ) diff --git a/qt/applications/CMakeLists.txt b/qt/applications/CMakeLists.txt new file mode 100644 index 00000000000..9f3b24031da --- /dev/null +++ b/qt/applications/CMakeLists.txt @@ -0,0 +1,17 @@ +# All source files +set ( PYTHON_SOURCE_FILES + workbench/__init__.py +) + +set ( PYTHON_TEST_FILES + workbench/test/import_test.py +) + +# Target +add_python_package ( TARGET_NAME workbench + OUTPUT_DIR ${PYTHON_MODULE_OUTPUT_DIRECTORY_NO_GEN_EXPR} + SRCS ${PYTHON_SOURCE_FILES} + TEST_SRCS ${PYTHON_TEST_FILES} +) + +# Not installed yet... diff --git a/qt/applications/workbench/__init__.py b/qt/applications/workbench/__init__.py new file mode 100644 index 00000000000..fd960c8784b --- /dev/null +++ b/qt/applications/workbench/__init__.py @@ -0,0 +1,26 @@ +# This file is part of the mantid workbench. +# +# Copyright (C) 2017 mantidproject +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +""" +workbench +--------- + +This package contains the mantidproject's Qt-based workbench. It is the primary +GUI for interacting with the mantid reduction and analysis package. +""" + +# This file should be free from Qt imports to keep it lightweight to import +# and check metadata. diff --git a/qt/applications/workbench/test/import_test.py b/qt/applications/workbench/test/import_test.py new file mode 100644 index 00000000000..beee8ecb2b6 --- /dev/null +++ b/qt/applications/workbench/test/import_test.py @@ -0,0 +1,13 @@ +from __future__ import (absolute_import, division, print_function, + unicode_literals) + +import unittest + + +class ImportTest(unittest.TestCase): + + def test_import_workbench(self): + import workbench # noqa + +if __name__ == "__main__": + unittest.main() -- GitLab