Skip to content

Commit c355ffc

Browse files
committed
Squashed commit of the following:
commit 8151a19 Author: David Meyer <dihm@users.noreply.github.com> Date: Wed Apr 12 19:44:55 2023 -0400 Update python version support commit 0fa3b72 Merge: 9e590f7 ed41ea3 Author: David Meyer <dihm@users.noreply.github.com> Date: Wed Apr 12 16:30:24 2023 -0400 Merge pull request #109 from dihm/update-workflow Sync workflow with current state of the art commit ed41ea3 Author: David Meyer <dihm@users.noreply.github.com> Date: Wed Apr 12 16:26:40 2023 -0400 Sync workflow with current state of the art commit 9e590f7 Merge: 03a0100 2b5a130 Author: David Meyer <dihm@users.noreply.github.com> Date: Fri Aug 5 16:27:59 2022 -0400 Merge pull request #108 from dihm/update-workflow Bring workflow up to date with sandbox. commit 2b5a130 Author: David Meyer <dihm@users.noreply.github.com> Date: Wed Aug 3 13:25:50 2022 -0400 Bring workflow up to date with sandbox. commit 03a0100 Merge: 63e1dfb f37201a Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Jun 2 11:04:35 2022 -0400 Merge pull request #107 from dihm/fix_docs_builds Bump sphinx pin and update intersphinx links commit f37201a Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Jun 2 11:01:02 2022 -0400 Bump sphinx pin and update intersphinx links commit 63e1dfb Merge: 3799317 379f077 Author: David Meyer <dihm@users.noreply.github.com> Date: Sat Feb 5 06:13:31 2022 -0500 Merge pull request #105 from dihm/mock_labscript_utils Prevent import of h5_lock during docs build commit 379f077 Author: David Meyer <dihm@users.noreply.github.com> Date: Sat Feb 5 06:08:47 2022 -0500 Update `conf.py` to get version using importlib_metadata to avoid incidental import of labscript_utils.h5_lock.
1 parent 3799317 commit c355ffc

File tree

3 files changed

+95
-108
lines changed

3 files changed

+95
-108
lines changed

.github/workflows/release.yml

+84-103
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ on:
99
tags:
1010
- 'v[0-9]+.[0-9]+.[0-9]+*'
1111

12-
defaults:
13-
run:
14-
shell: bash
15-
1612
env:
1713
PACKAGE_NAME: runmanager
18-
SCM_VERSION_SCHEME: release-branch-semver
1914
SCM_LOCAL_SCHEME: no-local-version
2015
ANACONDA_USER: labscript-suite
2116

@@ -42,26 +37,34 @@ jobs:
4237
strategy:
4338
matrix:
4439
include:
45-
- { os: ubuntu-latest, python: 3.8, arch: x64 }
46-
# - { os: ubuntu-latest, python: 3.7, arch: x64 }
47-
# - { os: ubuntu-latest, python: 3.6, arch: x64 }
48-
49-
# - { os: macos-latest, python: 3.8, arch: x64 }
50-
# - { os: macos-latest, python: 3.7, arch: x64 }
51-
# - { os: macos-latest, python: 3.6, arch: x64 }
52-
53-
# - { os: windows-latest, python: 3.8, arch: x64 }
54-
# - { os: windows-latest, python: 3.7, arch: x64 }
55-
# - { os: windows-latest, python: 3.6, arch: x64 }
56-
57-
# - { os: windows-latest, python: 3.8, arch: x86 }
58-
# - { os: windows-latest, python: 3.7, arch: x86 }
59-
# - { os: windows-latest, python: 3.6, arch: x86 }
40+
- { os: ubuntu-latest, python: '3.11', arch: x64, conda: true}
41+
# - { os: ubuntu-latest, python: '3.10', arch: x64, conda: true }
42+
# - { os: ubuntu-latest, python: '3.9', arch: x64, conda: true }
43+
# - { os: ubuntu-latest, python: '3.8', arch: x64, conda: true }
44+
# - { os: ubuntu-latest, python: '3.7', arch: x64, conda: true }
45+
46+
# - { os: macos-11, python: '3.11', arch: x64, conda: true }
47+
# - { os: macos-11, python: '3.10', arch: x64, conda: true }
48+
# - { os: macos-11, python: '3.9', arch: x64, conda: true }
49+
# - { os: macos-11, python: '3.8', arch: x64, conda: true }
50+
# - { os: macos-11, python: '3.7', arch: x64, conda: true }
51+
52+
# - { os: windows-latest, python: '3.11', arch: x64, conda: true }
53+
# - { os: windows-latest, python: '3.10', arch: x64, conda: true }
54+
# - { os: windows-latest, python: '3.9', arch: x64, conda: true }
55+
# - { os: windows-latest, python: '3.8', arch: x64, conda: true }
56+
# - { os: windows-latest, python: '3.7', arch: x64, conda: true }
57+
58+
# - { os: windows-latest, python: '3.11', arch: x86, conda: false } # conda not yet available
59+
# - { os: windows-latest, python: '3.10', arch: x86, conda: true }
60+
# - { os: windows-latest, python: '3.9', arch: x86, conda: true }
61+
# - { os: windows-latest, python: '3.8', arch: x86, conda: true }
62+
# - { os: windows-latest, python: '3.7', arch: x86, conda: true }
6063

6164
if: github.repository == 'labscript-suite/runmanager' && (github.event_name != 'create' || github.event.ref_type != 'branch')
6265
steps:
6366
- name: Checkout
64-
uses: actions/checkout@v2
67+
uses: actions/checkout@v3
6568
with:
6669
fetch-depth: 0
6770

@@ -70,80 +73,74 @@ jobs:
7073
run: git tag -d $(git tag --points-at HEAD)
7174

7275
- name: Install Python
73-
uses: actions/setup-python@v2
76+
uses: actions/setup-python@v4
7477
with:
7578
python-version: ${{ matrix.python }}
7679
architecture: ${{ matrix.arch }}
7780

7881
- name: Source Distribution
7982
if: strategy.job-index == 0
8083
run: |
81-
python -m pip install --upgrade pip setuptools wheel pep517
82-
python -m pep517.build -s .
84+
python -m pip install --upgrade pip setuptools wheel build
85+
python -m build -s .
8386
8487
- name: Wheel Distribution
8588
# Impure Linux wheels are built in the manylinux job.
8689
if: (env.PURE == 'true' && strategy.job-index == 0) || (env.PURE == 'false' && runner.os != 'Linux')
8790
run: |
88-
python -m pip install --upgrade pip setuptools wheel pep517
89-
python -m pep517.build -b .
91+
python -m pip install --upgrade pip setuptools wheel build
92+
python -m build -w .
9093
9194
- name: Upload Artifact
9295
if: strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
93-
uses: actions/upload-artifact@v2
96+
uses: actions/upload-artifact@v3
9497
with:
9598
name: dist
9699
path: ./dist
97100

98101
- name: Set Variables for Conda Build
102+
if: matrix.conda
103+
shell: bash
99104
run: |
100-
if [ $RUNNER_OS == Windows ] && [ ${{ matrix.arch }} == x64 ]; then
101-
CONDA_INSTALLER=Miniconda3-latest-Windows-x86_64.exe
102-
elif [ $RUNNER_OS == Windows ]; then
103-
CONDA_INSTALLER=Miniconda3-latest-Windows-x86.exe
104-
elif [ $RUNNER_OS == Linux ]; then
105-
CONDA_INSTALLER=Miniconda3-latest-Linux-x86_64.sh
106-
else
107-
CONDA_INSTALLER=Miniconda3-latest-MacOSX-x86_64.sh
108-
fi
109105
if [ $NOARCH == true ]; then
110106
CONDA_BUILD_ARGS="--noarch"
111107
else
112108
CONDA_BUILD_ARGS=""
113109
fi
114-
echo "CONDA_INSTALLER=$CONDA_INSTALLER" >> $GITHUB_ENV
115110
echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
116111
112+
- name: Install Miniconda
113+
if: matrix.conda
114+
uses: conda-incubator/setup-miniconda@v2
115+
with:
116+
auto-update-conda: true
117+
python-version: ${{ matrix.python }}
118+
architecture: ${{ matrix.arch }}
119+
miniconda-version: "latest"
120+
121+
- name: Workaround conda-build incompatibility with xcode 12+
122+
if: runner.os == 'macOS'
123+
uses: maxim-lobanov/setup-xcode@v1
124+
with:
125+
xcode-version: 11.7
126+
117127
- name: Conda package (Unix)
118-
if: runner.os != 'Windows'
128+
if: (matrix.conda && runner.os != 'Windows')
129+
shell: bash -l {0}
119130
run: |
120-
curl -LO https://repo.continuum.io/miniconda/$CONDA_INSTALLER
121-
bash "$CONDA_INSTALLER" -b -p .miniconda
122-
source .miniconda/etc/profile.d/conda.sh
123-
conda activate
124-
conda update -n base -c defaults conda
125-
conda create -n py${{ matrix.python }} python=${{ matrix.python }}
126-
conda activate py${{ matrix.python }}
127-
conda install -c cbillington setuptools-conda
128-
pip install --upgrade setuptools_scm
131+
conda install -c labscript-suite setuptools-conda
129132
setuptools-conda build $CONDA_BUILD_ARGS .
130133
131134
- name: Conda Package (Windows)
132-
if: runner.os == 'Windows'
133-
shell: cmd
135+
if: (matrix.conda && runner.os == 'Windows')
136+
shell: cmd /C CALL {0}
134137
run: |
135-
curl -LO https://repo.continuum.io/miniconda/%CONDA_INSTALLER%
136-
%CONDA_INSTALLER% /S /D=%CD%\.miniconda && ^
137-
.miniconda\Scripts\activate && ^
138-
conda update -n base -c defaults conda && ^
139-
conda create -n py${{ matrix.python }} python=${{ matrix.python }} && ^
140-
conda activate py${{ matrix.python }} && ^
141-
conda install -c cbillington setuptools-conda && ^
142-
pip install --upgrade setuptools_scm && ^
143-
setuptools-conda build %CONDA_BUILD_ARGS% .
138+
conda install -c labscript-suite setuptools-conda && ^
139+
setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
144140
145141
- name: Upload Artifact
146-
uses: actions/upload-artifact@v2
142+
if: matrix.conda
143+
uses: actions/upload-artifact@v3
147144
with:
148145
name: conda_packages
149146
path: ./conda_packages
@@ -152,16 +149,11 @@ jobs:
152149
manylinux:
153150
name: Build Manylinux
154151
runs-on: ubuntu-latest
155-
strategy:
156-
matrix:
157-
include:
158-
- { python: 'cp36-cp36m cp37-cp37m cp38-cp38' }
159-
160152
if: github.repository == 'labscript-suite/runmanager' && (github.event_name != 'create' || github.event.ref_type != 'branch')
161153
steps:
162154
- name: Checkout
163155
if: env.PURE == 'false'
164-
uses: actions/checkout@v2
156+
uses: actions/checkout@v3
165157
with:
166158
fetch-depth: 0
167159

@@ -171,16 +163,17 @@ jobs:
171163

172164
- name: Build Manylinux Wheels
173165
if: env.PURE == 'false'
174-
uses: RalfG/python-wheels-manylinux-build@v0.2.2-manylinux2010_x86_64
166+
uses: RalfG/python-wheels-manylinux-build@v0.4.2
175167
with:
176-
python-versions: ${{ matrix.python }}
168+
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
169+
pre-build-command: 'git config --global --add safe.directory "*"'
177170

178171
- name: Upload Artifact
179172
if: env.PURE == 'false'
180-
uses: actions/upload-artifact@v2
173+
uses: actions/upload-artifact@v3
181174
with:
182175
name: dist
183-
path: wheelhouse/*manylinux*.whl
176+
path: dist/*manylinux*.whl
184177

185178
release:
186179
name: Release
@@ -189,73 +182,62 @@ jobs:
189182
steps:
190183

191184
- name: Download Artifact
192-
uses: actions/download-artifact@v2
185+
uses: actions/download-artifact@v3
193186
with:
194187
name: dist
195188
path: ./dist
196189

197190
- name: Download Artifact
198-
uses: actions/download-artifact@v2
191+
uses: actions/download-artifact@v3
199192
with:
200193
name: conda_packages
201194
path: ./conda_packages
202195

203-
- name: Publish on TestPyPI
204-
uses: pypa/gh-action-pypi-publish@master
205-
with:
206-
user: __token__
207-
password: ${{ secrets.testpypi }}
208-
repository_url: https://test.pypi.org/legacy/
209-
210196
- name: Get Version Number
211197
if: github.event.ref_type == 'tag'
212198
run: |
213199
VERSION="${GITHUB_REF/refs\/tags\/v/}"
214200
echo "VERSION=$VERSION" >> $GITHUB_ENV
215201
216-
- name: Create GitHub Release
202+
- name: Create GitHub Release and Upload Release Asset
217203
if: github.event.ref_type == 'tag'
218-
id: create_release
219-
uses: actions/create-release@latest
204+
uses: softprops/action-gh-release@v1
220205
env:
221206
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
222207
with:
223208
tag_name: ${{ github.event.ref }}
224-
release_name: ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
209+
name: ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
225210
draft: true
226211
prerelease: ${{ contains(github.event.ref, 'rc') }}
212+
files: ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
227213

228-
- name: Upload Release Asset
229-
if: github.event.ref_type == 'tag'
230-
uses: actions/upload-release-asset@v1
231-
env:
232-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
214+
- name: Publish on TestPyPI
215+
uses: pypa/gh-action-pypi-publish@release/v1
233216
with:
234-
upload_url: ${{ steps.create_release.outputs.upload_url }}
235-
asset_path: ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
236-
asset_name: ${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
237-
asset_content_type: application/gzip
217+
user: __token__
218+
password: ${{ secrets.testpypi }}
219+
repository-url: https://test.pypi.org/legacy/
238220

239221
- name: Publish on PyPI
240222
if: github.event.ref_type == 'tag'
241-
uses: pypa/gh-action-pypi-publish@master
223+
uses: pypa/gh-action-pypi-publish@release/v1
242224
with:
243225
user: __token__
244226
password: ${{ secrets.pypi }}
245227

246-
- name: Install Miniconda and cloud client
247-
run: |
248-
curl -LO https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
249-
bash Miniconda3-latest-Linux-x86_64.sh -b -p .miniconda
250-
source .miniconda/etc/profile.d/conda.sh
251-
conda activate
252-
conda install anaconda-client
228+
- name: Install Miniconda
229+
uses: conda-incubator/setup-miniconda@v2
230+
with:
231+
auto-update-conda: true
232+
233+
- name: Install Anaconda cloud client
234+
shell: bash -l {0}
235+
run: conda install anaconda-client
253236

254237
- name: Publish to Anaconda test label
255238
if: github.event.ref_type != 'tag'
239+
shell: bash -l {0}
256240
run: |
257-
source .miniconda/etc/profile.d/conda.sh
258-
conda activate
259241
anaconda \
260242
--token ${{ secrets.ANACONDA_API_TOKEN }} \
261243
upload \
@@ -264,10 +246,9 @@ jobs:
264246
conda_packages/*/*
265247
266248
- name: Publish to Anaconda main label
249+
shell: bash -l {0}
267250
if: github.event.ref_type == 'tag'
268251
run: |
269-
source .miniconda/etc/profile.d/conda.sh
270-
conda activate
271252
anaconda \
272253
--token ${{ secrets.ANACONDA_API_TOKEN }} \
273254
upload \

docs/source/conf.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
from m2r import MdInclude
1717
from recommonmark.transform import AutoStructify
1818
from jinja2 import FileSystemLoader, Environment
19+
try:
20+
import importlib.metadata as importlib_metadata
21+
except ImportError:
22+
import importlib_metadata
1923

2024
# -- Project information (unique to each project) -------------------------------------
2125

@@ -24,7 +28,7 @@
2428
author = "labscript suite contributors"
2529

2630
# The full version, including alpha/beta/rc tags
27-
from runmanager import __version__ as version # noqa: E402
31+
version = importlib_metadata.version('runmanager')
2832

2933
release = version
3034

@@ -124,15 +128,15 @@ def set_process_name(self,*args,**kwargs):
124128
intersphinx_mapping = {
125129
'python': ('https://docs.python.org/3/', None),
126130
'numpy': ('https://numpy.org/doc/stable/', None),
127-
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
131+
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
128132
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
129133
'qtutils': ('https://qtutils.readthedocs.io/en/stable/', None),
130134
'pyqtgraph': (
131135
'https://pyqtgraph.readthedocs.io/en/latest/',
132136
None,
133137
), # change to stable once v0.11 is published
134-
'matplotlib': ('https://matplotlib.org/', None),
135-
'h5py': ('http://docs.h5py.org/en/stable/', None),
138+
'matplotlib': ('https://matplotlib.org/stable/', None),
139+
'h5py': ('https://docs.h5py.org/en/stable/', None),
136140
'pydaqmx': ('https://pythonhosted.org/PyDAQmx/', None),
137141
'qt': (
138142
'',

setup.cfg

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ classifiers =
1919
Programming Language :: Python :: 3.7
2020
Programming Language :: Python :: 3.8
2121
Programming Language :: Python :: 3.9
22+
Programming Language :: Python :: 3.10
23+
Programming Language :: Python :: 3.11
2224

2325
[options]
2426
zip_safe = False
@@ -44,7 +46,7 @@ gui_scripts =
4446
pyqt = PyQt5
4547
docs =
4648
PyQt5
47-
Sphinx==3.5.3
49+
Sphinx==4.4.0
4850
sphinx-rtd-theme==0.5.2
4951
recommonmark==0.6.0
5052
m2r==0.2.1

0 commit comments

Comments
 (0)