Skip to content

Commit 4e462a7

Browse files
authored
chore: include more justfile commands in ci (#192)
Create a reusable workflow to setup our project environment and run a command. Use this for the existing checks and add two more checks. * Check examples do not error * Check docs do not error * Also trigger a docs deploy on release so we don't have to do this manually. * Remove quantinuum-sphinx because it is failing and we don't use it. EDIT: GitHub is confused when I try to modify/delete `ci.yml` so I'm going to try this in two separate PRs... the next will remove the old `ci.yml`.
1 parent b382654 commit 4e462a7

10 files changed

Lines changed: 107 additions & 33 deletions

File tree

.github/workflows/checks.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Python package CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
uses: ./.github/workflows/run-command.yml
14+
with:
15+
command_name: lint
16+
command: just lint
17+
18+
test:
19+
uses: ./.github/workflows/run-command.yml
20+
with:
21+
command_name: test
22+
command: just test
23+
24+
examples:
25+
uses: ./.github/workflows/run-command.yml
26+
with:
27+
command_name: examples
28+
command: just examples
29+
30+
docs:
31+
uses: ./.github/workflows/run-command.yml
32+
with:
33+
command_name: docs
34+
command: just docs

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
on:
2+
release:
3+
types: [created]
24
workflow_dispatch:
35

46
jobs:

.github/workflows/run-command.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Reusable setup for command
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
command_name:
7+
required: true
8+
type: string
9+
command:
10+
required: true
11+
type: string
12+
13+
jobs:
14+
run:
15+
name: ${{ inputs.command_name }}
16+
runs-on: ubuntu-24.04
17+
strategy:
18+
matrix:
19+
python-version: ["3.12"]
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up uv & venv
25+
uses: astral-sh/setup-uv@v5
26+
with:
27+
version: "0.6.6"
28+
enable-cache: true
29+
python-version: ${{ matrix.python-version }}
30+
cache-dependency-glob: uv.lock
31+
32+
- name: Setup just
33+
uses: extractions/setup-just@v3
34+
35+
- name: ${{ inputs.command_name }}
36+
run: ${{ inputs.command }}

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# -- General configuration ---------------------------------------------------
1414
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1515

16-
extensions = ["autodoc2", "quantinuum_sphinx", "myst_nb"]
16+
extensions = ["autodoc2", "myst_nb"]
1717
autodoc2_packages = [
1818
"../../tierkreis/tierkreis",
1919
"../../tierkreis_workers/aer_worker",

examples/example_workers/auth_worker/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/example_workers/substitution_worker/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,10 @@ test = [
2626
"pydantic>=2.9.2",
2727
]
2828
docs = [
29-
"quantinuum-sphinx",
3029
"sphinx>=8.2",
3130
"myst-parser>=4.0.1",
3231
"sphinx-autodoc2>=0.5.0",
3332
"myst-nb>=1.3.0",
33+
"furo>=2025.7.19",
3434
]
3535
examples = ["pyscf>=2.9.0"]
36-
37-
[tool.uv.sources]
38-
quantinuum-sphinx = { git = "https://github.com/CQCL/quantinuum-sphinx.git" }

tierkreis/tierkreis/controller/executor/shell_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def run(
6060
)
6161
proc.communicate(
6262
f"{launcher_path} {worker_call_args_path} && touch {done_path}".encode(),
63-
timeout=3,
63+
timeout=10,
6464
)
6565

6666
def _create_env(

tierkreis/tierkreis/controller/executor/stdinout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ def run(self, launcher_name: str, worker_call_args_path: Path) -> None:
5151
)
5252
proc.communicate(
5353
f"{launcher_path} <{input_file} >{output_file} && touch {done_path}".encode(),
54-
timeout=3,
54+
timeout=10,
5555
)

uv.lock

Lines changed: 29 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)