Skip to content

Commit 18ddf60

Browse files
author
James (ODSC)
authored
Merge pull request #32 from OpenDataServices/python311
Python & black
2 parents 7097c0c + ac439d9 commit 18ddf60

File tree

5 files changed

+30
-16
lines changed

5 files changed

+30
-16
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
python-version: [ '3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
9+
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11']
1010
steps:
1111
- uses: actions/checkout@v2
1212
- name: Setup python

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010

1111
- Process anyOf and allOf and well as oneOf https://github.com/OpenDataServices/compile-to-json-schema/issues/28
1212

13+
### Removed
14+
15+
- Removed Python 3.5 and 3.6 support, as they aren't supported any more
16+
1317
## [0.4.0] - 2021-07-30
1418

1519
### Added

setup.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import sys
2-
31
from setuptools import find_packages, setup
42

5-
extras_require_test = ["pytest", "flake8", "isort"]
6-
7-
if sys.version_info[0] >= 3 and sys.version_info[1] >= 6:
8-
extras_require_test.append("black==19.10b0")
3+
extras_require_test = ["pytest", "flake8", "isort", "black==22.10.0"]
94

105
setup(
116
name="compiletojsonschema",
@@ -17,15 +12,21 @@
1712
license="BSD",
1813
packages=find_packages(),
1914
long_description="Command-line tools and library for doing some non-standard things with JSON Schema",
20-
install_requires=["jsonref", "jsonschema",],
21-
extras_require={"test": extras_require_test,},
22-
python_requires=">=3.5",
15+
install_requires=[
16+
"jsonref",
17+
"jsonschema",
18+
],
19+
extras_require={
20+
"test": extras_require_test,
21+
},
22+
python_requires=">=3.7",
2323
classifiers=[
2424
"License :: OSI Approved :: BSD License",
25-
"Programming Language :: Python :: 3.5",
26-
"Programming Language :: Python :: 3.6",
2725
"Programming Language :: Python :: 3.7",
2826
"Programming Language :: Python :: 3.8",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
2930
],
3031
entry_points="""[console_scripts]
3132
compiletojsonschema = compiletojsonschema.cli.__main__:main""",

tests/test_codelist.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def test_basic():
3939
)
4040

4141
codelist_dir = os.path.join(
42-
os.path.dirname(os.path.realpath(__file__)), "fixtures", "codelists",
42+
os.path.dirname(os.path.realpath(__file__)),
43+
"fixtures",
44+
"codelists",
4345
)
4446

4547
ctjs = CompileToJsonSchema(
@@ -60,7 +62,9 @@ def test_open_codelist():
6062
)
6163

6264
codelist_dir = os.path.join(
63-
os.path.dirname(os.path.realpath(__file__)), "fixtures", "codelists",
65+
os.path.dirname(os.path.realpath(__file__)),
66+
"fixtures",
67+
"codelists",
6468
)
6569

6670
ctjs = CompileToJsonSchema(
@@ -81,7 +85,9 @@ def test_closed_codelist():
8185
)
8286

8387
codelist_dir = os.path.join(
84-
os.path.dirname(os.path.realpath(__file__)), "fixtures", "codelists",
88+
os.path.dirname(os.path.realpath(__file__)),
89+
"fixtures",
90+
"codelists",
8591
)
8692

8793
ctjs = CompileToJsonSchema(

tests/test_simple.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ def test_in_file_pass_as_schema():
3434
)
3535

3636
with open(input_filename) as fp:
37-
input_schema = json.load(fp, object_pairs_hook=OrderedDict,)
37+
input_schema = json.load(
38+
fp,
39+
object_pairs_hook=OrderedDict,
40+
)
3841

3942
ctjs = CompileToJsonSchema(input_schema=input_schema)
4043
out_string = ctjs.get_as_string()

0 commit comments

Comments
 (0)