Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f92e77a
ci: update docs publishing using myst-version-switcher-plugin
Aug 17, 2026
fa1e221
ci: edit and update ci.yml.jinja file with new changes from ci.yml
Aug 17, 2026
1bfab01
chore: test a commit
Aug 18, 2026
f4300a8
chore: test a commit2
shree-iyengar-dls Aug 18, 2026
8cf5f89
chore: delete _release.yml file
shree-iyengar-dls Aug 18, 2026
63349e2
ci: remove type checking from tox in ci.yml
shree-iyengar-dls Aug 19, 2026
1ef5fde
chore: add long description to pyproject.toml
shree-iyengar-dls Aug 19, 2026
2e7e25f
chore: add readme to pyproject.toml
shree-iyengar-dls Aug 19, 2026
5ce47c3
chore: remove dist as a requirement for release in ci.yml
shree-iyengar-dls Aug 19, 2026
20e3ae6
add type-checking back to lint job
shree-iyengar-dls Aug 19, 2026
c42623a
chore:revert back some of ci yml jinja changes
shree-iyengar-dls Aug 19, 2026
77f8fea
chore:remove extra endif
shree-iyengar-dls Aug 19, 2026
beb39c0
chore: cahnges to conf.py files
shree-iyengar-dls Aug 19, 2026
98d9e5f
ci: remove dist job from ci.yml
shree-iyengar-dls Aug 19, 2026
cc2c0ba
chore: update uv lock and jinja file
shree-iyengar-dls Aug 20, 2026
cfffc41
ci: upgrade docs pipeline from v0.24 to v0.27.0
shree-iyengar-dls Sep 10, 2026
4bc49b3
chore: remove a few package names from renovate
shree-iyengar-dls Sep 10, 2026
edafb0d
chore: formatting changes in pyproject.toml
shree-iyengar-dls Sep 10, 2026
73821b8
remove if in renovate.json.jinja
shree-iyengar-dls Sep 11, 2026
ae89f4a
remove trailing comma
shree-iyengar-dls Sep 11, 2026
71341f0
chore: rearrange order in renovate.json
shree-iyengar-dls Sep 14, 2026
47f7612
ci: add install graphviz
shree-iyengar-dls Sep 14, 2026
26df0ae
ci: add needs install graphviz to docs
shree-iyengar-dls Sep 14, 2026
8e03b1e
ci: add install graphviz to ci.yml.jinja file
shree-iyengar-dls Sep 14, 2026
f2713ee
fix indentation
shree-iyengar-dls Oct 6, 2026
65a4d76
remove install graphviz
shree-iyengar-dls Oct 7, 2026
8fa32d3
chore: update to v 0.28
shree-iyengar-dls Oct 7, 2026
4ce7295
style: change typo blueapi to python copier template
shree-iyengar-dls Oct 7, 2026
3d934a5
ci: install graphviz for docs build
hyperrealist Oct 7, 2026
5bd01b8
chore: allow devcontainer to use the TUN device
hyperrealist Oct 7, 2026
b6abd38
remove ending html from path
Oct 7, 2026
534c0f1
chore: remove obselete code in template contributing.md
shree-iyengar-dls Oct 7, 2026
57b8110
chore: fix url
shree-iyengar-dls Oct 7, 2026
10754f9
docs: update how-to page on building docs
shree-iyengar-dls Oct 7, 2026
663b651
Update lockfile
OCopping Nov 2, 2026
69b7987
remove _docs.yml
Nov 2, 2026
1e103fe
add back in code that had been incorrectly removed
shree-iyengar-dls Nov 3, 2026
7b222a6
changes from PR review comments
shree-iyengar-dls Nov 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/pages/index.html

This file was deleted.

96 changes: 0 additions & 96 deletions .github/pages/make_switcher.py

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/_docs.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/_release.yml

This file was deleted.

24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: CI

on:
push:
branches:
- main
tags:
- '*'
pull_request:
push:
branches: [main]
tags: ["*"] # '*' never matches '/', so e.g. release/x tags don't build

jobs:
lint:
Expand All @@ -19,10 +17,12 @@ jobs:
with:
runs-on: ubuntu-latest

docs:
uses: ./.github/workflows/_docs.yml
permissions:
contents: write
docs: # Call the docs building workflow directly
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/docs.yml@v0.28.0
with:
# Some of the docs need graphviz, so install it as well as running sphinx
build-command: sudo apt-get install -y graphviz && uv run --locked tox -e docs
html-dir: build/html

example:
needs: test
Expand All @@ -33,7 +33,7 @@ jobs:

release:
needs: [test, docs]
if: github.ref_type == 'tag'
uses: ./.github/workflows/_release.yml
if: github.ref_type == 'tag' # tag pushes only
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/release.yml@v0.28.0
permissions:
contents: write
contents: write # create the Release + attach assets
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish

on:
# matches ci.yml's `name:`, NOT its filename
workflow_run:
workflows: [CI]
types: [completed]

# fork-PR previews and manual re-deploys
workflow_dispatch:
inputs:
pr:
description: "Fork PR to approve + preview (empty = re-deploy)"
required: false
default: ""

jobs:
publish:
# Run if the workflow has been manually dispatched or it was a
# successful CI run that did not come from a fork.
# Skip merge queue runs as they deploy the same commit as the PR commit
if: >-
(github.event_name == 'workflow_dispatch' ||
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event != 'merge_group' &&
github.event.workflow_run.head_repository.full_name == github.repository))
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/publish-gh-pages.yml@v0.28.0
with:
pr: ${{ inputs.pr }}
max-releases: "30"
max-prs: "20"
permissions:
contents: read
actions: read # gather cross-run docs artifacts
pages: write
id-token: write
statuses: write # record the fork-preview approval / preview link
3 changes: 3 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,6 @@ _migrations:
- echo This update will require you to login to pypi.org and make changes before you can make a new release to PyPI. If you do not have time to do this now, press CTRL+C to abort this update.
after:
- echo Visit https://diamondlightsource.github.io/python-copier-template/main/how-to/pypi.html to find out how to set up PyPI trusted publishing

publish:
- echo: If your repo was using the `gh-pages` branch to publish docs, follow the [migration instructions](https://diamondlightsource.github.io/myst-version-switcher-plugin/main/how-to/migrate-from-gh-pages) to now use Github Actions.
25 changes: 8 additions & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys
from importlib.metadata import version
from pathlib import Path
from subprocess import check_output

import requests

Expand All @@ -19,14 +17,7 @@
# The full version, including alpha/beta/rc tags.
release = version(project)

# The short X.Y version.
if "+" in release:
# Not on a tag, use branch name
root = Path(__file__).absolute().parent.parent
git_branch = check_output("git branch --show-current".split(), cwd=root)
version = git_branch.decode().strip()
else:
version = release
version = os.environ.get("VERSION_NAME", "local")

extensions = [
# For graphviz diagrams
Expand Down Expand Up @@ -110,9 +101,9 @@
if not switcher_exists:
print(
"*** Can't read version switcher, is GitHub pages enabled? \n"
" Once Docs CI job has successfully run once, set the "
"Github pages source branch to be 'gh-pages' at:\n"
f" https://github.com/{github_user}/{github_repo}/settings/pages",
" Set the Github pages source to 'GitHub Actions' at:\n"
f" https://github.com/{github_user}/{github_repo}/settings/pages\n"
" then CI will publish the docs on its next successful run.",
file=sys.stderr,
)

Expand All @@ -135,15 +126,15 @@
"json_url": switcher_json,
"version_match": version,
},
"check_switcher": True,
"navbar_end": ["theme-switcher", "icon-links", "version-switcher"],
"check_switcher": False,
"navbar_end": ["theme-switcher", "navbar-icon-links", "version-switcher"],
}

# A dictionary of values to pass into the template engine’s context for all pages
html_context = {
"github_user": github_user,
"github_repo": github_repo,
"github_version": version,
"github_version": "main",
"doc_path": "docs",
}

Expand Down
8 changes: 6 additions & 2 deletions docs/how-to/build-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ $ tox -e docs-autobuild -- --watch tests
(building-docs-in-ci)=
## Building docs in CI

After a successful run of CI
For a successful docs build, the source for the 'Build and Deployment' of the Github Pages should be set to GitHub Actions (Not 'Deploy from a branch'). This should be changes first and then the CI will publish.

Settings > Pages

![Setup GitHub Pages](../images/gh-pages-setup.png)
![Setup GitHub Pages](../images/github-pages-actions-setup.png)

If your repo was using the `gh-pages` branch to publish docs, follow the [migration instructions](https://diamondlightsource.github.io/myst-version-switcher-plugin/main/how-to/migrate-from-gh-pages) to now use Github Actions.

Docs are built using the [myst-version-switcher-plugin](https://github.com/DiamondLightSource/myst-version-switcher-plugin).
Binary file removed docs/images/gh-pages-setup.png
Binary file not shown.
Binary file added docs/images/github-pages-actions-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ build-backend = "setuptools.build_meta"

[project]
name = "python-copier-template"
description = "Diamond's opinionated copier template for pure Python projects."
dynamic = ["version"]
readme = "README.md"
requires-python = ">=3.11"

[dependency-groups]
Expand Down
7 changes: 3 additions & 4 deletions template/renovate.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
"actions/checkout",
"astral-sh/setup-uv",
"actions/upload-artifact",
Comment thread
shree-iyengar-dls marked this conversation as resolved.
Resolved
"actions/download-artifact",
"softprops/action-gh-release",
"DiamondLightSource/myst-version-switcher-plugin",
"codecov/codecov-action"{% if docker %},
"docker/setup-buildx-action",
"docker/login-action",
"docker/build-push-action",
"docker/metadata-action"{% endif %}{% if pypi %},
"pypa/gh-action-pypi-publish"{% endif %}{% if sphinx %},
"peaceiris/actions-gh-pages"{% endif %}
"pypa/gh-action-pypi-publish",
"actions/download-artifact"{% endif %}
],
"matchManagers": [
"github-actions"
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading