Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f9c1b0a1fbdde31f560022d8f6f62a7f6d9f8022
Author: David Meyer <[email protected]>
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 <[email protected]>
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 <[email protected]>
Date:   Thu Jan 18 20:53:05 2024 -0500

    Merge pull request #101 from dihm/rtd_builds

    Modernize RTD build
  • Loading branch information
dihm committed Feb 9, 2024
1 parent 7e49ae2 commit 26cfa05
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 40 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
if: github.repository == 'labscript-suite/blacs' && (github.event_name != 'create' || github.event.ref_type != 'branch')
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
Expand All @@ -93,7 +93,7 @@ jobs:
- name: Upload Artifact
if: strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist
Expand All @@ -111,7 +111,7 @@ jobs:
- name: Install Miniconda
if: matrix.conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
- name: Upload Artifact
if: matrix.conda
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: conda_packages
path: ./conda_packages
Expand All @@ -153,7 +153,7 @@ jobs:
steps:
- name: Checkout
if: env.PURE == 'false'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -170,7 +170,7 @@ jobs:

- name: Upload Artifact
if: env.PURE == 'false'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*manylinux*.whl
Expand All @@ -182,13 +182,13 @@ jobs:
steps:

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

- name: Download Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: conda_packages
path: ./conda_packages
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
password: ${{ secrets.pypi }}

- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true

Expand Down
2 changes: 1 addition & 1 deletion blacs/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from setuptools_scm import get_version
__version__ = get_version(
root,
version_scheme="release-branch-semver",
version_scheme=os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"),
local_scheme=os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
)
else:
Expand Down
22 changes: 3 additions & 19 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import copy
import os
from pathlib import Path
from m2r import MdInclude
from recommonmark.transform import AutoStructify
from jinja2 import FileSystemLoader, Environment

# -- Project information (unique to each project) -------------------------------------
Expand Down Expand Up @@ -47,7 +45,7 @@
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_rtd_theme",
"recommonmark",
"myst_parser",
]

autodoc_typehints = 'description'
Expand All @@ -74,6 +72,7 @@

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

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

# Use m2r only for mdinclude and recommonmark for everything else
# https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992
def setup(app):
config = {
# 'url_resolver': lambda url: github_doc_root + url,
'auto_toc_tree_section': 'Contents',
'enable_eval_rst': True,
}
app.add_config_value('recommonmark_config', config, True)
app.add_transform(AutoStructify)

# from m2r to make `mdinclude` work
app.add_config_value('no_underscore_emphasis', False, 'env')
app.add_config_value('m2r_parse_relative_links', False, 'env')
app.add_config_value('m2r_anonymous_references', False, 'env')
app.add_config_value('m2r_disable_inline_math', False, 'env')
app.add_directive('mdinclude', MdInclude)

app.add_css_file('custom.css')

# generate the components.rst file dynamically so it points to stable/latest
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools_scm>=4.1.0"]
requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
10 changes: 7 additions & 3 deletions readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# Required
version: 2

# Set build environment options
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: dirhtml
Expand All @@ -15,13 +21,11 @@ formats:
- pdf
- epub

# Optionally set the version of Python and requirements required to build your docs
# Optionally set the requirements required to build your docs
python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
system_packages: true

8 changes: 3 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ gui_scripts =
pyqt = PyQt5
docs =
PyQt5
Sphinx==4.4.0
sphinx-rtd-theme==0.5.2
recommonmark==0.6.0
m2r==0.2.1
mistune<2.0.0
Sphinx==7.2.6
sphinx-rtd-theme==2.0.0
myst_parser==2.0.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
use_scm_version={
"version_scheme": "release-branch-semver",
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"),
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
}
)

0 comments on commit 26cfa05

Please sign in to comment.