Skip to content

Commit ceef361

Browse files
Merge branch 'master' into pyside6_automation_attempt_running
2 parents a2c8f20 + 6ce9d2e commit ceef361

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+328
-2618
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install setuptools wheel
29+
pip install build
3030
- name: Build Package
31-
run: python setup.py sdist
31+
run: python -m build
3232

3333
- name: Upload package
3434
uses: actions/[email protected]

.github/workflows/run-tests.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,19 @@ jobs:
5454
run: |
5555
if [ "$RUNNER_OS" == "Windows" ]; then
5656
conda install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }}
57+
elif [ "$RUNNER_OS" == "macOS" ]; then
58+
mamba install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }} git p4p pyca
5759
else
58-
mamba install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }}
60+
mamba install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }} pyca
5961
fi
6062
6163
- name: Install additional Python dependencies with pip for PyQt5
6264
shell: bash -el {0}
6365
run: |
64-
pip install -r requirements.txt
65-
if [ "$RUNNER_OS" == "Windows" ]; then
66-
pip install -r windows-dev-requirements.txt
66+
if [ "$RUNNER_OS" == "Linux" ]; then
67+
pip install .[test]
6768
else
68-
pip install -r dev-requirements.txt
69+
pip install .[test-no-optional]
6970
fi
7071
7172
- name: Run PyQt tests with pytest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ eggs/
3131
lib/
3232
lib64/
3333
parts/
34+
pydm/_version.py
3435
sdist/
3536
var/
3637
wheels/

conda-recipe/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Install the package
2-
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
2+
$PYTHON -m pip install . --no-deps -vv
33

44
# Create auxiliary dirs
55
mkdir -p $PREFIX/etc/conda/activate.d

conda-recipe/meta.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
{% set data = load_setup_py_data() %}
1+
{% set package_name = "pydm" %}
2+
{% set import_name = "pydm" %}
3+
{% set version = load_file_regex(load_file=os.path.join(import_name, "_version.py"), regex_pattern=".*version = '(\S+)'").group(1) %}
24

35
package:
4-
name : pydm
5-
version : {{ data.get('version') }}
6+
name : {{ package_name }}
7+
version : {{ version }}
68

79
source:
810
path: ..
@@ -17,8 +19,9 @@ requirements:
1719
- python >=3.9
1820
- pip
1921
- setuptools
22+
- setuptools_scm
2023
- pyqt =5
21-
- qtpy
24+
- qtpy >=2.2.0
2225
run:
2326
- python >=3.9
2427
- six
@@ -27,7 +30,7 @@ requirements:
2730
- pyepics
2831
- pyqt =5
2932
- pyqtgraph
30-
- qtpy
33+
- qtpy >=2.2.0
3134
- entrypoints
3235

3336
test:

dev-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ pytest-qt
44
pytest-cov
55
pytest-timeout
66
p4p
7-
git+https://github.com/slaclab/pyca.git; platform_system != "Windows"
87
pre-commit

examples/camviewer/camviewer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# import epics
22
# from qtpy import uic
33
import functools
4+
import weakref
45
from qtpy.QtCore import Slot, Signal, QPointF, QRectF
56
from qtpy.QtGui import QPen
67
from qtpy.QtWidgets import QSizePolicy
@@ -46,14 +47,14 @@ def __init__(self, parent=None, args=None):
4647
self.ui.cameraComboBox.addItem(camera)
4748

4849
# When the camera combo box changes, disconnect from PVs, re-initialize, then reconnect.
49-
self.ui.cameraComboBox.activated[str].connect(self.cameraChanged)
50+
self.ui.cameraComboBox.currentTextChanged.connect(self.cameraChanged)
5051

5152
# Set up the color map combo box.
5253
self.ui.colorMapComboBox.clear()
5354
for key, map_name in cmap_names.items():
5455
self.ui.colorMapComboBox.addItem(map_name, userData=key)
5556
self.ui.imageView.colorMap = self.ui.colorMapComboBox.currentData()
56-
self.ui.colorMapComboBox.activated[str].connect(self.colorMapChanged)
57+
self.ui.colorMapComboBox.currentTextChanged.connect(self.colorMapChanged)
5758

5859
# Set up the color map limit sliders and line edits.
5960
# self._color_map_limit_sliders_need_config = True
@@ -141,7 +142,7 @@ def __init__(self, parent=None, args=None):
141142
self.ui.setROIButton.clicked.connect(self.setROI)
142143
self.ui.resetROIButton.clicked.connect(self.resetROI)
143144

144-
self.destroyed.connect(functools.partial(widget_destroyed, self.channels))
145+
self.destroyed.connect(functools.partial(widget_destroyed, self.channels, weakref.ref(self)))
145146

146147
@Slot()
147148
def zoomIn(self):

pydm/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
from .display import Display
33
from .data_plugins import set_read_only
44
from .widgets import PyDMChannel
5-
from ._version import get_versions
5+
6+
try:
7+
from ._version import version as __version__
8+
except ImportError:
9+
__version__ = "unknown"
10+
611

712
__all__ = [
813
"PyDMApplication",
914
"Display",
1015
"set_read_only",
1116
"PyDMChannel",
1217
]
13-
14-
__version__ = get_versions()["version"]
15-
del get_versions

0 commit comments

Comments
 (0)