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
e8dcff5
Update libraries
pvcraven Aug 19, 2023
b2e6b8f
Drop Python 3.8 support
pvcraven Aug 19, 2023
c216355
Try running 3.11 and 3.10 on self-hosted runner
pvcraven Aug 19, 2023
913df2c
Have self-hosted run on different python versions, and just build doc…
pvcraven Aug 19, 2023
0908cb6
Just install dependencies when testing
pvcraven Aug 19, 2023
3629802
Try with typer
pvcraven Aug 19, 2023
18452f7
Revert
pvcraven Aug 19, 2023
ec1f493
Remove build docs test
pvcraven Aug 19, 2023
f63efb8
Update
pvcraven Aug 19, 2023
423edce
Update
pvcraven Aug 19, 2023
19aadde
Update
pvcraven Aug 19, 2023
9b31a03
Update
pvcraven Aug 19, 2023
36c1097
Update
pvcraven Aug 19, 2023
4c8c143
Update
pvcraven Aug 19, 2023
c1da7cb
Update
pvcraven Aug 19, 2023
1b75ba5
Update
pvcraven Aug 19, 2023
10b7a85
Update
pvcraven Aug 19, 2023
ddca3a1
Update
pvcraven Aug 20, 2023
db71598
Update
pvcraven Aug 20, 2023
a7b98b7
Update
pvcraven Aug 20, 2023
e101ddb
Update
pvcraven Aug 20, 2023
bffadac
Update
pvcraven Aug 20, 2023
96f1144
Update
pvcraven Aug 20, 2023
0f3a7fd
Update
pvcraven Aug 20, 2023
571253d
Update
pvcraven Aug 20, 2023
135d881
Update
pvcraven Aug 20, 2023
969515c
Update
pvcraven Aug 20, 2023
d180c86
Update
pvcraven Aug 20, 2023
2bcb3a1
Update
pvcraven Aug 20, 2023
dda15ce
Remove Python 3.8 incompatible typing
pvcraven Aug 20, 2023
fdc3abf
Update
pvcraven Aug 20, 2023
6c282b9
Update
pvcraven Aug 20, 2023
77f3a30
Update
pvcraven Aug 20, 2023
930002f
Update
pvcraven Aug 20, 2023
8333b12
Update
pvcraven Aug 20, 2023
e22403d
Update
pvcraven Aug 20, 2023
413249d
Update
pvcraven Aug 20, 2023
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
29 changes: 14 additions & 15 deletions .github/workflows/selfhosted_runner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Windows self-hosted test
# This is our full unit tests
# Self-hosted, run on an old notebook
name: Unit testing

on:
push:
Expand All @@ -10,35 +12,32 @@ on:
jobs:

build:
name: Self Hosted Testing
name: Unit tests
runs-on: self-hosted

strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9.13', '3.10', '3.11']
architecture: ['x64']

steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}

- name: Install dependencies part 1
run: |
rm -rf .venv
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip wheel setuptools
python -m pip install pyogg pymunk
- name: Install dependencies part 2
run: |
source .venv/bin/activate
python -m pip install -I -e .[dev]
- name: code-inspection
run: |
source .venv/bin/activate
mypy arcade
ruff arcade
- name: build-docs
run: |
source .venv/bin/activate
sphinx-build doc build -W
python -m pip install -I -e .[testing_libraries]
- name: Test with pytest
run: |
source .venv/bin/activate
Expand All @@ -64,7 +63,7 @@ jobs:
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pull-request-payload
path: pull_request_payload.json
59 changes: 54 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: GitHub Ubuntu test
# This does code inspection and checks to make sure building of docs works

name: GitHub based tests

on:
push:
Expand All @@ -10,13 +12,13 @@ on:
jobs:

build:
name: test
name: Code inspections
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.11']
architecture: ['x64']

steps:
Expand Down Expand Up @@ -46,10 +48,57 @@ jobs:
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
python ./make.py ruff
# Prepare the Pull Request Payload artifact. If this fails,
# we fail silently using the `continue-on-error` option. It's
# nice if this succeeds, but if it fails for any reason, it
# does not mean that our lint-test checks failed.
- name: Prepare Pull Request Payload artifact
id: prepare-artifact
if: always() && github.event_name == 'pull_request'
continue-on-error: true
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json

# This only makes sense if the previous step succeeded. To
# get the original outcome of the previous step before the
# `continue-on-error` conclusion is applied, we use the
# `.outcome` value. This step also fails silently.
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: pull-request-payload
path: pull_request_payload.json

builddoc:
name: Documentation build test
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
architecture: ['x64']

steps:
- uses: actions/checkout@v3
- name: setup
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}

- name: dependencies
run: |
python -m pip install -U pip wheel setuptools
- name: wheel
id: wheel
run: |
python -m pip install -e .[dev]
- name: build-docs
run: |
sphinx-build doc build -W
# Prepare the Pull Request Payload artifact. If this fails, we
# Prepare the Pull Request Payload artifact. If this fails,
# we fail silently using the `continue-on-error` option. It's
# nice if this succeeds, but if it fails for any reason, it
# does not mean that our lint-test checks failed.
Expand All @@ -66,7 +115,7 @@ jobs:
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pull-request-payload
path: pull_request_payload.json
2 changes: 1 addition & 1 deletion .github/workflows/verify_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:

verifytypes:
name: verifytypes
name: Verify types
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 3 additions & 1 deletion doc/tutorials/menu/menu_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

Shows the usage of almost every gui widget, switching views and making a modal.
"""
from typing import List

import arcade
import arcade.gui

Expand Down Expand Up @@ -155,7 +157,7 @@ def on_draw(self):
class SubMenu(arcade.gui.UIMouseFilterMixin, arcade.gui.UIAnchorLayout):
"""Acts like a fake view/window."""

def __init__(self, title: str, input_text: str, toggle_label: str, dropdown_options: list[str], slider_label: str):
def __init__(self, title: str, input_text: str, toggle_label: str, dropdown_options: List[str], slider_label: str):
super().__init__(size_hint=(1, 1))

# Setup frame which will act like the window.
Expand Down
24 changes: 16 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ classifiers = [
]
dependencies = [
"pyglet>=2.0.8,<2.1",
"pillow~=9.5.0",
"pymunk~=6.5.0",
"pillow~=10.0.0",
"pymunk~=6.5.1",
"pytiled-parser~=2.2.3"
]
dynamic = ["version"]
Expand All @@ -37,6 +37,7 @@ Source = "https://github.com/pythonarcade/arcade"
Book = "https://learn.arcade.academy"

[project.optional-dependencies]
# Used for dev work
dev = [
"pytest",
"mypy",
Expand All @@ -45,19 +46,26 @@ dev = [
"coveralls",
"pytest-mock",
"pytest-cov",
"pygments==2.15.1",
"docutils==0.19",
"pygments==2.16.1",
"docutils==0.20.1",
"furo",
"pyright==1.1.322",
"pyyaml==6.0",
"sphinx==7.1.2",
"pyyaml==6.0.1",
"sphinx==7.2.2",
"sphinx-autobuild==2021.3.14",
"sphinx-copybutton==0.5.2",
# Intentionally kept at 2.3 until this bugfix is published: https://github.com/jdillard/sphinx-sitemap/pull/62
"sphinx-sitemap==2.3.0",
"sphinx-sitemap==2.5.1",
"typer[all]==0.7.0",
"wheel",
]
# Testing only
testing_libraries = [
"pytest",
"pytest-mock",
"pytest-cov",
"pyyaml==6.0.1",
"typer[all]==0.7.0",
]

[project.scripts]
arcade = "arcade.management:execute_from_command_line"
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/resources/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def test_resource_listing_is_complete():
continue
if path.suffix in skip_extensions:
continue
if any(path.is_relative_to(skip_path) for skip_path in skip_paths):
if any(str(path).startswith(str(skip_path)) for skip_path in skip_paths):
# if any(path.is_relative_to(skip_path) for skip_path in skip_paths): # Python 3.9+
continue
paths_in_resources.add(path)

Expand Down
3 changes: 2 additions & 1 deletion util/make_resources_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def get_prefix(path: Path) -> str:
def is_path_ignored(path: Path) -> bool:
"""Return True if the path should be ignored."""
for ignore_path in IGNORE_PATHS:
if path.is_relative_to(ignore_path):
# if path.is_relative_to(ignore_path): # Python 3.9+
if str(path).startswith(str(ignore_path)):
return True
return False

Expand Down