Skip to content

Commit 26cfa05

Browse files
committed
Squashed commit of the following:
commit f9c1b0a1fbdde31f560022d8f6f62a7f6d9f8022 Author: David Meyer <dihm@users.noreply.github.com> Date: Fri Feb 9 13:38:37 2024 -0500 Merge pull request #103 from dihm/update_workflow Update workflow pins to use node.js=20 commit 4d1d4c1f32ade27faba0bb84868170eafc920f81 Author: David Meyer <dihm@users.noreply.github.com> Date: Fri Feb 9 13:38:24 2024 -0500 Merge pull request #102 from dihm/setuptools_scm_fix Ensure setuptools_scm uses `release-branch-semver` commit 57db7c055cb886b03a969436fc7013288097c32b Author: David Meyer <dihm@users.noreply.github.com> Date: Thu Jan 18 20:53:05 2024 -0500 Merge pull request #101 from dihm/rtd_builds Modernize RTD build
1 parent 7e49ae2 commit 26cfa05

7 files changed

Lines changed: 28 additions & 40 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
if: github.repository == 'labscript-suite/blacs' && (github.event_name != 'create' || github.event.ref_type != 'branch')
6565
steps:
6666
- name: Checkout
67-
uses: actions/checkout@v3
67+
uses: actions/checkout@v4
6868
with:
6969
fetch-depth: 0
7070

@@ -73,7 +73,7 @@ jobs:
7373
run: git tag -d $(git tag --points-at HEAD)
7474

7575
- name: Install Python
76-
uses: actions/setup-python@v4
76+
uses: actions/setup-python@v5
7777
with:
7878
python-version: ${{ matrix.python }}
7979
architecture: ${{ matrix.arch }}
@@ -93,7 +93,7 @@ jobs:
9393
9494
- name: Upload Artifact
9595
if: strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
96-
uses: actions/upload-artifact@v3
96+
uses: actions/upload-artifact@v4
9797
with:
9898
name: dist
9999
path: ./dist
@@ -111,7 +111,7 @@ jobs:
111111
112112
- name: Install Miniconda
113113
if: matrix.conda
114-
uses: conda-incubator/setup-miniconda@v2
114+
uses: conda-incubator/setup-miniconda@v3
115115
with:
116116
auto-update-conda: true
117117
python-version: ${{ matrix.python }}
@@ -140,7 +140,7 @@ jobs:
140140
141141
- name: Upload Artifact
142142
if: matrix.conda
143-
uses: actions/upload-artifact@v3
143+
uses: actions/upload-artifact@v4
144144
with:
145145
name: conda_packages
146146
path: ./conda_packages
@@ -153,7 +153,7 @@ jobs:
153153
steps:
154154
- name: Checkout
155155
if: env.PURE == 'false'
156-
uses: actions/checkout@v3
156+
uses: actions/checkout@v4
157157
with:
158158
fetch-depth: 0
159159

@@ -170,7 +170,7 @@ jobs:
170170

171171
- name: Upload Artifact
172172
if: env.PURE == 'false'
173-
uses: actions/upload-artifact@v3
173+
uses: actions/upload-artifact@v4
174174
with:
175175
name: dist
176176
path: dist/*manylinux*.whl
@@ -182,13 +182,13 @@ jobs:
182182
steps:
183183

184184
- name: Download Artifact
185-
uses: actions/download-artifact@v3
185+
uses: actions/download-artifact@v4
186186
with:
187187
name: dist
188188
path: ./dist
189189

190190
- name: Download Artifact
191-
uses: actions/download-artifact@v3
191+
uses: actions/download-artifact@v4
192192
with:
193193
name: conda_packages
194194
path: ./conda_packages
@@ -226,7 +226,7 @@ jobs:
226226
password: ${{ secrets.pypi }}
227227

228228
- name: Install Miniconda
229-
uses: conda-incubator/setup-miniconda@v2
229+
uses: conda-incubator/setup-miniconda@v3
230230
with:
231231
auto-update-conda: true
232232

blacs/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from setuptools_scm import get_version
1111
__version__ = get_version(
1212
root,
13-
version_scheme="release-branch-semver",
13+
version_scheme=os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"),
1414
local_scheme=os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
1515
)
1616
else:

docs/source/conf.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
import copy
1414
import os
1515
from pathlib import Path
16-
from m2r import MdInclude
17-
from recommonmark.transform import AutoStructify
1816
from jinja2 import FileSystemLoader, Environment
1917

2018
# -- Project information (unique to each project) -------------------------------------
@@ -47,7 +45,7 @@
4745
"sphinx.ext.todo",
4846
"sphinx.ext.viewcode",
4947
"sphinx_rtd_theme",
50-
"recommonmark",
48+
"myst_parser",
5149
]
5250

5351
autodoc_typehints = 'description'
@@ -74,6 +72,7 @@
7472

7573
# Prefix each autosectionlabel with the name of the document it is in and a colon
7674
autosectionlabel_prefix_document = True
75+
myst_heading_anchors = 2
7776

7877
# Add any paths that contain templates here, relative to this directory.
7978
templates_path = ['_templates']
@@ -212,23 +211,8 @@
212211
# Customize the html_theme
213212
html_theme_options = {'navigation_depth': 3}
214213

215-
# Use m2r only for mdinclude and recommonmark for everything else
216-
# https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992
217214
def setup(app):
218-
config = {
219-
# 'url_resolver': lambda url: github_doc_root + url,
220-
'auto_toc_tree_section': 'Contents',
221-
'enable_eval_rst': True,
222-
}
223-
app.add_config_value('recommonmark_config', config, True)
224-
app.add_transform(AutoStructify)
225-
226-
# from m2r to make `mdinclude` work
227-
app.add_config_value('no_underscore_emphasis', False, 'env')
228-
app.add_config_value('m2r_parse_relative_links', False, 'env')
229-
app.add_config_value('m2r_anonymous_references', False, 'env')
230-
app.add_config_value('m2r_disable_inline_math', False, 'env')
231-
app.add_directive('mdinclude', MdInclude)
215+
232216
app.add_css_file('custom.css')
233217

234218
# generate the components.rst file dynamically so it points to stable/latest

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "setuptools_scm>=4.1.0"]
2+
requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"]
33
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools_scm]

readthedocs.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
# Required
55
version: 2
66

7+
# Set build environment options
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
713
# Build documentation in the docs/ directory with Sphinx
814
sphinx:
915
builder: dirhtml
@@ -15,13 +21,11 @@ formats:
1521
- pdf
1622
- epub
1723

18-
# Optionally set the version of Python and requirements required to build your docs
24+
# Optionally set the requirements required to build your docs
1925
python:
20-
version: 3.7
2126
install:
2227
- method: pip
2328
path: .
2429
extra_requirements:
2530
- docs
26-
system_packages: true
2731

setup.cfg

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ gui_scripts =
4545
pyqt = PyQt5
4646
docs =
4747
PyQt5
48-
Sphinx==4.4.0
49-
sphinx-rtd-theme==0.5.2
50-
recommonmark==0.6.0
51-
m2r==0.2.1
52-
mistune<2.0.0
48+
Sphinx==7.2.6
49+
sphinx-rtd-theme==2.0.0
50+
myst_parser==2.0.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
use_scm_version={
6-
"version_scheme": "release-branch-semver",
6+
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"),
77
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
88
}
99
)

0 commit comments

Comments
 (0)