Skip to content

Commit 9102087

Browse files
authored
Initial 4.0 Transition and Pyglet 3 Upgrade (#2801)
1 parent 3f7e02d commit 9102087

File tree

112 files changed

+3736
-630
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+3736
-630
lines changed

.github/workflows/code_quality.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# This does code inspection and checks to make sure building of docs works
2+
3+
name: Code Quality
4+
5+
on:
6+
push:
7+
branches: [development, maintenance]
8+
pull_request:
9+
branches: [development, maintenance]
10+
workflow_dispatch:
11+
12+
jobs:
13+
14+
build:
15+
name: Code Inspections
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.14'
25+
26+
- name: Install UV
27+
uses: astral-sh/setup-uv@v7
28+
with:
29+
enable-cache: true
30+
31+
- name: Sync UV project
32+
run: uv sync
33+
34+
- name: Formatting (Ruff)
35+
if: success()
36+
continue-on-error: true
37+
run: uv run make.py format --check
38+
39+
- name: Linting (Ruff)
40+
if: success()
41+
continue-on-error: true
42+
run: uv run make.py ruff-check
43+
44+
- name: Type Checking (MyPy)
45+
if: success()
46+
continue-on-error: true
47+
run: uv run make.py mypy
48+
49+
- name: Type Checking (Pyright)
50+
if: success()
51+
continue-on-error: true
52+
run: uv run make.py pyright
53+
54+
verifytypes:
55+
name: Verify Types
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- uses: actions/checkout@v5
60+
61+
- name: Setup Python
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: '3.14'
65+
66+
- name: Install UV
67+
uses: astral-sh/setup-uv@v7
68+
with:
69+
enable-cache: true
70+
71+
- name: Sync UV project
72+
run: uv sync
73+
74+
- name: Pyright Type Completeness
75+
# Suppress exit code because we do not expect to reach 100% type completeness any time soon
76+
run: uv run pyright --verifytypes arcade || true
77+

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Builds the doc in PRs
2+
3+
name: Docs Build
4+
5+
on:
6+
push:
7+
branches: [development, maintenance]
8+
pull_request:
9+
branches: [development, maintenance]
10+
workflow_dispatch:
11+
12+
jobs:
13+
14+
build:
15+
name: Build Documentation
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.10'
25+
26+
- name: Install UV
27+
uses: astral-sh/setup-uv@v7
28+
with:
29+
enable-cache: true
30+
31+
- name: Sync UV Project
32+
run: uv sync
33+
34+
- name: build-docs
35+
run: uv run make.py docs-full

.github/workflows/selfhosted_runner.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 25 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# This does code inspection and checks to make sure building of docs works
2-
3-
name: GitHub based tests
1+
name: PyTest
42

53
on:
64
push:
@@ -11,117 +9,38 @@ on:
119

1210
jobs:
1311

14-
build:
15-
name: Code inspections
16-
runs-on: ${{ matrix.os }}
17-
12+
linux:
13+
runs-on: ubuntu-latest
1814
strategy:
1915
matrix:
20-
os: [ubuntu-latest]
21-
python-version: ['3.12']
22-
architecture: ['x64']
23-
16+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
17+
18+
name: Python ${{ matrix.python-version }}
2419
steps:
25-
- uses: actions/checkout@v4
26-
- name: setup
20+
- uses: actions/checkout@v5
21+
22+
# xvfb is used to run "headless" by providing a virtual X server
23+
# ffmpeg is used for handling mp3 files in some of our tests
24+
- name: Install xvfb and ffmpeg
25+
run: sudo apt-get install xvfb ffmpeg
26+
27+
- name: Setup Python
2728
uses: actions/setup-python@v5
2829
with:
2930
python-version: ${{ matrix.python-version }}
30-
architecture: ${{ matrix.architecture }}
3131

32-
- name: dependencies
33-
run: |
34-
python -m pip install -U pip wheel setuptools
35-
- name: wheel
36-
id: wheel
37-
run: |
38-
python -m pip install -e .[dev]
39-
- name: "code-inspection: formatting"
40-
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
41-
run: |
42-
python ./make.py format --check
43-
- name: "code-inspection: ruff-check"
44-
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
45-
run: |
46-
python ./make.py ruff-check
47-
- name: "code-inspection: mypy"
48-
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
49-
run: |
50-
python ./make.py mypy
51-
- name: "code-inspection: pyright"
52-
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
53-
run: |
54-
python ./make.py pyright
55-
# Prepare the Pull Request Payload artifact. If this fails,
56-
# we fail silently using the `continue-on-error` option. It's
57-
# nice if this succeeds, but if it fails for any reason, it
58-
# does not mean that our lint-test checks failed.
59-
- name: Prepare Pull Request Payload artifact
60-
id: prepare-artifact
61-
if: always() && github.event_name == 'pull_request'
62-
continue-on-error: true
63-
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
64-
65-
# This only makes sense if the previous step succeeded. To
66-
# get the original outcome of the previous step before the
67-
# `continue-on-error` conclusion is applied, we use the
68-
# `.outcome` value. This step also fails silently.
69-
- name: Upload a Build Artifact
70-
if: always() && steps.prepare-artifact.outcome == 'success'
71-
continue-on-error: true
72-
uses: actions/upload-artifact@v4
32+
- name: Install UV
33+
uses: astral-sh/setup-uv@v7
7334
with:
74-
name: pull-request-payload
75-
path: pull_request_payload.json
76-
77-
builddoc:
78-
79-
name: Documentation build test
80-
runs-on: ${{ matrix.os }}
35+
enable-cache: true
8136

82-
strategy:
83-
matrix:
84-
os: [ubuntu-latest]
85-
# python-version in must be kept in sync with .readthedocs.yaml
86-
python-version: ['3.10'] # July 2024 | Match our contributor dev version; see pyproject.toml
87-
architecture: ['x64']
37+
- name: Sync UV project
38+
run: uv sync
8839

89-
steps:
90-
- uses: actions/checkout@v4
91-
- name: setup
92-
uses: actions/setup-python@v5
93-
with:
94-
python-version: ${{ matrix.python-version }}
95-
architecture: ${{ matrix.architecture }}
96-
97-
- name: dependencies
98-
run: |
99-
python -m pip install -U pip wheel setuptools
100-
- name: wheel
101-
id: wheel
102-
run: |
103-
python -m pip install -e .[dev]
104-
- name: build-docs
40+
- name: Run tests
41+
env:
42+
PYGLET_BACKEND: opengl
43+
REPL_ID: hello # Arcade checks for this to disable anti-aliasing
10544
run: |
106-
sphinx-build doc build -W
107-
# Prepare the Pull Request Payload artifact. If this fails,
108-
# we fail silently using the `continue-on-error` option. It's
109-
# nice if this succeeds, but if it fails for any reason, it
110-
# does not mean that our lint-test checks failed.
111-
- name: Prepare Pull Request Payload artifact
112-
id: prepare-artifact
113-
if: always() && github.event_name == 'pull_request'
114-
continue-on-error: true
115-
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
116-
117-
# This only makes sense if the previous step succeeded. To
118-
# get the original outcome of the previous step before the
119-
# `continue-on-error` conclusion is applied, we use the
120-
# `.outcome` value. This step also fails silently.
121-
- name: Upload a Build Artifact
122-
if: always() && steps.prepare-artifact.outcome == 'success'
123-
continue-on-error: true
124-
uses: actions/upload-artifact@v4
125-
with:
126-
name: pull-request-payload
127-
path: pull_request_payload.json
45+
xvfb-run --auto-servernum uv run arcade
46+
xvfb-run --auto-servernum uv run pytest --maxfail=10

.github/workflows/verify_types.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,7 @@ temp/
6161

6262
# pending: Sphinx 8.1.4 + deps are verified as working with Arcade
6363
# see util/sphinx_static_file_temp_fix.py
64-
.ENABLE_DEVMACHINE_SPHINX_STATIC_FIX
64+
.ENABLE_DEVMACHINE_SPHINX_STATIC_FIX
65+
66+
webplayground/**/*.whl
67+
webplayground/**/*.zip

0 commit comments

Comments
 (0)