Skip to content

Commit 6643887

Browse files
committed
Updates to install methods.
1 parent 4d2f1f5 commit 6643887

12 files changed

Lines changed: 27 additions & 25 deletions

docks.py renamed to openmc_plotter/docks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
import numpy as np
1313
import openmc
1414

15-
from custom_widgets import HorizontalLine, Expander
16-
from scientific_spin_box import ScientificDoubleSpinBox
17-
from plotmodel import (_SCORE_UNITS, _TALLY_VALUES,
18-
_REACTION_UNITS, _SPATIAL_FILTERS)
15+
from .custom_widgets import HorizontalLine, Expander
16+
from .scientific_spin_box import ScientificDoubleSpinBox
17+
from .plotmodel import (_SCORE_UNITS, _TALLY_VALUES,
18+
_REACTION_UNITS, _SPATIAL_FILTERS)
1919

2020

2121
class PlotterDock(QDockWidget):
File renamed without changes.

plotgui.py renamed to openmc_plotter/plotgui.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
from matplotlib.colors import SymLogNorm
1414
import numpy as np
1515

16-
from plot_colors import rgb_normalize, invert_rgb
17-
from plotmodel import DomainDelegate
18-
from plotmodel import _NOT_FOUND, _VOID_REGION, _OVERLAP, _MODEL_PROPERTIES
19-
from scientific_spin_box import ScientificDoubleSpinBox
20-
from custom_widgets import HorizontalLine
16+
from .plot_colors import rgb_normalize, invert_rgb
17+
from .plotmodel import DomainDelegate
18+
from .plotmodel import _NOT_FOUND, _VOID_REGION, _OVERLAP, _MODEL_PROPERTIES
19+
from .scientific_spin_box import ScientificDoubleSpinBox
20+
from .custom_widgets import HorizontalLine
2121

2222
if is_pyqt5():
2323
from matplotlib.backends.backend_qt5agg import FigureCanvas

plotmodel.py renamed to openmc_plotter/plotmodel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import openmc.lib
1212
import numpy as np
1313

14-
from statepointmodel import StatePointModel
15-
from plot_colors import random_rgb, reset_seed
14+
from .statepointmodel import StatePointModel
15+
from .plot_colors import random_rgb, reset_seed
1616

1717
ID, NAME, COLOR, COLORLABEL, MASK, HIGHLIGHT = tuple(range(0, 6))
1818

openmc-plotter renamed to openmc_plotter/plotter.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
except ImportError:
2626
_HAVE_VTK = False
2727

28-
from plotmodel import PlotModel, DomainTableModel
29-
from plotgui import PlotImage, ColorDialog
30-
from docks import DomainDock, TallyDock
31-
from overlays import ShortcutsOverlay
32-
from tools import ExportDataDialog
28+
from .plotmodel import PlotModel, DomainTableModel
29+
from .plotgui import PlotImage, ColorDialog
30+
from .docks import DomainDock, TallyDock
31+
from .overlays import ShortcutsOverlay
32+
from .tools import ExportDataDialog
3333

3434

3535
def _openmcReload():
@@ -1159,10 +1159,9 @@ def exportTallyData(self):
11591159
# show export tool dialog
11601160
self.showExportDialog()
11611161

1162-
if __name__ == '__main__':
1163-
1164-
path_icon = str(Path(__file__).parent / 'assets/openmc_logo.png')
1165-
path_splash = str(Path(__file__).parent / 'assets/splash.png')
1162+
def main():
1163+
path_icon = str(Path(__file__).parent.parent / 'assets/openmc_logo.png')
1164+
path_splash = str(Path(__file__).parent.parent / 'assets/splash.png')
11661165

11671166
app = QApplication(sys.argv)
11681167
app.setOrganizationName("OpenMC")
@@ -1209,3 +1208,6 @@ def exportTallyData(self):
12091208
timer.timeout.connect(lambda: None)
12101209

12111210
sys.exit(app.exec_())
1211+
1212+
if __name__ == '__main__':
1213+
main()

tools.py renamed to openmc_plotter/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import openmc
66
from PySide2 import QtCore, QtGui, QtWidgets
77

8-
from custom_widgets import HorizontalLine
9-
from scientific_spin_box import ScientificDoubleSpinBox
8+
from .custom_widgets import HorizontalLine
9+
from .scientific_spin_box import ScientificDoubleSpinBox
1010

1111
class ExportDataDialog(QtWidgets.QDialog):
1212
"""

0 commit comments

Comments
 (0)