Skip to content

Commit 3889650

Browse files
committed
Merge branch 'master' into make_weak_ref
2 parents 5195278 + 72161ad commit 3889650

Some content is hidden

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

42 files changed

+229
-2577
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: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,19 @@ jobs:
4343
run: |
4444
if [ "$RUNNER_OS" == "Windows" ]; then
4545
conda install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }}
46+
elif [ "$RUNNER_OS" == "macOS" ]; then
47+
mamba install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }} git p4p pyca
4648
else
47-
mamba install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }}
49+
mamba install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }} pyca
4850
fi
4951
5052
- name: Install additional Python dependencies with pip
5153
shell: bash -el {0}
5254
run: |
53-
pip install -r requirements.txt
54-
if [ "$RUNNER_OS" == "Windows" ]; then
55-
pip install -r windows-dev-requirements.txt
55+
if [ "$RUNNER_OS" == "Linux" ]; then
56+
pip install .[test]
5657
else
57-
pip install -r dev-requirements.txt
58+
pip install .[test-no-optional]
5859
fi
5960
6061
- name: Install packages for testing a PyQt app on Linux
@@ -73,4 +74,4 @@ jobs:
7374
shell: bash -el {0}
7475
timeout-minutes: 30 # timeout applies to single run of run_tests.py, not all os/python combos
7576
run: |
76-
python run_tests.py
77+
python run_tests.py

.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ def __init__(self, parent=None, args=None):
4747
self.ui.cameraComboBox.addItem(camera)
4848

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

5252
# Set up the color map combo box.
5353
self.ui.colorMapComboBox.clear()
5454
for key, map_name in cmap_names.items():
5555
self.ui.colorMapComboBox.addItem(map_name, userData=key)
5656
self.ui.imageView.colorMap = self.ui.colorMapComboBox.currentData()
57-
self.ui.colorMapComboBox.activated[str].connect(self.colorMapChanged)
57+
self.ui.colorMapComboBox.currentTextChanged.connect(self.colorMapChanged)
5858

5959
# Set up the color map limit sliders and line edits.
6060
# self._color_map_limit_sliders_need_config = True

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)