Skip to content

Commit

Permalink
Change hexrd.ui path to hexrdgui
Browse files Browse the repository at this point in the history
We are removing the namespace package support to simplify things.

Now, all HEXRDGUI code will lie under `hexrdgui` instead of `hexrd.ui`.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
  • Loading branch information
psavery committed Oct 19, 2023
1 parent 4173042 commit 500adfa
Show file tree
Hide file tree
Showing 283 changed files with 668 additions and 669 deletions.
4 changes: 2 additions & 2 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source:
build:
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
entry_points:
- hexrdgui = hexrd.ui.main:main
- hexrdgui = hexrdgui.main:main

requirements:
build:
Expand All @@ -29,7 +29,7 @@ requirements:

test:
imports:
- hexrd.ui
- hexrdgui

about:
home: https://github.com/HEXRD/hexrdgui
Expand Down
1 change: 0 additions & 1 deletion hexrd/__init__.py

This file was deleted.

File renamed without changes.
12 changes: 6 additions & 6 deletions hexrd/ui/about_dialog.py → hexrdgui/about_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import hexrd

from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.resource_loader import load_resource
from hexrdgui.ui_loader import UiLoader
from hexrdgui.resource_loader import load_resource

LOGO_HEIGHT = 80

Expand All @@ -24,7 +24,7 @@ def __init__(self, parent=None):
self._populate_versions()

def _populate_hexrd_logo(self):
data = load_resource(hexrd.ui.resources.icons,
data = load_resource(hexrdgui.resources.icons,
'hexrd.ico', binary=True)
pixmap = QPixmap()
pixmap.loadFromData(data, 'ico')
Expand All @@ -36,7 +36,7 @@ def _calculate_size(self, size):
return QSize(LOGO_HEIGHT/ratio, LOGO_HEIGHT)

def _populate_logos(self):
data = load_resource(hexrd.ui.resources.icons, 'llnl_logo.svg',
data = load_resource(hexrdgui.resources.icons, 'llnl_logo.svg',
binary=True)

self.ui.logos_horizontal_layout.addStretch()
Expand All @@ -47,7 +47,7 @@ def _populate_logos(self):
self.ui.logos_horizontal_layout.addWidget(llnl, stretch=1)
self.ui.logos_horizontal_layout.addStretch()

data = load_resource(hexrd.ui.resources.icons,
data = load_resource(hexrdgui.resources.icons,
'kitware_logo.svg', binary=True)

kitware = QSvgWidget()
Expand All @@ -57,7 +57,7 @@ def _populate_logos(self):
self.ui.logos_horizontal_layout.addWidget(kitware, stretch=1)
self.ui.logos_horizontal_layout.addStretch()

data = load_resource(hexrd.ui.resources.icons,
data = load_resource(hexrdgui.resources.icons,
'afrl_logo.png', binary=True)

pixmap = QPixmap()
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions hexrd/ui/async_runner.py → hexrdgui/async_runner.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from PySide6.QtCore import QThreadPool, QTimer
from PySide6.QtWidgets import QMessageBox

from hexrd.ui.async_worker import AsyncWorker
from hexrd.ui.progress_dialog import ProgressDialog
from hexrdgui.async_worker import AsyncWorker
from hexrdgui.progress_dialog import ProgressDialog


class AsyncRunner:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.ui_loader import UiLoader
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.ui_loader import UiLoader


class AzimuthalOverlayEditor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
QCheckBox, QComboBox, QHBoxLayout, QHeaderView, QSizePolicy,
QTableWidgetItem, QWidget
)
from hexrd.ui import utils
from hexrdgui import utils

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.azimuthal_overlay_editor import AzimuthalOverlayEditor
from hexrd.ui.azimuthal_overlay_style_picker import AzimuthalOverlayStylePicker
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils import block_signals
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.azimuthal_overlay_editor import AzimuthalOverlayEditor
from hexrdgui.azimuthal_overlay_style_picker import AzimuthalOverlayStylePicker
from hexrdgui.ui_loader import UiLoader
from hexrdgui.utils import block_signals

import numpy as np

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from PySide6.QtGui import QColor
from PySide6.QtWidgets import QColorDialog

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils import block_signals
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.ui_loader import UiLoader
from hexrdgui.utils import block_signals


class AzimuthalOverlayStylePicker(QObject):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from PySide6.QtGui import QColor
from PySide6.QtWidgets import QColorDialog

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils import block_signals
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.ui_loader import UiLoader
from hexrdgui.utils import block_signals


class BeamMarkerStyleEditor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.figure import Figure

from hexrd.ui.range_widget import RangeWidget
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils import block_signals, reversed_enumerate
from hexrdgui.range_widget import RangeWidget
from hexrdgui.ui_loader import UiLoader
from hexrdgui.utils import block_signals, reversed_enumerate


NUM_INCREMENTS = 1000
Expand Down
12 changes: 6 additions & 6 deletions hexrd/ui/cal_tree_view.py → hexrdgui/cal_tree_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import numpy as np

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.tree_views.base_tree_item_model import BaseTreeItemModel
from hexrd.ui.tree_views.tree_item import TreeItem
from hexrd.ui.tree_views.value_column_delegate import ValueColumnDelegate
from hexrd.ui import constants
from hexrd.ui.utils import is_int
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.tree_views.base_tree_item_model import BaseTreeItemModel
from hexrdgui.tree_views.tree_item import TreeItem
from hexrdgui.tree_views.value_column_delegate import ValueColumnDelegate
from hexrdgui import constants
from hexrdgui.utils import is_int

# Global constants
FIXED = 0
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import numpy as np

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.ui_loader import UiLoader
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.ui_loader import UiLoader


class PowderCalibrationDialog:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
from PySide6.QtWidgets import QCheckBox, QMessageBox

from hexrd.fitting.calibration import InstrumentCalibrator, PowderCalibrator
from hexrd.ui.async_runner import AsyncRunner
from hexrd.ui.constants import ViewType
from hexrd.ui.create_hedm_instrument import create_hedm_instrument
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.utils import instr_to_internal_dict, masks_applied_to_panel_buffers
from hexrdgui.async_runner import AsyncRunner
from hexrdgui.constants import ViewType
from hexrdgui.create_hedm_instrument import create_hedm_instrument
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.utils import instr_to_internal_dict, masks_applied_to_panel_buffers

from hexrd.ui.calibration.auto import PowderCalibrationDialog
from hexrdgui.calibration.auto import PowderCalibrationDialog


class PowderRunner(QObject):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
)
from hexrd.instrument import unwrap_h5_to_dict

from hexrd.ui.calibration.auto import (
from hexrdgui.calibration.auto import (
PowderCalibrationDialog,
save_picks_to_overlay,
)
from hexrd.ui.calibration.laue_auto_picker_dialog import LaueAutoPickerDialog
from hexrd.ui.calibration.pick_based_calibration import run_calibration
from hexrd.ui.calibration.hkl_picks_tree_view_dialog import (
from hexrdgui.calibration.laue_auto_picker_dialog import LaueAutoPickerDialog
from hexrdgui.calibration.pick_based_calibration import run_calibration
from hexrdgui.calibration.hkl_picks_tree_view_dialog import (
generate_picks_results, overlays_to_tree_format, HKLPicksTreeViewDialog,
picks_cartesian_to_angles, tree_format_to_picks,
)
from hexrd.ui.create_hedm_instrument import create_hedm_instrument
from hexrd.ui.constants import OverlayType, ViewType
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.line_picker_dialog import LinePickerDialog
from hexrd.ui.select_item_dialog import SelectItemDialog
from hexrd.ui.utils import (
from hexrdgui.create_hedm_instrument import create_hedm_instrument
from hexrdgui.constants import OverlayType, ViewType
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.line_picker_dialog import LinePickerDialog
from hexrdgui.select_item_dialog import SelectItemDialog
from hexrdgui.utils import (
array_index_in_list, instr_to_internal_dict,
masks_applied_to_panel_buffers, unique_array_list
)
from hexrd.ui.utils.conversions import cart_to_angles
from hexrd.ui.utils.dicts import ensure_all_keys_match, ndarrays_to_lists
from hexrdgui.utils.conversions import cart_to_angles
from hexrdgui.utils.dicts import ensure_all_keys_match, ndarrays_to_lists


class CalibrationRunner(QObject):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

from hexrd.gridutil import cellIndices

from hexrd.ui.constants import ViewType
from hexrd.ui.create_hedm_instrument import create_hedm_instrument
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.overlays import update_overlay_data
from hexrd.ui.utils import format_memory_int
from hexrdgui.constants import ViewType
from hexrdgui.create_hedm_instrument import create_hedm_instrument
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.overlays import update_overlay_data
from hexrdgui.utils import format_memory_int

from skimage import transform as tf

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from PySide6.QtCore import QObject, Signal

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.grains_viewer_dialog import GrainsViewerDialog
from hexrd.ui.reflections_table import ReflectionsTable
from hexrd.ui.ui_loader import UiLoader
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.grains_viewer_dialog import GrainsViewerDialog
from hexrdgui.reflections_table import ReflectionsTable
from hexrdgui.ui_loader import UiLoader


class HEDMCalibrationOptionsDialog(QObject):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from matplotlib.figure import Figure
import numpy as np

from hexrd.ui.navigation_toolbar import NavigationToolbar
from hexrd.ui.ui_loader import UiLoader
from hexrdgui.navigation_toolbar import NavigationToolbar
from hexrdgui.ui_loader import UiLoader


DEFAULT_STYLE = 'rx'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
from hexrd.fitting import calibration
from hexrd.transforms import xfcapi

from hexrd.ui.calibration.hedm import (
from hexrdgui.calibration.hedm import (
HEDMCalibrationOptionsDialog,
HEDMCalibrationResultsDialog,
)
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.indexing.create_config import (
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.indexing.create_config import (
create_indexing_config, OmegasNotFoundError
)
from hexrd.ui.message_box import MessageBox
from hexrd.ui.utils import instr_to_internal_dict
from hexrdgui.message_box import MessageBox
from hexrdgui.utils import instr_to_internal_dict


class HEDMCalibrationRunner(QObject):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

from hexrd.instrument import unwrap_dict_to_h5, unwrap_h5_to_dict

from hexrd.ui.constants import ViewType
from hexrd.ui.create_hedm_instrument import create_hedm_instrument
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.tree_views.hkl_picks_tree_view import HKLPicksTreeView
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils.conversions import angles_to_cart, cart_to_angles
from hexrd.ui.utils.dicts import ensure_all_keys_match, ndarrays_to_lists
from hexrdgui.constants import ViewType
from hexrdgui.create_hedm_instrument import create_hedm_instrument
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.tree_views.hkl_picks_tree_view import HKLPicksTreeView
from hexrdgui.ui_loader import UiLoader
from hexrdgui.utils.conversions import angles_to_cart, cart_to_angles
from hexrdgui.utils.dicts import ensure_all_keys_match, ndarrays_to_lists


class HKLPicksTreeViewDialog:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import numpy as np

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.ui_loader import UiLoader
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.ui_loader import UiLoader


class LaueAutoPickerDialog:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import matplotlib.pyplot as plt
import numpy as np

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils import block_signals
from hexrd.ui.utils.dialog import add_help_url
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.ui_loader import UiLoader
from hexrdgui.utils import block_signals
from hexrdgui.utils.dialog import add_help_url

CONFIG_MODE_BORDER = 'border'
CONFIG_MODE_NUMPY = 'numpy'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

from .polarview import PolarView

from hexrd.ui.constants import ViewType
from hexrd.ui.create_hedm_instrument import create_hedm_instrument
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.overlays import update_overlay_data
from hexrd.ui.calibration.utils.maud_headers import header0, header, block_hdr
from hexrdgui.constants import ViewType
from hexrdgui.create_hedm_instrument import create_hedm_instrument
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.overlays import update_overlay_data
from hexrdgui.calibration.utils.maud_headers import header0, header, block_hdr


def polar_viewer():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
)
from hexrd import instrument

from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.utils import SnipAlgorithmType, run_snip1d, snip_width_pixels
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.utils import SnipAlgorithmType, run_snip1d, snip_width_pixels

tvec_c = ct.zeros_3

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from hexrd.ui.constants import ViewType
from hexrd.ui.create_hedm_instrument import create_hedm_instrument
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.overlays import update_overlay_data
from hexrdgui.constants import ViewType
from hexrdgui.create_hedm_instrument import create_hedm_instrument
from hexrdgui.hexrd_config import HexrdConfig
from hexrdgui.overlays import update_overlay_data


def raw_iviewer():
Expand Down
Loading

0 comments on commit 500adfa

Please sign in to comment.