Skip to content

Commit 4f484d9

Browse files
committed
Squashed commit of the following:
commit 82f2b7e Merge: 43d9901 727caf1 Author: David Meyer <dihm@users.noreply.github.com> Date: Fri Aug 5 16:14:04 2022 -0400 Merge pull request #94 from dihm/update-workflow Bring workflow up to date with sandbox commit 727caf1 Author: David Meyer <dihm@users.noreply.github.com> Date: Wed Aug 3 13:22:55 2022 -0400 Bring workflow up to date with sandbox commit 43d9901 Merge: b67bc30 c48a1f2 Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Jun 2 10:36:50 2022 -0400 Merge pull request #92 from dihm/fix_docs_build Bump sphinx pin and update intersphinx links commit c48a1f2 Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Jun 2 10:33:45 2022 -0400 Bump sphinx pin and update intersphinx links commit b67bc30 Merge: efa479a d554160 Author: Chris Billington <chrisjbillington@gmail.com> Date: Wed Jun 1 09:38:08 2022 +1000 Merge pull request #90 from ispielma/NoHG Change default of save_hg_info to commit d554160 Author: Ian Spielman <spielman@umd.edu> Date: Tue May 31 13:45:02 2022 -0400 Change default of save_hg_info to commit efa479a Merge: de6fb95 a9888d5 Author: David Meyer <dihm@users.noreply.github.com> Date: Mon May 30 07:29:54 2022 -0400 Merge pull request #88 from philipstarkey/philipstarkey/issue51 Introduce a new attribute for `IntermediateDevice` defining the minimum clock high time commit de6fb95 Merge: 763a0f1 aadd476 Author: David Meyer <dihm@users.noreply.github.com> Date: Sat Feb 5 06:01:08 2022 -0500 Merge pull request #87 from dihm/docs_mock_imports Mock `labscript_utils` to prevent RTD from trying to launch zprocess. commit a9888d5 Author: Phil Starkey <philipstarkey@users.noreply.github.com> Date: Sat Feb 5 20:31:56 2022 +1100 Introduce a new attribute for `IntermediateDevice`s that allows them to specify a minimum clock high time in order to allow asymmetric clock ticks when combined with gated clocks on a pseudoclock. `minimum_clock_high_time` defaults to half of the minimum time between `IntermediateDevice` instructions. It be backwards compatible with previous versions of labscript devices. Fixes #51. I also discovered a bug where the check against the next all change time did not capture the last change time on the clock line because the stop time had not yet been added. This is now fixed. There were also some issues with various error messages. I've fixed those too and moved to use f strings so they're more readable. The whole `Pseudoclock.collect_change_times` method has also been reformatted in line with how `black` would format it (since I was working on it anyway). Some commented out code was also removed here too. commit aadd476 Author: David Meyer <dihm@users.noreply.github.com> Date: Fri Feb 4 08:51:54 2022 -0500 Re-attempt to mock `labscript_utils` import so autosummary can work. commit 755e562 Author: David Meyer <dihm@users.noreply.github.com> Date: Fri Feb 4 08:40:06 2022 -0500 Reset pins, use importlib_metadata to get version in `conf.py`. commit d5750bb Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Feb 3 14:36:46 2022 -0500 Remove zprocess pins and pin labscript-utils to last known working version. commit a5b195d Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Feb 3 14:29:19 2022 -0500 Back to last known working zprocess version. commit 9294f98 Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Feb 3 14:27:16 2022 -0500 Change pin back on more. commit d9b0cd0 Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Feb 3 14:24:39 2022 -0500 Remove mock, test which version of zprocess is causing change by temporarily pinning it. commit 60d21fa Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Feb 3 14:03:01 2022 -0500 Mock `labscript_utils` to prevent RTD from trying to launch zprocess.
1 parent 763a0f1 commit 4f484d9

File tree

4 files changed

+202
-148
lines changed

4 files changed

+202
-148
lines changed

Diff for: .github/workflows/release.yml

+69-81
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: labscript
18-
SCM_VERSION_SCHEME: release-branch-semver
1914
SCM_LOCAL_SCHEME: no-local-version
2015
ANACONDA_USER: labscript-suite
2116

@@ -42,26 +37,30 @@ 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.10', arch: x64 }
41+
# - { os: ubuntu-latest, python: '3.9', arch: x64 }
42+
- { os: ubuntu-latest, python: '3.8', arch: x64 }
43+
# - { os: ubuntu-latest, python: '3.7', arch: x64 }
44+
45+
# - { os: macos-latest, python: '3.10', arch: x64 }
46+
# - { os: macos-latest, python: '3.9', arch: x64 }
47+
# - { os: macos-latest, python: '3.8', arch: x64 }
48+
# - { os: macos-latest, python: '3.7', arch: x64 }
49+
50+
# - { os: windows-latest, python: '3.10', arch: x64 }
51+
# - { os: windows-latest, python: '3.9', arch: x64 }
52+
# - { os: windows-latest, python: '3.8', arch: x64 }
53+
# - { os: windows-latest, python: '3.7', arch: x64 }
54+
55+
# - { os: windows-latest, python: '3.10', arch: x86 }
56+
# - { os: windows-latest, python: '3.9', arch: x86 }
57+
# - { os: windows-latest, python: '3.8', arch: x86 }
58+
# - { os: windows-latest, python: '3.7', arch: x86 }
6059

6160
if: github.repository == 'labscript-suite/labscript' && (github.event_name != 'create' || github.event.ref_type != 'branch')
6261
steps:
6362
- name: Checkout
64-
uses: actions/checkout@v2
63+
uses: actions/checkout@v3
6564
with:
6665
fetch-depth: 0
6766

@@ -70,80 +69,74 @@ jobs:
7069
run: git tag -d $(git tag --points-at HEAD)
7170

7271
- name: Install Python
73-
uses: actions/setup-python@v2
72+
uses: actions/setup-python@v4
7473
with:
7574
python-version: ${{ matrix.python }}
7675
architecture: ${{ matrix.arch }}
7776

7877
- name: Source Distribution
7978
if: strategy.job-index == 0
8079
run: |
81-
python -m pip install --upgrade pip setuptools wheel pep517
82-
python -m pep517.build -s .
80+
python -m pip install --upgrade pip setuptools wheel build
81+
python -m build -s .
8382
8483
- name: Wheel Distribution
8584
# Impure Linux wheels are built in the manylinux job.
8685
if: (env.PURE == 'true' && strategy.job-index == 0) || (env.PURE == 'false' && runner.os != 'Linux')
8786
run: |
88-
python -m pip install --upgrade pip setuptools wheel pep517
89-
python -m pep517.build -b .
87+
python -m pip install --upgrade pip setuptools wheel build
88+
python -m build -w .
9089
9190
- name: Upload Artifact
9291
if: strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
93-
uses: actions/upload-artifact@v2
92+
uses: actions/upload-artifact@v3
9493
with:
9594
name: dist
9695
path: ./dist
9796

9897
- name: Set Variables for Conda Build
98+
shell: bash
9999
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
109100
if [ $NOARCH == true ]; then
110101
CONDA_BUILD_ARGS="--noarch"
111102
else
112103
CONDA_BUILD_ARGS=""
113104
fi
114-
echo "CONDA_INSTALLER=$CONDA_INSTALLER" >> $GITHUB_ENV
115105
echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
116106
107+
- name: Install Miniconda
108+
# We need https://github.com/conda-incubator/setup-miniconda/pull/189 in order
109+
# to be able to install 32-bit miniconda on Windows. Once setup-miniconda 2.1.2
110+
# is released with this fix, can change to @v2.
111+
uses: conda-incubator/setup-miniconda@1a875d105ac03256664b54c882c8c374ce617ef6
112+
with:
113+
auto-update-conda: true
114+
python-version: ${{ matrix.python }}
115+
architecture: ${{ matrix.arch }}
116+
miniconda-version: "latest"
117+
118+
- name: Workaround conda-build incompatibility with xcode >12
119+
if: runner.os == 'macOS'
120+
uses: maxim-lobanov/setup-xcode@v1
121+
with:
122+
xcode-version: 11.7
123+
117124
- name: Conda package (Unix)
118125
if: runner.os != 'Windows'
126+
shell: bash -l {0}
119127
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
128+
conda install -c labscript-suite setuptools-conda
129129
setuptools-conda build $CONDA_BUILD_ARGS .
130130
131131
- name: Conda Package (Windows)
132132
if: runner.os == 'Windows'
133-
shell: cmd
133+
shell: cmd /C CALL {0}
134134
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% .
135+
conda install -c labscript-suite setuptools-conda && ^
136+
setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
144137
145138
- name: Upload Artifact
146-
uses: actions/upload-artifact@v2
139+
uses: actions/upload-artifact@v3
147140
with:
148141
name: conda_packages
149142
path: ./conda_packages
@@ -152,16 +145,11 @@ jobs:
152145
manylinux:
153146
name: Build Manylinux
154147
runs-on: ubuntu-latest
155-
strategy:
156-
matrix:
157-
include:
158-
- { python: 'cp36-cp36m cp37-cp37m cp38-cp38' }
159-
160148
if: github.repository == 'labscript-suite/labscript' && (github.event_name != 'create' || github.event.ref_type != 'branch')
161149
steps:
162150
- name: Checkout
163151
if: env.PURE == 'false'
164-
uses: actions/checkout@v2
152+
uses: actions/checkout@v3
165153
with:
166154
fetch-depth: 0
167155

@@ -171,16 +159,17 @@ jobs:
171159

172160
- name: Build Manylinux Wheels
173161
if: env.PURE == 'false'
174-
uses: RalfG/python-wheels-manylinux-build@v0.2.2-manylinux2010_x86_64
162+
uses: RalfG/python-wheels-manylinux-build@v0.4.2
175163
with:
176-
python-versions: ${{ matrix.python }}
164+
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
165+
pre-build-command: 'git config --global --add safe.directory "*"'
177166

178167
- name: Upload Artifact
179168
if: env.PURE == 'false'
180-
uses: actions/upload-artifact@v2
169+
uses: actions/upload-artifact@v3
181170
with:
182171
name: dist
183-
path: wheelhouse/*manylinux*.whl
172+
path: dist/*manylinux*.whl
184173

185174
release:
186175
name: Release
@@ -189,19 +178,19 @@ jobs:
189178
steps:
190179

191180
- name: Download Artifact
192-
uses: actions/download-artifact@v2
181+
uses: actions/download-artifact@v3
193182
with:
194183
name: dist
195184
path: ./dist
196185

197186
- name: Download Artifact
198-
uses: actions/download-artifact@v2
187+
uses: actions/download-artifact@v3
199188
with:
200189
name: conda_packages
201190
path: ./conda_packages
202191

203192
- name: Publish on TestPyPI
204-
uses: pypa/gh-action-pypi-publish@master
193+
uses: pypa/gh-action-pypi-publish@release/v1
205194
with:
206195
user: __token__
207196
password: ${{ secrets.testpypi }}
@@ -243,19 +232,19 @@ jobs:
243232
user: __token__
244233
password: ${{ secrets.pypi }}
245234

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
235+
- name: Install Miniconda
236+
uses: conda-incubator/setup-miniconda@v2
237+
with:
238+
auto-update-conda: true
239+
240+
- name: Install Anaconda cloud client
241+
shell: bash -l {0}
242+
run: conda install anaconda-client
253243

254244
- name: Publish to Anaconda test label
255245
if: github.event.ref_type != 'tag'
246+
shell: bash -l {0}
256247
run: |
257-
source .miniconda/etc/profile.d/conda.sh
258-
conda activate
259248
anaconda \
260249
--token ${{ secrets.ANACONDA_API_TOKEN }} \
261250
upload \
@@ -264,10 +253,9 @@ jobs:
264253
conda_packages/*/*
265254
266255
- name: Publish to Anaconda main label
256+
shell: bash -l {0}
267257
if: github.event.ref_type == 'tag'
268258
run: |
269-
source .miniconda/etc/profile.d/conda.sh
270-
conda activate
271259
anaconda \
272260
--token ${{ secrets.ANACONDA_API_TOKEN }} \
273261
upload \

Diff for: docs/source/conf.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@
1515
from m2r import MdInclude
1616
from recommonmark.transform import AutoStructify
1717
from jinja2 import FileSystemLoader, Environment
18+
try:
19+
import importlib.metadata as importlib_metadata
20+
except ImportError:
21+
import importlib_metadata
1822

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

2125
project = "labscript"
2226
copyright = "2020, labscript suite"
2327
author = "labscript suite contributors"
2428

25-
from labscript import __version__ as version # noqa: E402
29+
version = importlib_metadata.version('labscript')
2630

2731
release = version
2832

@@ -51,6 +55,7 @@
5155
autodoc_typehints = 'description'
5256
autosummary_generate = True
5357
add_module_names = False
58+
autodoc_mock_imports = ['labscript_utils']
5459

5560
# Prefix each autosectionlabel with the name of the document it is in and a colon
5661
autosectionlabel_prefix_document = True
@@ -74,15 +79,15 @@
7479
intersphinx_mapping = {
7580
'python': ('https://docs.python.org/3/', None),
7681
'numpy': ('https://numpy.org/doc/stable/', None),
77-
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
82+
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
7883
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
7984
'qtutils': ('https://qtutils.readthedocs.io/en/stable/', None),
8085
'pyqtgraph': (
8186
'https://pyqtgraph.readthedocs.io/en/latest/',
8287
None,
8388
), # change to stable once v0.11 is published
84-
'matplotlib': ('https://matplotlib.org/', None),
85-
'h5py': ('http://docs.h5py.org/en/stable/', None),
89+
'matplotlib': ('https://matplotlib.org/stable/', None),
90+
'h5py': ('https://docs.h5py.org/en/stable/', None),
8691
'pydaqmx': ('https://pythonhosted.org/PyDAQmx/', None),
8792
'qt': (
8893
'',

0 commit comments

Comments
 (0)