Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d66f27a
Add comment for consistency with templates
joewallwork Mar 24, 2026
00e2bd1
Improve consistency of path triggers
joewallwork Mar 24, 2026
a6f0c49
Add test for applying static analysis template
joewallwork Mar 24, 2026
ae697d9
Need to install copier
joewallwork Mar 24, 2026
1cad160
Use hash for actions checkout
joewallwork Mar 24, 2026
b2b8272
Use copier.yml as build system file
joewallwork Mar 24, 2026
2cfd470
Check diff with static_analysis.yml specifically
joewallwork Mar 24, 2026
1da01ef
Add check for test suite, too
joewallwork Mar 24, 2026
0bcad88
Add answers files
joewallwork Mar 24, 2026
36197c3
Ensure test suite workflow raises errors
joewallwork Mar 24, 2026
643a0f8
More test fixes
joewallwork Mar 24, 2026
f4aacba
Add patch file and fix ordering
joewallwork Mar 24, 2026
a93d239
Only turn on errors for check
joewallwork Mar 24, 2026
bdbb7b1
Print diff on failure
joewallwork Mar 24, 2026
720c1e4
Only raise error if exiting
joewallwork Mar 24, 2026
5c4d2bc
Use correct syntax for set
joewallwork Mar 24, 2026
3d66f61
Fix inverted test conditions in test suite workflow (#68)
Copilot Mar 24, 2026
7767105
Spell out --answers-file
joewallwork Mar 24, 2026
f3e0d28
Add descriptions for answers files
joewallwork Mar 24, 2026
bb1eff1
Undo change to static analysis workflow
joewallwork Mar 24, 2026
f9550de
Drop redundant echos
joewallwork Mar 24, 2026
6686661
Add index page
joewallwork Mar 25, 2026
cdb49c5
Add lit review page
joewallwork Mar 25, 2026
3c4c13f
Add usage page
joewallwork Mar 25, 2026
77f61f1
Add community page
joewallwork Mar 25, 2026
6af9a39
Add best practices page
joewallwork Mar 25, 2026
7e87cbb
Add about page
joewallwork Mar 25, 2026
a6fbcba
Add docs build system
joewallwork Mar 25, 2026
a7d8859
Rework build_docs workflow to have separate build and deploy jobs
joewallwork Mar 26, 2026
5f492d2
Add workflow for building and deploying docs
joewallwork Mar 26, 2026
5a7fc19
Add testing framework for build_docs workflow
joewallwork Mar 26, 2026
a03d8be
Docs are in subdir
joewallwork Mar 26, 2026
d82a5e7
Update patch file for test_suite
joewallwork Mar 26, 2026
41b0b4a
Need to install Sphinx before building docs
joewallwork Mar 26, 2026
5e9a3e1
Ignore @@ in patches
joewallwork Mar 26, 2026
8f6964f
Cut down README and add contributing section
joewallwork Mar 26, 2026
4c71545
Merge branch 'main' into 31_docs-sphinx
joewallwork Apr 15, 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
20 changes: 20 additions & 0 deletions .github/answers/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Answers to be passed to the docs build workflow during testing
_commit: a6fbcba
_src_path: .
build_docs_timeout: 15
build_sys_file_paths:
- 'copier.yml'
- 'docs/conf.py'
- 'docs/Makefile'
carbon_aware: false
deploy_docs: true
docs_file_paths:
- 'docs/*.rst'
joss_render_timeout: 5
joss_upload_timeout: 5
requirements_file_paths:
- requirements-dev.txt
source_file_paths:
- 'docs/*.rst'
static_analysis_timeout: 5
test_suite_timeout: 15
25 changes: 25 additions & 0 deletions .github/patches/build_docs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# The timeout minutes for the job to complete
timeout-minutes: 15
env:
- BUILD_DIR: docs/build/html
+ BUILD_DIR: "TODO replace this string with the path to the build directory"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Build documentation
- run: |
- pip install -r requirements-dev.txt
- cd docs
- make html
+ run: echo "TODO replace this echo call with your docs build commands"

- name: Upload Artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
steps:
- name: Deploy to GitHub Pages
id: deployment
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e #v4
+ uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e #v4
\ No newline at end of file
9 changes: 9 additions & 0 deletions .github/patches/test_suite.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
- fi
- rm tmp.patch
-
- - name: Test docs build template
- run: |
- copier copy --answers-file .github/answers/build_docs.yml --force --quiet . .
- git diff .github/workflows/build_docs.yml | tail -n +6 | grep -v '@@' > tmp.patch
- if ! diff tmp.patch .github/patches/build_docs.patch; then
- exit 1
- fi
- rm tmp.patch
-
- - name: Test test suite template
- run: |
- copier copy --answers-file .github/answers/test_suite.yml --force --quiet . .
Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Workflow to build and deploy docs for the project
name: Build docs

# Controls when the workflow will run
on:
# Triggers the workflow on pushes to the "main" branch, i.e., PR merges
push:
branches: [ "main" ]
paths:
- '.github/workflows/build_docs.yml'
- 'docs/*.rst'

# Triggers the workflow on pushes to open pull requests to main with documentation changes
pull_request:
paths:
- '.github/workflows/build_docs.yml'
- 'docs/*.rst'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Helps prevent parallel runs of the workflow from overlapping
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Write permissions are not needed for all jobs in this workflow
permissions: {}

# Workflow run - one or more jobs that can run sequentially or in parallel
jobs:
# Build the project documentation but do not deploy it
build:
name: test docs build
# The type of runner that the job will run on
runs-on: ubuntu-latest
# The timeout minutes for the job to complete
timeout-minutes: 15
env:
BUILD_DIR: docs/build/html

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checkout your repository under $GITHUB_WORKSPACE so your job can access it
- name: Checkout code
with:
persist-credentials: false
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Build documentation
run: |
pip install -r requirements-dev.txt
cd docs
make html

- name: Upload Artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
path: ${{ env.BUILD_DIR }}

# Build the project documentation and deploy it
deploy:
name: deploy to GitHub pages
# The type of runner that the job will run on
runs-on: ubuntu-latest
# The timeout minutes for the job to complete
timeout-minutes: 15
# This job depends on the one above
needs: build
# Only deploy the docs upon merging into main
if: ${{ github.ref == 'refs/heads/main' }}

# We trust the deploy action with write permissions
permissions:
pages: write # The deploy action is trusted to write to GitHub Pages
id-token: write # The deploy action is trusted to write to GitHub Pages

# Setup the environment for publishing the docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e #v4
9 changes: 9 additions & 0 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ jobs:
fi
rm tmp.patch

- name: Test docs build template
run: |
copier copy --answers-file .github/answers/build_docs.yml --force --quiet . .
git diff .github/workflows/build_docs.yml | tail -n +6 | grep -v '@@' > tmp.patch
if ! diff tmp.patch .github/patches/build_docs.patch; then
exit 1
fi
rm tmp.patch

- name: Test test suite template
run: |
copier copy --answers-file .github/answers/test_suite.yml --force --quiet . .
Expand Down
Loading
Loading