Skip to content
Snippets Groups Projects
Commit 3b206d03 authored by Dimitar Tasev's avatar Dimitar Tasev
Browse files

Removed files and unnecessary imports, re #21593

parent ab9fd304
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <boost/python/implicit.hpp> #include <boost/python/implicit.hpp>
#include <boost/python/overloads.hpp> #include <boost/python/overloads.hpp>
#include <boost/python/register_ptr_to_python.hpp> #include <boost/python/register_ptr_to_python.hpp>
#include <boost/python/suite/indexing/map_indexing_suite.hpp>
#define PY_ARRAY_UNIQUE_SYMBOL API_ARRAY_API #define PY_ARRAY_UNIQUE_SYMBOL API_ARRAY_API
#define NO_IMPORT_ARRAY #define NO_IMPORT_ARRAY
......
...@@ -8,35 +8,19 @@ ...@@ -8,35 +8,19 @@
# #
# #
# To Run target this package with PyCharm, and __main__ will be executed # To Run - target this package with PyCharm, and __main__ will be executed
import os import os
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
from qtpy.QtWidgets import QApplication from qtpy.QtWidgets import QApplication
from mantid.simpleapi import Load from mantid.simpleapi import Load
from mantidqt.widgets.matrixworkspacedisplay.presenter import MatrixWorkspaceDisplay from mantidqt.widgets.matrixworkspacedisplay.presenter import MatrixWorkspaceDisplay
p = R"C:\Users\qbr77747\dev\m\source\build\ExternalData\Testing\Data\UnitTest"
#
# all_nxs_files = []
# for root, folders, files in os.walk(p):
# nxs_files = list(filter(lambda x: x[-4:] == ".nxs" in x, files))
# all_nxs_files.extend(nxs_files)
#
# print(all_nxs_files)
# for f in all_nxs_files:
# full_path = os.path.join(p, f)
app = QApplication([]) app = QApplication([])
LOQ74044 = Load(os.path.join(p, r"LOQ74044.nxs")) LOQ74044 = Load(os.path.join(p, r"LOQ74044.nxs"))
import matplotlib
# TODO remove before PR / figure our where to do it properly
matplotlib.use('Qt5Agg')
print("MPL version:", matplotlib.__version__)
import matplotlib.pyplot as plt
# ws = Load(os.path.join(p, r"AddedEvent-add.nxs"))
window = MatrixWorkspaceDisplay(LOQ74044, plt) window = MatrixWorkspaceDisplay(LOQ74044, plt)
app.exec_() app.exec_()
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.
#
#
copy_xpm = ["15 13 4 1",
"# c None",
". c #000000",
"b c #00007f",
"a c #ffffff",
"......#########",
".aaaa..########",
".aaaa.a.#######",
".a..a.bbbbbb###",
".aaaaabaaaabb##",
".a....baaaabab#",
".aaaaaba..abbbb",
".a....baaaaaaab",
".aaaaaba.....ab",
"......baaaaaaab",
"######ba.....ab",
"######baaaaaaab",
"######bbbbbbbbb"]
table_xpm = [
"15 16 5 1",
"# c None",
". c #000000",
"c c #2007f0",
"b c #8f888f",
"a c #ffffff",
"..........#####",
".aaaaaaaa..####",
".aaaaaaaa.b.###",
".aaaaaaaa.bb.##",
".aaaaaaaa.bbb.#",
".aaaaaaaa.....#",
".aaaaaaaaaaaa.#",
".a.............",
".a.cc.cc.cc.cc.",
".a.............",
".a.aa.aa.aa.aa.",
".a.aa.aa.aa.aa.",
".a.............",
".a.aa.aa.aa.aa.",
".a.aa.aa.aa.aa.",
"..............."]
graph_xpm = [
"14 14 6 1",
" c None",
". c #030003",
"+ c #FFFFFF",
"@ c #FC0D00",
"# c #2F28EF",
"$ c #0000FC",
"..............",
".++++@@++++++.",
".++++@@++++++.",
".+++@++@+++++.",
".++@++++@@+++.",
".+@+++++@@++#.",
".++++##+++@+#.",
".++++##++++$+.",
".+++#++#++$+@.",
".++#++++##+++.",
".+#+++++##+++.",
".++++++++++++.",
".++++++++++++.",
".............."]
new_graph_xpm = [
"14 16 5 1",
" c None",
". c #000000",
"+ c #FFFFFF",
"@ c #A0A7AF",
"# c #FF0000",
".......... ",
".++++++++.. ",
".++++++++.@. ",
".+..+++++.@@. ",
".++.+++++.....",
".++.+++++++++.",
".+..++##+++#+.",
".++.+#++#++#+.",
".++.+#++#++#+.",
".+..#++++##++.",
".++.#++++++++.",
".++.#++++++++.",
".+..........+.",
".++.++.++.+++.",
".++++++++++++.",
".............."]
from mock import Mock
class MockPlot:
MOCK_PLOT_COLOR = "#notacolor"
def __init__(self):
self.get_color = Mock(return_value=self.MOCK_PLOT_COLOR)
class MockPlotLibAx:
def __init__(self):
self.mock_plot = MockPlot()
self.plot = Mock(return_value=[self.mock_plot])
self.errorbar = Mock()
self.legend = Mock()
class MockPlotLibFig:
def __init__(self):
self.show = Mock()
class MockPlotLib:
"""
Mocks the Matplotlib interface for testing
"""
def __init__(self):
self.mock_fig = MockPlotLibFig()
self.mock_ax = MockPlotLibAx()
self.subplots = Mock(return_value=[self.mock_fig, self.mock_ax])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment