Skip to content

Commit c8763cf

Browse files
authored
Merge pull request #192 from IIIF/issue-191
Update iiif_3_0.json
2 parents 32852e8 + 50dcfc2 commit c8763cf

File tree

5 files changed

+42
-51
lines changed

5 files changed

+42
-51
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [ '3.9', '3.10', '3.11']
14+
python-version: [ '3.10', '3.11', '3.12', '3.13']
1515
name: Python ${{ matrix.python-version }} sample
1616
steps:
1717
- uses: actions/checkout@v4
@@ -26,37 +26,29 @@ jobs:
2626
path: ${{ env.pythonLocation }}
2727
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
2828

29-
- name: Install setup tools
30-
run: pip install setuptools
31-
32-
- name: Install
33-
run: python setup.py install
29+
- name: Install tox
30+
run: python -m pip install -U tox
3431

3532
- name: Test
36-
run: python setup.py test
37-
38-
- name: install coveralls
39-
run: pip install coveralls
40-
41-
42-
- name: Generate coverage
43-
run: coverage run --include=iiif-presentation-validator.py setup.py test
33+
run: tox
4434

45-
- name: Upload coverage data to coveralls.io
46-
run: coveralls --service=github
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
50-
COVERALLS_PARALLEL: true
51-
52-
Coveralls:
35+
- name: Upload coverage to Coveralls
36+
uses: coverallsapp/github-action@v2
37+
with:
38+
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
format: cobertura
40+
file: coverage.xml
41+
flag-name: ${{ matrix.python-version }}
42+
parallel: true
43+
44+
coveralls-finish:
5345
needs: build
5446
runs-on: ubuntu-latest
55-
container: python:3-slim
47+
if: ${{ always() }}
5648
steps:
57-
- name: Coveralls Finished
58-
run: |
59-
pip3 install --upgrade coveralls
60-
coveralls --service=github --finish
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
- name: Finish Coveralls parallel build
50+
uses: coverallsapp/github-action@v2
51+
with:
52+
github-token: ${{ secrets.GITHUB_TOKEN }}
53+
parallel-finished: true
54+

schema/iiif_3_0.json

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,14 @@
156156
"properties":{
157157
"type": {
158158
"type": "string",
159-
"const": "Choice"
159+
"const": "Choice",
160+
"default": "Choice"
160161
},
161162
"items":{
162-
"type": "array"
163+
"type": "array",
164+
"items": {
165+
"$ref": "#/classes/resource"
166+
}
163167
}
164168
},
165169
"required": ["type", "items"]
@@ -987,23 +991,12 @@
987991
},
988992
{
989993
"type": "object",
990-
"allOf":[
991-
{ "$ref": "#/classes/choice" },
992-
{
993-
"properties": {
994-
"items": {
995-
"type": "array",
996-
"items": {"$ref": "#/classes/resource"}
997-
}
998-
},
999-
"required": ["items"]
1000-
}
1001-
]
994+
"$ref": "#/classes/choice"
1002995
},
1003996
{
1004997
"type": "array",
1005998
"items": {
1006-
"type": "object"
999+
"$ref": "#/classes/resource"
10071000
}
10081001
}
10091002

setup.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ def run(self):
3333
"Intended Audience :: Developers",
3434
"Operating System :: OS Independent",
3535
"Programming Language :: Python",
36-
"Programming Language :: Python :: 3.9",
3736
"Programming Language :: Python :: 3.10",
3837
"Programming Language :: Python :: 3.11",
38+
"Programming Language :: Python :: 3.12",
39+
"Programming Language :: Python :: 3.13",
3940
"Topic :: Internet :: WWW/HTTP",
4041
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
4142
"Topic :: Software Development :: "
@@ -54,11 +55,6 @@ def run(self):
5455
extras_require={
5556
':python_version>="3.6"': ["Pillow>=3.2.0"]
5657
},
57-
test_suite="tests",
58-
tests_require=[
59-
"coverage",
60-
"mock",
61-
],
6258
cmdclass={
6359
'coverage': Coverage,
6460
},

tests/test_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Test code for iiif-presentation-validator.py."""
22
import unittest
3-
from mock import Mock
3+
from unittest.mock import Mock
44
try:
55
import imp
66
except ImportError:

tox.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[tox]
2+
envlist = py
3+
4+
[testenv]
5+
deps =
6+
coverage
7+
commands =
8+
coverage run -m unittest discover -s tests -p "test*.py"
9+
coverage xml
10+
coverage report -m

0 commit comments

Comments
 (0)