Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 8151a19
Author: David Meyer <[email protected]>
Date:   Wed Apr 12 19:44:55 2023 -0400

    Update python version support

commit 0fa3b72
Merge: 9e590f7 ed41ea3
Author: David Meyer <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Date:   Wed Aug 3 13:25:50 2022 -0400

    Bring workflow up to date with sandbox.

commit 03a0100
Merge: 63e1dfb f37201a
Author: David Meyer <[email protected]>
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 <[email protected]>
Date:   Thu Jun 2 11:01:02 2022 -0400

    Bump sphinx pin and update intersphinx links

commit 63e1dfb
Merge: 3799317 379f077
Author: David Meyer <[email protected]>
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 <[email protected]>
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.
  • Loading branch information
dihm committed Apr 13, 2023
1 parent 3799317 commit c355ffc
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 108 deletions.
187 changes: 84 additions & 103 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ on:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

defaults:
run:
shell: bash

env:
PACKAGE_NAME: runmanager
SCM_VERSION_SCHEME: release-branch-semver
SCM_LOCAL_SCHEME: no-local-version
ANACONDA_USER: labscript-suite

Expand All @@ -42,26 +37,34 @@ jobs:
strategy:
matrix:
include:
- { os: ubuntu-latest, python: 3.8, arch: x64 }
# - { os: ubuntu-latest, python: 3.7, arch: x64 }
# - { os: ubuntu-latest, python: 3.6, arch: x64 }

# - { os: macos-latest, python: 3.8, arch: x64 }
# - { os: macos-latest, python: 3.7, arch: x64 }
# - { os: macos-latest, python: 3.6, arch: x64 }

# - { os: windows-latest, python: 3.8, arch: x64 }
# - { os: windows-latest, python: 3.7, arch: x64 }
# - { os: windows-latest, python: 3.6, arch: x64 }

# - { os: windows-latest, python: 3.8, arch: x86 }
# - { os: windows-latest, python: 3.7, arch: x86 }
# - { os: windows-latest, python: 3.6, arch: x86 }
- { os: ubuntu-latest, python: '3.11', arch: x64, conda: true}
# - { os: ubuntu-latest, python: '3.10', arch: x64, conda: true }
# - { os: ubuntu-latest, python: '3.9', arch: x64, conda: true }
# - { os: ubuntu-latest, python: '3.8', arch: x64, conda: true }
# - { os: ubuntu-latest, python: '3.7', arch: x64, conda: true }

# - { os: macos-11, python: '3.11', arch: x64, conda: true }
# - { os: macos-11, python: '3.10', arch: x64, conda: true }
# - { os: macos-11, python: '3.9', arch: x64, conda: true }
# - { os: macos-11, python: '3.8', arch: x64, conda: true }
# - { os: macos-11, python: '3.7', arch: x64, conda: true }

# - { os: windows-latest, python: '3.11', arch: x64, conda: true }
# - { os: windows-latest, python: '3.10', arch: x64, conda: true }
# - { os: windows-latest, python: '3.9', arch: x64, conda: true }
# - { os: windows-latest, python: '3.8', arch: x64, conda: true }
# - { os: windows-latest, python: '3.7', arch: x64, conda: true }

# - { os: windows-latest, python: '3.11', arch: x86, conda: false } # conda not yet available
# - { os: windows-latest, python: '3.10', arch: x86, conda: true }
# - { os: windows-latest, python: '3.9', arch: x86, conda: true }
# - { os: windows-latest, python: '3.8', arch: x86, conda: true }
# - { os: windows-latest, python: '3.7', arch: x86, conda: true }

if: github.repository == 'labscript-suite/runmanager' && (github.event_name != 'create' || github.event.ref_type != 'branch')
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}

- name: Source Distribution
if: strategy.job-index == 0
run: |
python -m pip install --upgrade pip setuptools wheel pep517
python -m pep517.build -s .
python -m pip install --upgrade pip setuptools wheel build
python -m build -s .
- name: Wheel Distribution
# Impure Linux wheels are built in the manylinux job.
if: (env.PURE == 'true' && strategy.job-index == 0) || (env.PURE == 'false' && runner.os != 'Linux')
run: |
python -m pip install --upgrade pip setuptools wheel pep517
python -m pep517.build -b .
python -m pip install --upgrade pip setuptools wheel build
python -m build -w .
- name: Upload Artifact
if: strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist

- name: Set Variables for Conda Build
if: matrix.conda
shell: bash
run: |
if [ $RUNNER_OS == Windows ] && [ ${{ matrix.arch }} == x64 ]; then
CONDA_INSTALLER=Miniconda3-latest-Windows-x86_64.exe
elif [ $RUNNER_OS == Windows ]; then
CONDA_INSTALLER=Miniconda3-latest-Windows-x86.exe
elif [ $RUNNER_OS == Linux ]; then
CONDA_INSTALLER=Miniconda3-latest-Linux-x86_64.sh
else
CONDA_INSTALLER=Miniconda3-latest-MacOSX-x86_64.sh
fi
if [ $NOARCH == true ]; then
CONDA_BUILD_ARGS="--noarch"
else
CONDA_BUILD_ARGS=""
fi
echo "CONDA_INSTALLER=$CONDA_INSTALLER" >> $GITHUB_ENV
echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
- name: Install Miniconda
if: matrix.conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
miniconda-version: "latest"

- name: Workaround conda-build incompatibility with xcode 12+
if: runner.os == 'macOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 11.7

- name: Conda package (Unix)
if: runner.os != 'Windows'
if: (matrix.conda && runner.os != 'Windows')
shell: bash -l {0}
run: |
curl -LO https://repo.continuum.io/miniconda/$CONDA_INSTALLER
bash "$CONDA_INSTALLER" -b -p .miniconda
source .miniconda/etc/profile.d/conda.sh
conda activate
conda update -n base -c defaults conda
conda create -n py${{ matrix.python }} python=${{ matrix.python }}
conda activate py${{ matrix.python }}
conda install -c cbillington setuptools-conda
pip install --upgrade setuptools_scm
conda install -c labscript-suite setuptools-conda
setuptools-conda build $CONDA_BUILD_ARGS .
- name: Conda Package (Windows)
if: runner.os == 'Windows'
shell: cmd
if: (matrix.conda && runner.os == 'Windows')
shell: cmd /C CALL {0}
run: |
curl -LO https://repo.continuum.io/miniconda/%CONDA_INSTALLER%
%CONDA_INSTALLER% /S /D=%CD%\.miniconda && ^
.miniconda\Scripts\activate && ^
conda update -n base -c defaults conda && ^
conda create -n py${{ matrix.python }} python=${{ matrix.python }} && ^
conda activate py${{ matrix.python }} && ^
conda install -c cbillington setuptools-conda && ^
pip install --upgrade setuptools_scm && ^
setuptools-conda build %CONDA_BUILD_ARGS% .
conda install -c labscript-suite setuptools-conda && ^
setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
- name: Upload Artifact
uses: actions/upload-artifact@v2
if: matrix.conda
uses: actions/upload-artifact@v3
with:
name: conda_packages
path: ./conda_packages
Expand All @@ -152,16 +149,11 @@ jobs:
manylinux:
name: Build Manylinux
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { python: 'cp36-cp36m cp37-cp37m cp38-cp38' }

if: github.repository == 'labscript-suite/runmanager' && (github.event_name != 'create' || github.event.ref_type != 'branch')
steps:
- name: Checkout
if: env.PURE == 'false'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -171,16 +163,17 @@ jobs:

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

- name: Upload Artifact
if: env.PURE == 'false'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: wheelhouse/*manylinux*.whl
path: dist/*manylinux*.whl

release:
name: Release
Expand All @@ -189,73 +182,62 @@ jobs:
steps:

- name: Download Artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: ./dist

- name: Download Artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: conda_packages
path: ./conda_packages

- name: Publish on TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.testpypi }}
repository_url: https://test.pypi.org/legacy/

- name: Get Version Number
if: github.event.ref_type == 'tag'
run: |
VERSION="${GITHUB_REF/refs\/tags\/v/}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create GitHub Release
- name: Create GitHub Release and Upload Release Asset
if: github.event.ref_type == 'tag'
id: create_release
uses: actions/create-release@latest
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.ref }}
release_name: ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
name: ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
draft: true
prerelease: ${{ contains(github.event.ref, 'rc') }}
files: ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz

- name: Upload Release Asset
if: github.event.ref_type == 'tag'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish on TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
asset_name: ${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
asset_content_type: application/gzip
user: __token__
password: ${{ secrets.testpypi }}
repository-url: https://test.pypi.org/legacy/

- name: Publish on PyPI
if: github.event.ref_type == 'tag'
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi }}

- name: Install Miniconda and cloud client
run: |
curl -LO https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p .miniconda
source .miniconda/etc/profile.d/conda.sh
conda activate
conda install anaconda-client
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true

- name: Install Anaconda cloud client
shell: bash -l {0}
run: conda install anaconda-client

- name: Publish to Anaconda test label
if: github.event.ref_type != 'tag'
shell: bash -l {0}
run: |
source .miniconda/etc/profile.d/conda.sh
conda activate
anaconda \
--token ${{ secrets.ANACONDA_API_TOKEN }} \
upload \
Expand All @@ -264,10 +246,9 @@ jobs:
conda_packages/*/*
- name: Publish to Anaconda main label
shell: bash -l {0}
if: github.event.ref_type == 'tag'
run: |
source .miniconda/etc/profile.d/conda.sh
conda activate
anaconda \
--token ${{ secrets.ANACONDA_API_TOKEN }} \
upload \
Expand Down
12 changes: 8 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
from m2r import MdInclude
from recommonmark.transform import AutoStructify
from jinja2 import FileSystemLoader, Environment
try:
import importlib.metadata as importlib_metadata
except ImportError:
import importlib_metadata

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

Expand All @@ -24,7 +28,7 @@
author = "labscript suite contributors"

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

release = version

Expand Down Expand Up @@ -124,15 +128,15 @@ def set_process_name(self,*args,**kwargs):
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'qtutils': ('https://qtutils.readthedocs.io/en/stable/', None),
'pyqtgraph': (
'https://pyqtgraph.readthedocs.io/en/latest/',
None,
), # change to stable once v0.11 is published
'matplotlib': ('https://matplotlib.org/', None),
'h5py': ('http://docs.h5py.org/en/stable/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
'h5py': ('https://docs.h5py.org/en/stable/', None),
'pydaqmx': ('https://pythonhosted.org/PyDAQmx/', None),
'qt': (
'',
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11

[options]
zip_safe = False
Expand All @@ -44,7 +46,7 @@ gui_scripts =
pyqt = PyQt5
docs =
PyQt5
Sphinx==3.5.3
Sphinx==4.4.0
sphinx-rtd-theme==0.5.2
recommonmark==0.6.0
m2r==0.2.1
Expand Down

0 comments on commit c355ffc

Please sign in to comment.