labscript-utils 3.3.0rc1__tar.gz → 3.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. labscript_utils-3.4.0/.github/workflows/release-vars.sh +47 -0
  2. labscript_utils-3.4.0/.github/workflows/release.yml +447 -0
  3. labscript_utils-3.4.0/PKG-INFO +62 -0
  4. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/README.md +1 -1
  5. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/conf.py +3 -19
  6. labscript_utils-3.4.0/labscript_profile/create.py +167 -0
  7. labscript_utils-3.4.0/labscript_utils/__version__.py +27 -0
  8. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/device_registry/_device_registry.py +11 -11
  9. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/ls_zprocess.py +15 -6
  10. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/modulewatcher.py +31 -11
  11. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/digitaloutput.py +5 -2
  12. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/outputbox.py +1 -1
  13. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/splash.py +23 -34
  14. labscript_utils-3.4.0/labscript_utils.egg-info/PKG-INFO +62 -0
  15. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils.egg-info/SOURCES.txt +1 -1
  16. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils.egg-info/entry_points.txt +1 -1
  17. labscript_utils-3.4.0/labscript_utils.egg-info/requires.txt +14 -0
  18. labscript_utils-3.4.0/pyproject.toml +65 -0
  19. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/readthedocs.yaml +7 -3
  20. labscript_utils-3.4.0/setup.cfg +4 -0
  21. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/setup.py +1 -8
  22. labscript-utils-3.3.0rc1/.github/workflows/release.yml +0 -256
  23. labscript-utils-3.3.0rc1/PKG-INFO +0 -46
  24. labscript-utils-3.3.0rc1/labscript_profile/create.py +0 -74
  25. labscript-utils-3.3.0rc1/labscript_utils/__version__.py +0 -16
  26. labscript-utils-3.3.0rc1/labscript_utils.egg-info/PKG-INFO +0 -46
  27. labscript-utils-3.3.0rc1/labscript_utils.egg-info/requires.txt +0 -17
  28. labscript-utils-3.3.0rc1/pyproject.toml +0 -3
  29. labscript-utils-3.3.0rc1/setup.cfg +0 -60
  30. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/.gitignore +0 -0
  31. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/BSD-2-CLAUSE-LICENSE.txt +0 -0
  32. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/BSD-3-CLAUSE-LICENSE.txt +0 -0
  33. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/LICENSE.txt +0 -0
  34. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/NEWS.md +0 -0
  35. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/Makefile +0 -0
  36. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/make.bat +0 -0
  37. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/_static/custom.css +0 -0
  38. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/_templates/autosummary-class.rst +0 -0
  39. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/_templates/autosummary-module.rst +0 -0
  40. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/_templates/components.rst +0 -0
  41. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/api/index.rst +0 -0
  42. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/img/blacs_32nx32n.svg +0 -0
  43. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/img/labscript-suite-rectangular-transparent_138nx70n.svg +0 -0
  44. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/img/labscript.ico +0 -0
  45. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/img/labscript_32nx32n.svg +0 -0
  46. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/img/labscript_64x64.svg +0 -0
  47. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/img/lyse_32nx32n.svg +0 -0
  48. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/img/runmanager_32nx32n.svg +0 -0
  49. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/img/runviewer_32nx32n.svg +0 -0
  50. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/index.rst +0 -0
  51. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/labconfig.rst +0 -0
  52. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/docs/source/pyqt5-modified-objects.inv +0 -0
  53. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript-suite.pth +0 -0
  54. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/__init__.py +0 -0
  55. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/app_saved_configs/README.txt +0 -0
  56. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/labconfig/example.ini +0 -0
  57. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/analysislib/__init__.py +0 -0
  58. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/analysislib/common/__init__.py +0 -0
  59. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/analysislib/example_apparatus/example_IMAQdx_remote.py +0 -0
  60. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/labscriptlib/__init__.py +0 -0
  61. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/labscriptlib/common/__init__.py +0 -0
  62. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/labscriptlib/example_apparatus/connection_table.py +0 -0
  63. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/labscriptlib/example_apparatus/connection_table_IMAQdx_remote.py +0 -0
  64. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/labscriptlib/example_apparatus/example_IMAQdx_remote.py +0 -0
  65. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/labscriptlib/example_apparatus/example_experiment.py +0 -0
  66. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/pythonlib/README.txt +0 -0
  67. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_profile/default_profile/userlib/user_devices/README.txt +0 -0
  68. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/__init__.py +0 -0
  69. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/camera_server.py +0 -0
  70. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/connections.py +0 -0
  71. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/device_registry/__init__.py +0 -0
  72. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/dict_diff.py +0 -0
  73. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/double_import_denier.py +0 -0
  74. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/excepthook/__init__.py +0 -0
  75. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/excepthook/error.gif +0 -0
  76. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/excepthook/tk_exception.py +0 -0
  77. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/filewatcher.py +0 -0
  78. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/h5_lock.py +0 -0
  79. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/impprof.py +0 -0
  80. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/labconfig.py +0 -0
  81. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/memprof.py +0 -0
  82. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/properties.py +0 -0
  83. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/InputPlotWindow.py +0 -0
  84. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/__init__.py +0 -0
  85. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/analoginput.py +0 -0
  86. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/analogoutput.py +0 -0
  87. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/ddsoutput.py +0 -0
  88. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/dragdroptab.py +0 -0
  89. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/elide_label.py +0 -0
  90. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/enumoutput.py +0 -0
  91. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/fingertab.py +0 -0
  92. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/headerview_with_widgets.py +0 -0
  93. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/imageoutput.py +0 -0
  94. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/qtwidgets/toolpalette.py +0 -0
  95. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/remote.py +0 -0
  96. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/settings.py +0 -0
  97. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/setup_logging.py +0 -0
  98. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/shared_drive.py +0 -0
  99. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/shot_utils.py +0 -0
  100. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/testing_utils.py +0 -0
  101. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/tracelog.py +0 -0
  102. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/NovaTechDDS9m.py +0 -0
  103. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/UnitConversionBase.py +0 -0
  104. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/__init__.py +0 -0
  105. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/aom.py +0 -0
  106. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/detuning.py +0 -0
  107. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/example.py +0 -0
  108. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/generic_frequency.py +0 -0
  109. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/linear_coil_driver.py +0 -0
  110. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/optotunelens.py +0 -0
  111. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/quad_driver.py +0 -0
  112. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/quad_monitor.py +0 -0
  113. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/unitconversions/test.py +0 -0
  114. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/versions.py +0 -0
  115. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/zlock.py +0 -0
  116. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils/zlog.py +0 -0
  117. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils.egg-info/dependency_links.txt +0 -0
  118. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils.egg-info/not-zip-safe +0 -0
  119. {labscript-utils-3.3.0rc1 → labscript_utils-3.4.0}/labscript_utils.egg-info/top_level.txt +0 -0
@@ -0,0 +1,47 @@
1
+ # This repository. PyPI and Anaconda test and release package uploads are only done if
2
+ # the repository the workflow is running in matches this (i.e. is not a fork). Optional,
3
+ # if not set, package uploads are skipped.
4
+ export RELEASE_REPO="labscript-suite/labscript-utils"
5
+
6
+ # Username with which to upload conda packages. If not given, anaconda uploads are
7
+ # skipped.
8
+ export ANACONDA_USER="labscript-suite"
9
+
10
+ # Whether (true or false) to upload releases to PyPI, non-releases to Test PyPI,
11
+ # releases to Anaconda, non-releases to Anaconda test label. Only used if the repository
12
+ # the workflow is running in matches RELEASE_REPO, otherwise uploads are skipped.
13
+ # Anaconda uploads require ANACONDA_USER be specified and ANACONDA_API_TOKEN secret be
14
+ # set. Optional, all default to true.
15
+ export PYPI_UPLOAD=""
16
+ export TESTPYPI_UPLOAD=""
17
+ export ANACONDA_UPLOAD=""
18
+ export TEST_ANACONDA_UPLOAD=""
19
+
20
+ # Which Python version to use for pure wheel builds, sdists, and as the host Python for
21
+ # cibuildwheel. Optional, defaults to the second-most recent minor Python version.
22
+ export DEFAULT_PYTHON=""
23
+
24
+ # Comma-separated list of Python versions to build conda packages for. Only used if
25
+ # HAS_ENV_MARKERS=true or PURE=false, otherwise a noarch conda package is built instead.
26
+ # Optional, defaults to all non-end-of-life stable Python minor versions.
27
+ export CONDA_PYTHONS=""
28
+
29
+ # Environment variable set in the envionment that `cibuildwheel` runs in instructing it
30
+ # which Pythons to build for, as a space-separated list of specifiers in the format
31
+ # specified by `cibuildwheel`. Only used if PURE=false. Optional, defaults to all
32
+ # non-end-of-life stable CPython versions.
33
+ export CIBW_BUILD=""
34
+
35
+ # Name of Python package. Optional, defaults to name from the package metadata
36
+ export PKGNAME=""
37
+
38
+ # Version of Python package. Optional, defaults to version from the package metadata
39
+ export PKGVER=""
40
+
41
+ # Whether the Python package is pure (true) or impure (false). Optional, defaults to
42
+ # false if the setuptools package has extension modules or libraries, otherwise true.
43
+ export PURE=""
44
+
45
+ # Whether (true or false) the Python package has dependencies that vary by platform or
46
+ # Python version. Optional, Defaults to presence of env markers in package metadata.
47
+ export HAS_ENV_MARKERS=""
@@ -0,0 +1,447 @@
1
+ name: Build and Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - maintenance/*
8
+ tags:
9
+ - 'v[0-9]+.[0-9]+.[0-9]+*'
10
+
11
+ env:
12
+ OS_LIST_UBUNTU: '["ubuntu-latest"]'
13
+ OS_LIST_ALL: '["ubuntu-latest", "windows-latest", "macos-latest", "macos-13"]'
14
+
15
+
16
+ jobs:
17
+ configure:
18
+ name: Configure workflow run
19
+ runs-on: ubuntu-latest
20
+ outputs:
21
+ DEFAULT_PYTHON: ${{ steps.config.outputs.DEFAULT_PYTHON }}
22
+ CIBW_BUILD: ${{ steps.config.outputs.CIBW_BUILD }}
23
+ PKGNAME: ${{ steps.config.outputs.PKGNAME }}
24
+ PKGVER: ${{ steps.config.outputs.PKGVER }}
25
+ PURE: ${{ steps.config.outputs.PURE }}
26
+ ANACONDA_USER: ${{ steps.config.outputs.ANACONDA_USER }}
27
+ CONDA_BUILD_ARGS: ${{ steps.config.outputs.CONDA_BUILD_ARGS }}
28
+ BUILD_OS_LIST: ${{ steps.config.outputs.BUILD_OS_LIST }}
29
+ RELEASE: ${{ steps.config.outputs.RELEASE }}
30
+ TESTPYPI_UPLOAD_THIS_RUN: ${{ steps.config.outputs.TESTPYPI_UPLOAD_THIS_RUN }}
31
+ PYPI_UPLOAD_THIS_RUN: ${{ steps.config.outputs.PYPI_UPLOAD_THIS_RUN }}
32
+ TEST_ANACONDA_UPLOAD_THIS_RUN: ${{ steps.config.outputs.TEST_ANACONDA_UPLOAD_THIS_RUN }}
33
+ ANACONDA_UPLOAD_THIS_RUN: ${{ steps.config.outputs.ANACONDA_UPLOAD_THIS_RUN }}
34
+
35
+ steps:
36
+ - name: Checkout
37
+ uses: actions/checkout@v4
38
+ with:
39
+ fetch-depth: 0
40
+
41
+ - name: Ignore Tags for non-tag pushes
42
+ if: "!startsWith(github.ref, 'refs/tags/')"
43
+ run: git tag -d $(git tag --points-at HEAD)
44
+
45
+ - name: Install Python
46
+ uses: actions/setup-python@v5
47
+ with:
48
+ python-version: '3.x'
49
+
50
+ - name: Configure workflow
51
+ id: config
52
+ run: |
53
+ pip install ci-helper
54
+
55
+ # Load repo-specific variables and overrides:
56
+ VARS_FILE=".github/workflows/release-vars.sh"
57
+ if [ -f "${VARS_FILE}" ]; then
58
+ source "${VARS_FILE}"
59
+ fi
60
+
61
+ # Python version used to build sdists, pure wheels, and as host Python for
62
+ # `cibuildwheel`:
63
+ if [ -z "${DEFAULT_PYTHON}" ]; then
64
+ # Default to second-most recent supported Python version:
65
+ DEFAULT_PYTHON=$(ci-helper defaultpython)
66
+ fi
67
+
68
+ # Versions of Python to build conda packages for:
69
+ if [ -z "${CONDA_PYTHONS}" ]; then
70
+ # Default to all supported Python versions:
71
+ CONDA_PYTHONS=$(ci-helper pythons)
72
+ fi
73
+
74
+ # Env var for `cibuildwheel` specifying target Python versions:
75
+ if [ -z "${CIBW_BUILD}" ]; then
76
+ # default to all supported CPython versions:
77
+ CIBW_BUILD=$(ci-helper pythons --cibw)
78
+ fi
79
+
80
+ # Package name and version
81
+ if [ -z "${PKGNAME}" ]; then
82
+ # Default to package name from project metadata:
83
+ PKGNAME=$(ci-helper distinfo name .)
84
+ fi
85
+ if [ -z "${PKGVER}" ]; then
86
+ # Default to package version from project metadata:
87
+ PKGVER=$(ci-helper distinfo version .)
88
+ fi
89
+
90
+ # Whether the package is pure python
91
+ if [ -z "${PURE}" ]; then
92
+ # Default to whether the setuptools package declares no modules/libraries:
93
+ PURE=$(ci-helper distinfo is_pure .)
94
+ fi
95
+
96
+ # Whether the package requirements depend on platform or Python version:
97
+ if [ -z "${HAS_ENV_MARKERS}" ]; then
98
+ # Default to the presence of env markers in package metadata:
99
+ HAS_ENV_MARKERS=$(ci-helper distinfo has_env_markers .)
100
+ fi
101
+
102
+ # List of OSs we need to run the build job on and arguments to
103
+ # `setuptools-conda build`:
104
+ if [[ "${PURE}" == false || "${HAS_ENV_MARKERS}" == true ]]; then
105
+ BUILD_OS_LIST="${OS_LIST_ALL}"
106
+ CONDA_BUILD_ARGS="--pythons=${CONDA_PYTHONS}"
107
+ else
108
+ BUILD_OS_LIST="${OS_LIST_UBUNTU}"
109
+ CONDA_BUILD_ARGS="--noarch"
110
+ fi
111
+
112
+ # Release if a tag was pushed:
113
+ if [ "${{ contains(github.ref, '/tags') }}" == true ]; then
114
+ RELEASE=true
115
+ else
116
+ RELEASE=false
117
+ fi
118
+
119
+ # What types of package uploads are enabled:
120
+ if [ -z "${PYPI_UPLOAD}" ]; then
121
+ PYPI_UPLOAD=true
122
+ else
123
+ PYPI_UPLOAD=false
124
+ fi
125
+ if [ -z "${TESTPYPI_UPLOAD}" ]; then
126
+ TESTPYPI_UPLOAD=true
127
+ else
128
+ TESTPYPI_UPLOAD=false
129
+ fi
130
+ if [ -z "${ANACONDA_UPLOAD}" ]; then
131
+ ANACONDA_UPLOAD=true
132
+ else
133
+ ANACONDA_UPLOAD=false
134
+ fi
135
+ if [ -z "${TEST_ANACONDA_UPLOAD}" ]; then
136
+ TEST_ANACONDA_UPLOAD=true
137
+ else
138
+ TEST_ANACONDA_UPLOAD=false
139
+ fi
140
+
141
+ if [ "${{ github.repository }}" != "${RELEASE_REPO}" ]; then
142
+ echo "Workflow repo doesn't match ${RELEASE_REPO}, disabling package uploads"
143
+ PYPI_UPLOAD=false
144
+ TESTPYPI_UPLOAD=false
145
+ ANACONDA_UPLOAD=false
146
+ TEST_ANACONDA_UPLOAD=false
147
+ fi
148
+
149
+ # If Anaconda uploads enabled, check necessary username and token are
150
+ # available:
151
+ if [[ "${ANACONDA_UPLOAD}" == true || "${TEST_ANACONDA_UPLOAD}" == true ]]; then
152
+ if [ -z "${{ secrets.ANACONDA_API_TOKEN }}" ]; then
153
+ echo "Anaconda uploads enabled but ANACONDA_API_TOKEN secret not set"
154
+ exit 1
155
+ fi
156
+ if [ -z "${ANACONDA_USER}" ]; then
157
+ echo "Anaconda uploads enabled but ANACONDA_USER not set"
158
+ exit 1
159
+ fi
160
+ fi
161
+
162
+ # If enabled, upload releases to PyPI and Anaconda:
163
+ if [[ "${RELEASE}" == true && "${PYPI_UPLOAD}" == true ]]; then
164
+ PYPI_UPLOAD_THIS_RUN=true
165
+ else
166
+ PYPI_UPLOAD_THIS_RUN=false
167
+ fi
168
+ if [[ "${RELEASE}" == true && "${ANACONDA_UPLOAD}" == true ]]; then
169
+ ANACONDA_UPLOAD_THIS_RUN=true
170
+ else
171
+ ANACONDA_UPLOAD_THIS_RUN=false
172
+ fi
173
+
174
+ # If enabled, upload non-releases to Test PyPI and Anaconda test label:
175
+ if [[ "${RELEASE}" == false && "${TESTPYPI_UPLOAD}" == true ]]; then
176
+ TESTPYPI_UPLOAD_THIS_RUN=true
177
+ else
178
+ TESTPYPI_UPLOAD_THIS_RUN=false
179
+ fi
180
+ if [[ "${RELEASE}" == false && "${TEST_ANACONDA_UPLOAD}" == true ]]; then
181
+ TEST_ANACONDA_UPLOAD_THIS_RUN=true
182
+ else
183
+ TEST_ANACONDA_UPLOAD_THIS_RUN=false
184
+ fi
185
+
186
+ echo "DEFAULT_PYTHON=${DEFAULT_PYTHON}" >> "${GITHUB_OUTPUT}"
187
+ echo "CIBW_BUILD=${CIBW_BUILD}" >> "${GITHUB_OUTPUT}"
188
+ echo "PKGNAME=${PKGNAME}" >> "${GITHUB_OUTPUT}"
189
+ echo "PKGVER=${PKGVER}" >> "${GITHUB_OUTPUT}"
190
+ echo "PURE=${PURE}" >> "${GITHUB_OUTPUT}"
191
+ echo "ANACONDA_USER=${ANACONDA_USER}" >> "${GITHUB_OUTPUT}"
192
+ echo "CONDA_BUILD_ARGS=${CONDA_BUILD_ARGS}" >> "${GITHUB_OUTPUT}"
193
+ echo "BUILD_OS_LIST=${BUILD_OS_LIST}" >> "${GITHUB_OUTPUT}"
194
+ echo "RELEASE=${RELEASE}" >> "${GITHUB_OUTPUT}"
195
+ echo "TESTPYPI_UPLOAD_THIS_RUN=${TESTPYPI_UPLOAD_THIS_RUN}" >> "${GITHUB_OUTPUT}"
196
+ echo "PYPI_UPLOAD_THIS_RUN=${PYPI_UPLOAD_THIS_RUN}" >> "${GITHUB_OUTPUT}"
197
+ echo "TEST_ANACONDA_UPLOAD_THIS_RUN=${TEST_ANACONDA_UPLOAD_THIS_RUN}" >> "${GITHUB_OUTPUT}"
198
+ echo "ANACONDA_UPLOAD_THIS_RUN=${ANACONDA_UPLOAD_THIS_RUN}" >> "${GITHUB_OUTPUT}"
199
+
200
+ echo
201
+ echo "=========================="
202
+ echo "Workflow run configuration:"
203
+ echo "--------------------------"
204
+ cat "${GITHUB_OUTPUT}"
205
+ echo "=========================="
206
+ echo
207
+
208
+
209
+ build:
210
+ name: Build
211
+ runs-on: ${{ matrix.os }}
212
+ needs: configure
213
+ strategy:
214
+ matrix:
215
+ os: ${{ fromJSON(needs.configure.outputs.BUILD_OS_LIST) }}
216
+
217
+ env:
218
+ DEFAULT_PYTHON: ${{ needs.configure.outputs.DEFAULT_PYTHON }}
219
+ CIBW_BUILD: ${{ needs.configure.outputs.CIBW_BUILD }}
220
+ PURE: ${{ needs.configure.outputs.PURE }}
221
+ CONDA_BUILD_ARGS: ${{ needs.configure.outputs.CONDA_BUILD_ARGS }}
222
+
223
+ steps:
224
+ - name: Checkout
225
+ uses: actions/checkout@v4
226
+ with:
227
+ fetch-depth: 0
228
+
229
+ - name: Ignore Tags for non-tag pushes
230
+ if: "!startsWith(github.ref, 'refs/tags/')"
231
+ run: git tag -d $(git tag --points-at HEAD)
232
+
233
+ - name: Install Python
234
+ uses: actions/setup-python@v5
235
+ with:
236
+ python-version: ${{ env.DEFAULT_PYTHON }}
237
+
238
+ - name: Install Python tools
239
+ run: python -m pip install --upgrade pip setuptools wheel build cibuildwheel
240
+
241
+ - name: Source distribution
242
+ if: strategy.job-index == 0
243
+ run: python -m build -s .
244
+
245
+ - name: Wheel distribution (pure)
246
+ if: env.PURE == 'true' && strategy.job-index == 0
247
+ run: python -m build -w .
248
+
249
+ - name: Wheel distribution (impure)
250
+ if: env.PURE == 'false'
251
+ run: cibuildwheel --output-dir dist
252
+
253
+ - name: Upload artifact
254
+ if: env.PURE == 'false' || strategy.job-index == 0
255
+ uses: actions/upload-artifact@v4
256
+ with:
257
+ name: dist-${{ matrix.os }}
258
+ path: ./dist
259
+ if-no-files-found: error
260
+
261
+ - name: Install Miniforge
262
+ uses: conda-incubator/setup-miniconda@v3
263
+ with:
264
+ miniforge-version: "latest"
265
+ auto-update-conda: true
266
+ conda-remove-defaults: true
267
+ auto-activate-base: true
268
+ activate-environment: ""
269
+
270
+ - name: Conda package
271
+ shell: bash -l {0}
272
+ run: |
273
+ if [ "${{ runner.os }}" == Windows ]; then
274
+ # Short path to minimise odds of hitting Windows max path length
275
+ CONDA_BUILD_ARGS+=" --croot ${{ runner.temp }}\cb"
276
+ fi
277
+ conda install -c labscript-suite setuptools-conda "conda-build<25"
278
+ setuptools-conda build $CONDA_BUILD_ARGS .
279
+
280
+ - name: Upload artifact
281
+ uses: actions/upload-artifact@v4
282
+ with:
283
+ name: conda_packages-${{ matrix.os }}
284
+ path: ./conda_packages
285
+ if-no-files-found: error
286
+
287
+
288
+ github-release:
289
+ name: Publish release (GitHub)
290
+ runs-on: ubuntu-latest
291
+ needs: [configure, build]
292
+ if: ${{ needs.configure.outputs.RELEASE == 'true' }}
293
+ permissions:
294
+ contents: write
295
+ env:
296
+ PKGNAME: ${{ needs.configure.outputs.PKGNAME }}
297
+ PKGVER: ${{ needs.configure.outputs.PKGVER }}
298
+
299
+ steps:
300
+ - name: Download Artifact
301
+ uses: actions/download-artifact@v4
302
+ with:
303
+ pattern: dist*
304
+ path: ./dist
305
+ merge-multiple: true
306
+
307
+ - name: Create GitHub release and upload release asset
308
+ uses: softprops/action-gh-release@v2
309
+ env:
310
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
311
+ with:
312
+ tag_name: ${{ github.event.ref }}
313
+ name: ${{ env.PKGNAME }} ${{ env.PKGVER }}
314
+ draft: true
315
+ prerelease: ${{ contains(github.event.ref, 'rc') }}
316
+ files: ./dist/*.tar.gz
317
+
318
+
319
+ testpypi-upload:
320
+ name: Publish on Test PyPI
321
+ runs-on: ubuntu-latest
322
+ needs: [configure, build]
323
+ if: ${{ needs.configure.outputs.TESTPYPI_UPLOAD_THIS_RUN == 'true' }}
324
+ env:
325
+ PKGNAME: ${{ needs.configure.outputs.PKGNAME }}
326
+ PKGVER: ${{ needs.configure.outputs.PKGVER }}
327
+ environment:
328
+ name: testpypi
329
+ url: https://test.pypi.org/project/${{ env.PKGNAME }}/${{ env.PKGVER }}
330
+ permissions:
331
+ id-token: write
332
+
333
+ steps:
334
+ - name: Download Artifact
335
+ uses: actions/download-artifact@v4
336
+ with:
337
+ pattern: dist*
338
+ path: ./dist
339
+ merge-multiple: true
340
+
341
+ - name: Publish on TestPyPI
342
+ uses: pypa/gh-action-pypi-publish@release/v1
343
+ with:
344
+ repository-url: https://test.pypi.org/legacy/
345
+
346
+
347
+ pypi-upload:
348
+ name: Publish on PyPI
349
+ runs-on: ubuntu-latest
350
+ needs: [configure, build]
351
+ if: ${{ needs.configure.outputs.PYPI_UPLOAD_THIS_RUN == 'true' }}
352
+ env:
353
+ PKGNAME: ${{ needs.configure.outputs.PKGNAME }}
354
+ PKGVER: ${{ needs.configure.outputs.PKGVER }}
355
+ environment:
356
+ name: pypi
357
+ url: https://pypi.org/project/${{ env.PKGNAME }}/${{ env.PKGVER }}
358
+ permissions:
359
+ id-token: write
360
+
361
+ steps:
362
+ - name: Download Artifact
363
+ uses: actions/download-artifact@v4
364
+ with:
365
+ pattern: dist*
366
+ path: ./dist
367
+ merge-multiple: true
368
+
369
+ - name: Publish on PyPI
370
+ uses: pypa/gh-action-pypi-publish@release/v1
371
+
372
+
373
+ test-anaconda-upload:
374
+ name: Publish on Anaconda (test label)
375
+ runs-on: ubuntu-latest
376
+ needs: [configure, build]
377
+ if: ${{ needs.configure.outputs.TEST_ANACONDA_UPLOAD_THIS_RUN == 'true' }}
378
+
379
+ steps:
380
+ - name: Download Artifact
381
+ uses: actions/download-artifact@v4
382
+ with:
383
+ pattern: conda_packages-*
384
+ path: ./conda_packages
385
+ merge-multiple: true
386
+
387
+ - name: Install Miniforge
388
+ uses: conda-incubator/setup-miniconda@v3
389
+ with:
390
+ miniforge-version: "latest"
391
+ auto-update-conda: true
392
+ conda-remove-defaults: true
393
+ auto-activate-base: true
394
+ activate-environment: ""
395
+
396
+ - name: Install Anaconda cloud client
397
+ shell: bash -l {0}
398
+ run: conda install anaconda-client
399
+
400
+ - name: Publish to Anaconda test label
401
+ shell: bash -l {0}
402
+ run: |
403
+ anaconda \
404
+ --token ${{ secrets.ANACONDA_API_TOKEN }} \
405
+ upload \
406
+ --skip-existing \
407
+ --user ${{ needs.configure.outputs.ANACONDA_USER }} \
408
+ --label test \
409
+ conda_packages/*/*
410
+
411
+
412
+ anaconda-upload:
413
+ name: Publish on Anaconda
414
+ runs-on: ubuntu-latest
415
+ needs: [configure, build]
416
+ if: ${{ needs.configure.outputs.ANACONDA_UPLOAD_THIS_RUN == 'true' }}
417
+
418
+ steps:
419
+ - name: Download Artifact
420
+ uses: actions/download-artifact@v4
421
+ with:
422
+ pattern: conda_packages-*
423
+ path: ./conda_packages
424
+ merge-multiple: true
425
+
426
+ - name: Install Miniforge
427
+ uses: conda-incubator/setup-miniconda@v3
428
+ with:
429
+ miniforge-version: "latest"
430
+ auto-update-conda: true
431
+ conda-remove-defaults: true
432
+ auto-activate-base: true
433
+ activate-environment: ""
434
+
435
+ - name: Install Anaconda cloud client
436
+ shell: bash -l {0}
437
+ run: conda install anaconda-client
438
+
439
+ - name: Publish to Anaconda main
440
+ shell: bash -l {0}
441
+ run: |
442
+ anaconda \
443
+ --token ${{ secrets.ANACONDA_API_TOKEN }} \
444
+ upload \
445
+ --skip-existing \
446
+ --user ${{ needs.configure.outputs.ANACONDA_USER }} \
447
+ conda_packages/*/*
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: labscript-utils
3
+ Version: 3.4.0
4
+ Summary: Shared utilities for the labscript suite
5
+ Author-email: The labscript suite community <labscriptsuite@googlegroups.com>
6
+ License: Copyright (c) 2013, Monash University
7
+ All rights reserved.
8
+
9
+ This project (labscript_utils) is dual licensed under the 2-clause BSD license and 3-clause BSD license (see the files BSD-2-CLAUSE-LICENSE.txt and BSD-3-CLAUSE-LICENSE.txt), subject to the following conditions:
10
+
11
+ 1) If you wish to use this project with PySide and/or a commercial license of PyQt, the use of this project is governed by the terms of one of the licenses, chosen at your discretion.
12
+
13
+ 2) If you wish to use this project with the free (GPLv2 or GPLv3 licensed) version of PyQt, the use of this project is governed by the terms of the 3-clause BSD license only, along with the terms specified in the GPL_EXCEPTIONS.TXT file in the PyQt project source code.
14
+
15
+ These terms are in place to guarantee compatibility with the terms outlined in the GPL License Exceptions of the PyQt project (see the GPL_EXCEPTIONS.TXT file in the source code of the PyQt project)
16
+ Project-URL: Homepage, http://labscriptsuite.org/
17
+ Project-URL: Documentation, https://docs.labscriptsuite.org/
18
+ Project-URL: Repository, https://github.com/labscript-suite/labscript-utils/
19
+ Project-URL: Downloads, https://github.com/labscript-suite/labscript-utils/releases/
20
+ Project-URL: Tracker, https://github.com/labscript-suite/labscript-utils/issues/
21
+ Keywords: experiment control,automation
22
+ Classifier: License :: OSI Approved :: BSD License
23
+ Classifier: Programming Language :: Python :: 3 :: Only
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE.txt
27
+ Requires-Dist: h5py>=2.9
28
+ Requires-Dist: numpy>=1.15
29
+ Requires-Dist: packaging>=20.4
30
+ Requires-Dist: pyqtgraph>=0.11.0rc0
31
+ Requires-Dist: qtutils>=4.0
32
+ Requires-Dist: scipy
33
+ Requires-Dist: zprocess>=2.18.0
34
+ Requires-Dist: setuptools_scm>=4.1.0
35
+ Provides-Extra: docs
36
+ Requires-Dist: PyQt5; extra == "docs"
37
+ Requires-Dist: Sphinx==7.2.6; extra == "docs"
38
+ Requires-Dist: sphinx-rtd-theme==2.0.0; extra == "docs"
39
+ Requires-Dist: myst_parser==2.0.0; extra == "docs"
40
+ Dynamic: license-file
41
+
42
+ <img src="https://raw.githubusercontent.com/labscript-suite/labscript-suite/master/art/labscript_32nx32n.svg" height="64" alt="the labscript suite" align="right">
43
+
44
+ # the _labscript suite_ » labscript-utils
45
+
46
+ ### Shared modules used by the _labscript suite_
47
+
48
+ [![Actions Status](https://github.com/labscript-suite/labscript-utils/workflows/Build%20and%20Release/badge.svg)](https://github.com/labscript-suite/labscript-utils/actions)
49
+ [![License](https://img.shields.io/pypi/l/labscript-utils.svg)](https://github.com/labscript-suite/labscript-utils/raw/master/LICENSE.txt)
50
+ [![Python Version](https://img.shields.io/pypi/pyversions/labscript-utils.svg)](https://python.org)
51
+ [![PyPI](https://img.shields.io/pypi/v/labscript-utils.svg)](https://pypi.org/project/labscript-utils)
52
+ [![Conda Version](https://img.shields.io/conda/v/labscript-suite/labscript-utils)](https://anaconda.org/labscript-suite/labscript-utils)
53
+ [![Google Group](https://img.shields.io/badge/Google%20Group-labscriptsuite-blue.svg)](https://groups.google.com/forum/#!forum/labscriptsuite)
54
+ <!-- [![DOI](http://img.shields.io/badge/DOI-10.1063%2F1.4817213-0F79D0.svg)](https://doi.org/10.1063/1.4817213) -->
55
+
56
+
57
+ Shared modules used by the [*labscript suite*](https://github.com/labscript-suite/labscript-suite). Includes a graphical exception handler, debug tools, configuration management, cross-platform filepath conversions, physical unit conversions and custom GUI widgets.
58
+
59
+
60
+ ## Installation
61
+
62
+ labscript-utils is distributed as a Python package on [PyPI](https://pypi.org/user/labscript-suite) and [Anaconda Cloud](https://anaconda.org/labscript-suite), and should be installed with other components of the _labscript suite_. Please see the [installation guide](https://docs.labscriptsuite.org/en/latest/installation) for details.
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### Shared modules used by the _labscript suite_
6
6
 
7
- [![Actions Status](https://github.com/labscript-suite/labscript-utils/workflows/Build%20and%20Release/badge.svg?branch=maintenance%2F3.0.x)](https://github.com/labscript-suite/labscript-utils/actions)
7
+ [![Actions Status](https://github.com/labscript-suite/labscript-utils/workflows/Build%20and%20Release/badge.svg)](https://github.com/labscript-suite/labscript-utils/actions)
8
8
  [![License](https://img.shields.io/pypi/l/labscript-utils.svg)](https://github.com/labscript-suite/labscript-utils/raw/master/LICENSE.txt)
9
9
  [![Python Version](https://img.shields.io/pypi/pyversions/labscript-utils.svg)](https://python.org)
10
10
  [![PyPI](https://img.shields.io/pypi/v/labscript-utils.svg)](https://pypi.org/project/labscript-utils)
@@ -13,8 +13,6 @@
13
13
  import copy
14
14
  import os
15
15
  from pathlib import Path
16
- from m2r import MdInclude
17
- from recommonmark.transform import AutoStructify
18
16
  from jinja2 import FileSystemLoader, Environment
19
17
 
20
18
  # -- Project information (unique to each project) -------------------------------------
@@ -47,7 +45,7 @@ extensions = [
47
45
  "sphinx.ext.todo",
48
46
  "sphinx.ext.viewcode",
49
47
  "sphinx_rtd_theme",
50
- "recommonmark",
48
+ "myst_parser",
51
49
  ]
52
50
 
53
51
  autodoc_typehints = 'description'
@@ -73,6 +71,7 @@ del __fn
73
71
 
74
72
  # Prefix each autosectionlabel with the name of the document it is in and a colon
75
73
  autosectionlabel_prefix_document = True
74
+ myst_heading_anchors = 2
76
75
 
77
76
  # Add any paths that contain templates here, relative to this directory.
78
77
  templates_path = ['_templates']
@@ -211,23 +210,8 @@ html_static_path = ['_static']
211
210
  # Customize the html_theme
212
211
  html_theme_options = {'navigation_depth': 3}
213
212
 
214
- # Use m2r only for mdinclude and recommonmark for everything else
215
- # https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992
216
213
  def setup(app):
217
- config = {
218
- # 'url_resolver': lambda url: github_doc_root + url,
219
- 'auto_toc_tree_section': 'Contents',
220
- 'enable_eval_rst': True,
221
- }
222
- app.add_config_value('recommonmark_config', config, True)
223
- app.add_transform(AutoStructify)
224
-
225
- # from m2r to make `mdinclude` work
226
- app.add_config_value('no_underscore_emphasis', False, 'env')
227
- app.add_config_value('m2r_parse_relative_links', False, 'env')
228
- app.add_config_value('m2r_anonymous_references', False, 'env')
229
- app.add_config_value('m2r_disable_inline_math', False, 'env')
230
- app.add_directive('mdinclude', MdInclude)
214
+
231
215
  app.add_css_file('custom.css')
232
216
 
233
217
  # generate the components.rst file dynamically so it points to stable/latest