Skip to content

Commit eb87ad3

Browse files
committed
Update to align zoo-runner-common with the latest runner architecture
The BaseRunner now provides a complete framework for runner implementations
1 parent aa3012d commit eb87ad3

23 files changed

Lines changed: 3699 additions & 140 deletions

.github/workflows/docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- feature/pythoupdates
8+
pull_request:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
build-and-deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.11'
26+
27+
- name: Install dependencies
28+
run: |
29+
pip install mkdocs-material mkdocstrings[python] pymdown-extensions
30+
31+
- name: Build documentation
32+
run: mkdocs build
33+
34+
- name: Deploy to GitHub Pages
35+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
36+
uses: peaceiris/actions-gh-pages@v3
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./site

.github/workflows/publish-pypi.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Version to publish (e.g., 1.0.0)'
10+
required: true
11+
type: string
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
# Strongly recommended: use a GitHub environment for additional security
17+
environment: pypi
18+
permissions:
19+
contents: write
20+
# IMPORTANT: this permission is mandatory for Trusted Publishing
21+
id-token: write
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.11'
33+
34+
- name: Install build tools
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install build toml
38+
39+
- name: Update version (if manual trigger)
40+
if: github.event_name == 'workflow_dispatch'
41+
run: |
42+
python << 'EOF'
43+
import toml
44+
with open('pyproject.toml', 'r') as f:
45+
data = toml.load(f)
46+
data['project']['version'] = '${{ inputs.version }}'
47+
with open('pyproject.toml', 'w') as f:
48+
toml.dump(data, f)
49+
EOF
50+
git config user.name "GitHub Actions"
51+
git config user.email "actions@github.com"
52+
git add pyproject.toml
53+
git commit -m "chore: bump version to ${{ inputs.version }}"
54+
git tag "v${{ inputs.version }}"
55+
git push origin main --tags
56+
57+
- name: Build package
58+
run: python -m build
59+
60+
- name: Publish to PyPI (Trusted Publishing)
61+
uses: pypa/gh-action-pypi-publish@release/v1
62+
63+
- name: Create GitHub Release (if manual)
64+
if: github.event_name == 'workflow_dispatch'
65+
uses: softprops/action-gh-release@v1
66+
with:
67+
tag_name: v${{ inputs.version }}
68+
name: Release v${{ inputs.version }}
69+
draft: false
70+
prerelease: false
71+
generate_release_notes: true

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
8+
# Virtual environments
9+
.venv/
10+
venv/
11+
ENV/
12+
env/
13+
14+
# Distribution / packaging
15+
.Python
16+
build/
17+
develop-eggs/
18+
dist/
19+
downloads/
20+
eggs/
21+
.eggs/
22+
lib/
23+
lib64/
24+
parts/
25+
sdist/
26+
var/
27+
wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
32+
# IDEs
33+
.vscode/
34+
.idea/
35+
*.swp
36+
*.swo
37+
*~
38+
39+
# Linting/Testing
40+
.ruff_cache/
41+
.pytest_cache/
42+
.coverage
43+
htmlcov/
44+
45+
# Documentation (only generated site, keep docs/ source)
46+
site/

0 commit comments

Comments
 (0)