From ca8179dbbec85d68d53076166288b5b50dd6501d Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 14 Nov 2023 16:07:45 +0000 Subject: [PATCH 01/15] REF: Move children schema to Strands --- setup.py | 2 +- twined/schema/children_schema.json | 39 ------------------------------ twined/twine.py | 14 ++++++++--- 3 files changed, 11 insertions(+), 44 deletions(-) delete mode 100644 twined/schema/children_schema.json diff --git a/setup.py b/setup.py index a7e9c39..c80a37e 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name="twined", - version="0.5.3", + version="0.5.4", py_modules=[], install_requires=["jsonschema ~= 4.4.0", "python-dotenv"], url="https://www.github.com/octue/twined", diff --git a/twined/schema/children_schema.json b/twined/schema/children_schema.json deleted file mode 100644 index 1da053d..0000000 --- a/twined/schema/children_schema.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A textual key identifying a group of child twins", - "type": "string" - }, - "id": { - "description": "The universally unique ID (UUID) of the running child twin", - "type": "string" - }, - "backend": { - "description": "The backend running the child.", - "type": "object", - "oneOf": [ - { - "type": "object", - "title": "GCP Pub/Sub", - "properties": { - "name": { - "description": "Type of backend (in this case, it can only be GCPPubSubBackend)", - "type": "string", - "pattern": "^(GCPPubSubBackend)$" - }, - "project_name": { - "description": "Name of the Google Cloud Platform (GCP) project the child exists in.", - "type": "string" - } - }, - "required": ["name", "project_name"] - } - ] - } - }, - "required": ["key", "id", "backend"] - } -} diff --git a/twined/twine.py b/twined/twine.py index ae0236c..76ac235 100644 --- a/twined/twine.py +++ b/twined/twine.py @@ -32,6 +32,9 @@ ) +CHILDREN_SCHEMA = "https://jsonschema.registry.octue.com/octue/children/0.1.0.json" + + class Twine: """Twine class manages validation of inputs and outputs to/from a data service, based on spec in a 'twine' file. @@ -92,19 +95,19 @@ def _get_schema(self, strand): if strand == "twine": # The data is a twine. A twine *contains* schema, but we also need to verify that it matches a certain # schema itself. The twine schema is distributed with this packaged to ensure version consistency... - schema_path = "schema/twine_schema.json" + schema = "schema/twine_schema.json" elif strand in CHILDREN_STRANDS: # The data is a list of children. The "children" strand of the twine describes matching criteria for # the children, not the schema of the "children" data, which is distributed with this package to ensure # version consistency... - schema_path = "schema/children_schema.json" + schema = {"$ref": CHILDREN_SCHEMA} elif strand in MANIFEST_STRANDS: # The data is a manifest of files. The "*_manifest" strands of the twine describe matching criteria used to # filter files appropriate for consumption by the digital twin, not the schema of the manifest data, which # is distributed with this package to ensure version consistency... - schema_path = "schema/manifest_schema.json" + schema = "schema/manifest_schema.json" else: if strand not in SCHEMA_STRANDS: @@ -118,7 +121,10 @@ def _get_schema(self, strand): except AttributeError: raise exceptions.StrandNotFound(f"Cannot validate - no {schema_key} strand in the twine") - return jsonlib.loads(pkg_resources.resource_string("twined", schema_path)) + if isinstance(schema, dict): + return schema + + return jsonlib.loads(pkg_resources.resource_string("twined", schema)) def _validate_against_schema(self, strand, data): """Validate data against a schema, raises exceptions of type InvalidJson if not compliant. From fac2916344381bcbb4a3719b29c67db2a2017265 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 14 Nov 2023 16:08:14 +0000 Subject: [PATCH 02/15] TST: Adjust children schema tests --- tests/test_children.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/test_children.py b/tests/test_children.py index 0631dbb..8dde688 100644 --- a/tests/test_children.py +++ b/tests/test_children.py @@ -5,24 +5,22 @@ class TestChildrenTwine(BaseTestCase): - """Tests related to the twine itself - ensuring that valid and invalid - `children` entries in a twine file work as expected - """ + """Tests ensuring that valid and invalid `children` entries in a twine file work as expected.""" def test_invalid_children_dict_not_array(self): - """Ensures InvalidTwine exceptions are raised when instantiating twines where `children` entry is incorrectly - specified as a dict, not an array + """Ensure that `InvalidTwine` exceptions are raised when instantiating twines where `children` entry is + incorrectly specified as a dict, not an array. """ with self.assertRaises(exceptions.InvalidTwine): Twine(source="""{"children": {}}""") def test_invalid_children_no_key(self): - """Ensures InvalidTwine exceptions are raised when instantiating twines where a child - is specified without the required `key` field + """Ensure that `InvalidTwine` exceptions are raised when instantiating twines where a child is specified without + the required `key` field. """ source = """ { - "children": [{"purpose": "The purpose.", "notes": "Here are some notes.", "filters": "tags:gis"}] + "children": [{"purpose": "The purpose.", "notes": "Here are some notes."}] } """ @@ -33,7 +31,7 @@ def test_valid_children(self): """Ensures that a twine with one child can be instantiated correctly.""" source = """ { - "children": [{"key": "gis", "purpose": "The purpose.", "notes": "Some notes.", "filters": "tags:gis"}] + "children": [{"key": "gis", "purpose": "The purpose.", "notes": "Some notes."}] } """ self.assertEqual(len(Twine(source=source).children), 1) @@ -49,7 +47,7 @@ class TestChildrenValidation(BaseTestCase): VALID_TWINE_WITH_CHILDREN = """ { - "children": [{"key": "gis", "purpose": "The purpose", "notes": "Some notes.", "filters": "tags:gis"}] + "children": [{"key": "gis", "purpose": "The purpose", "notes": "Some notes."}] } """ From 404cf7706797b92fb6fd0eb4c41dd02a2b37c5fe Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 14 Nov 2023 16:28:13 +0000 Subject: [PATCH 03/15] OPS: Add readthedocs config file --- .readthedocs.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..30685b1 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,12 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.9" + +sphinx: + configuration: docs/source/conf.py From 54a59da8865670738258cae560c969e0cfd5136e Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 14 Nov 2023 16:33:43 +0000 Subject: [PATCH 04/15] OPS: Add dependencies to readthedocs config file --- .readthedocs.yaml | 6 +++++- docs/requirements.txt | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 30685b1..71a0bcb 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,7 +6,11 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.9" + python: "3.10" sphinx: configuration: docs/source/conf.py + +python: + install: + - requirements: docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt index 075a2e5..b205ef1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,3 @@ - # Required by the python script for building documentation Sphinx>=2,<3 sphinx-rtd-theme==0.5.0 From 793f865b4db6b0f71a27e1ac63a62360a37bb52a Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 14 Nov 2023 16:47:03 +0000 Subject: [PATCH 05/15] DOC: Fix documentation requirements --- .pre-commit-config.yaml | 13 ++++++------- docs/requirements.txt | 11 +++++------ docs/source/_ext/sphinx_accordion/accordion.py | 2 -- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d348530..6957616 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,17 +41,16 @@ repos: - id: pydocstyle - repo: https://github.com/thclark/pre-commit-sphinx - rev: 0.0.1 + rev: 0.0.3 hooks: - id: build-docs language_version: python3 additional_dependencies: - - 'Sphinx>=2,<3' - - 'sphinx-rtd-theme==0.5.0' - - 'sphinx-tabs==1.2.1' - - 'sphinx-charts==0.0.4' - - 'scipy~=1.5.2' - - 'jsonschema~=3.2.0' + - 'Sphinx' + - 'sphinx-rtd-theme' + - 'sphinx-tabs' + - 'sphinx-charts' + - 'jsonschema' - repo: https://github.com/windpioneers/pre-commit-hooks rev: 0.0.5 diff --git a/docs/requirements.txt b/docs/requirements.txt index b205ef1..6b1cd11 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,6 @@ # Required by the python script for building documentation -Sphinx>=2,<3 -sphinx-rtd-theme==0.5.0 -sphinx-tabs==1.2.1 -sphinx-charts==0.0.4 -scipy~=1.5.2 -jsonschema~=3.2.0 +Sphinx +sphinx-rtd-theme +sphinx-tabs +sphinx-charts +jsonschema diff --git a/docs/source/_ext/sphinx_accordion/accordion.py b/docs/source/_ext/sphinx_accordion/accordion.py index cada02d..6c81677 100644 --- a/docs/source/_ext/sphinx_accordion/accordion.py +++ b/docs/source/_ext/sphinx_accordion/accordion.py @@ -245,8 +245,6 @@ def setup(app): if path.endswith('.js'): if 'add_script_file' in dir(app): app.add_script_file(path) - else: - app.add_javascript(path) app.connect('html-page-context', update_context) app.connect('build-finished', copy_assets) From eec951cbf654e56b2f8008502664c87b0a9374c8 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 14 Nov 2023 16:52:50 +0000 Subject: [PATCH 06/15] DOC: Fix accordion usage in docs --- docs/source/_ext/sphinx_accordion/accordion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/_ext/sphinx_accordion/accordion.py b/docs/source/_ext/sphinx_accordion/accordion.py index 6c81677..71d934c 100644 --- a/docs/source/_ext/sphinx_accordion/accordion.py +++ b/docs/source/_ext/sphinx_accordion/accordion.py @@ -245,6 +245,8 @@ def setup(app): if path.endswith('.js'): if 'add_script_file' in dir(app): app.add_script_file(path) + else: + app.add_js_file(path) app.connect('html-page-context', update_context) app.connect('build-finished', copy_assets) From 0102ad7a27f2838be7bbf53a6d043624b5e7fcda Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 14 Nov 2023 17:24:23 +0000 Subject: [PATCH 07/15] REF: Move manifest schema to Strands --- twined/schema/manifest_schema.json | 109 ----------------------------- twined/twine.py | 3 +- 2 files changed, 2 insertions(+), 110 deletions(-) delete mode 100644 twined/schema/manifest_schema.json diff --git a/twined/schema/manifest_schema.json b/twined/schema/manifest_schema.json deleted file mode 100644 index abb9870..0000000 --- a/twined/schema/manifest_schema.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "$defs": { - "tags": { - "description": "Key-value tags associated with the object.", - "type": "object" - }, - "labels": { - "description": "Textual labels associated with the object", - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object", - "properties": { - "id": { - "description": "ID of the manifest, typically a uuid", - "type": "string" - }, - "datasets": { - "type": "object", - "patternProperties": { - ".+": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "id": { - "description": "ID of the dataset, typically a uuid", - "type": "string" - }, - "name": { - "description": "Name of the dataset (the same as its key in the 'datasets' field).", - "type": "string" - }, - "tags": { - "$ref": "#/$defs/tags" - }, - "labels": { - "$ref": "#/$defs/labels" - }, - "files": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "description": "A file id", - "type": "string" - }, - "path": { - "description": "Path at which the file can be found", - "type": "string" - }, - "timestamp": { - "oneOf": [ - { - "description": "A posix based timestamp associated with the file. This may, but need not be, the created or modified time. ", - "type": "number" - }, - { - "description": "A posix based timestamp associated with the file. This may, but need not be, the created or modified time. ", - "type": "null" - } - ] - }, - "tags": { - "$ref": "#/$defs/tags" - }, - "labels": { - "$ref": "#/$defs/labels" - } - }, - "required": [ - "id", - "path", - "timestamp", - "tags", - "labels" - ] - }, - { - "type": "string" - } - ] - } - } - }, - "required": [ - "id", - "name", - "tags", - "labels", - "files" - ] - } - ] - } - } - } - }, - "required": ["id", "datasets"] -} diff --git a/twined/twine.py b/twined/twine.py index 76ac235..3ba9c87 100644 --- a/twined/twine.py +++ b/twined/twine.py @@ -33,6 +33,7 @@ CHILDREN_SCHEMA = "https://jsonschema.registry.octue.com/octue/children/0.1.0.json" +MANIFEST_SCHEMA = "https://jsonschema.registry.octue.com/octue/manifest/0.1.0.json" class Twine: @@ -107,7 +108,7 @@ def _get_schema(self, strand): # The data is a manifest of files. The "*_manifest" strands of the twine describe matching criteria used to # filter files appropriate for consumption by the digital twin, not the schema of the manifest data, which # is distributed with this package to ensure version consistency... - schema = "schema/manifest_schema.json" + schema = {"$ref": MANIFEST_SCHEMA} else: if strand not in SCHEMA_STRANDS: From 17bca39dd45f93d8d31220850f1b395127f549df Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 25 Apr 2024 16:32:16 +0100 Subject: [PATCH 08/15] DEP: Swap deprecated `pkg_resources` for `importlib` --- twined/twine.py | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/twined/twine.py b/twined/twine.py index 3ba9c87..e931cb8 100644 --- a/twined/twine.py +++ b/twined/twine.py @@ -1,7 +1,8 @@ +import importlib.metadata import json as jsonlib import logging import os -import pkg_resources +import importlib_resources from dotenv import load_dotenv from jsonschema import ValidationError, validate as jsonschema_validate @@ -96,36 +97,32 @@ def _get_schema(self, strand): if strand == "twine": # The data is a twine. A twine *contains* schema, but we also need to verify that it matches a certain # schema itself. The twine schema is distributed with this packaged to ensure version consistency... - schema = "schema/twine_schema.json" + return jsonlib.loads( + importlib_resources.files("twined.schema").joinpath("twine_schema.json").read_text(encoding="utf-8") + ) - elif strand in CHILDREN_STRANDS: + if strand in CHILDREN_STRANDS: # The data is a list of children. The "children" strand of the twine describes matching criteria for # the children, not the schema of the "children" data, which is distributed with this package to ensure # version consistency... - schema = {"$ref": CHILDREN_SCHEMA} + return {"$ref": CHILDREN_SCHEMA} - elif strand in MANIFEST_STRANDS: + if strand in MANIFEST_STRANDS: # The data is a manifest of files. The "*_manifest" strands of the twine describe matching criteria used to # filter files appropriate for consumption by the digital twin, not the schema of the manifest data, which # is distributed with this package to ensure version consistency... - schema = {"$ref": MANIFEST_SCHEMA} - - else: - if strand not in SCHEMA_STRANDS: - raise exceptions.UnknownStrand(f"Unknown strand {strand}. Try one of {ALL_STRANDS}.") + return {"$ref": MANIFEST_SCHEMA} - # Get schema from twine.json file. - schema_key = strand + "_schema" + if strand not in SCHEMA_STRANDS: + raise exceptions.UnknownStrand(f"Unknown strand {strand}. Try one of {ALL_STRANDS}.") - try: - return getattr(self, schema_key) - except AttributeError: - raise exceptions.StrandNotFound(f"Cannot validate - no {schema_key} strand in the twine") + # Get schema from twine.json file. + schema_key = strand + "_schema" - if isinstance(schema, dict): - return schema - - return jsonlib.loads(pkg_resources.resource_string("twined", schema)) + try: + return getattr(self, schema_key) + except AttributeError: + raise exceptions.StrandNotFound(f"Cannot validate - no {schema_key} strand in the twine") def _validate_against_schema(self, strand, data): """Validate data against a schema, raises exceptions of type InvalidJson if not compliant. @@ -150,7 +147,7 @@ def _validate_against_schema(self, strand, data): def _validate_twine_version(self, twine_file_twined_version): """Validate that the installed version is consistent with an optional version specification in the twine file.""" - installed_twined_version = pkg_resources.get_distribution("twined").version + installed_twined_version = importlib.metadata.version("twined") logger.debug( "Twine versions... %s installed, %s specified in twine", installed_twined_version, twine_file_twined_version ) From 4128b9ff08f0ba395ad589848090eae970a18cab Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 25 Apr 2024 16:42:40 +0100 Subject: [PATCH 09/15] FIX: Fix importing `importlib.resources` for `python>=3.9` --- twined/schema/__init__.py | 0 twined/twine.py | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 twined/schema/__init__.py diff --git a/twined/schema/__init__.py b/twined/schema/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/twined/twine.py b/twined/twine.py index e931cb8..f312653 100644 --- a/twined/twine.py +++ b/twined/twine.py @@ -2,10 +2,17 @@ import json as jsonlib import logging import os -import importlib_resources from dotenv import load_dotenv from jsonschema import ValidationError, validate as jsonschema_validate + +try: + # python >= 3.9 + import importlib.resources as importlib_resources +except ModuleNotFoundError: + # python < 3.9 + import importlib_resources + from . import exceptions from .utils import load_json, trim_suffix From 21b53501f4b798506a3a306101d5a662af2fd511 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 25 Apr 2024 16:44:32 +0100 Subject: [PATCH 10/15] FIX: Favour `importlib_resources` import --- twined/twine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/twined/twine.py b/twined/twine.py index f312653..b703b4e 100644 --- a/twined/twine.py +++ b/twined/twine.py @@ -7,11 +7,11 @@ try: - # python >= 3.9 - import importlib.resources as importlib_resources -except ModuleNotFoundError: # python < 3.9 import importlib_resources +except ModuleNotFoundError: + # python >= 3.9 + import importlib.resources as importlib_resources from . import exceptions from .utils import load_json, trim_suffix From 1209a9a43fac7f1d9357f119241515f38164c337 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 25 Apr 2024 16:46:30 +0100 Subject: [PATCH 11/15] OPS: Fix codecov upload --- .github/workflows/python-ci.yml | 3 ++- .github/workflows/release.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 1148883..31c2097 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -45,10 +45,11 @@ jobs: run: tox - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: coverage.xml fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} publish: if: "!contains(github.event.head_commit.message, 'skipci')" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59c262a..b680c39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,10 +32,11 @@ jobs: run: tox - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: coverage.xml fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} release: needs: run-tests From 27542782299df9b2d220761ba4facf594933c2ce Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 25 Apr 2024 16:47:58 +0100 Subject: [PATCH 12/15] OPS: Use reusable workflows --- .github/workflows/python-ci.yml | 13 +++------ .github/workflows/update-pull-request.yml | 32 +++++++---------------- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 31c2097..145e36d 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -11,15 +11,10 @@ on: jobs: check-semantic-version: if: "!contains(github.event.head_commit.message, 'skipci')" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: octue/check-semantic-version@1.0.0.beta-9 - with: - path: setup.py - breaking_change_indicated_by: minor + uses: octue/workflows/.github/workflows/check-semantic-version.yml@main + with: + path: setup.py + breaking_change_indicated_by: minor run-tests: if: "!contains(github.event.head_commit.message, 'skipci')" diff --git a/.github/workflows/update-pull-request.yml b/.github/workflows/update-pull-request.yml index 1efc58f..d77ca38 100644 --- a/.github/workflows/update-pull-request.yml +++ b/.github/workflows/update-pull-request.yml @@ -1,30 +1,18 @@ # This workflow updates the pull request description with an auto-generated section containing the categorised commit -# message headers of the commits since the last pull request merged into main. The auto generated section is enveloped -# between two comments: "" and "". Anything -# outside these in the description is left untouched. Auto-generated updates can be skipped for a commit if +# message headers of the pull request's commits. The auto generated section is enveloped between two comments: +# "" and "". Anything outside these in the +# description is left untouched. Auto-generated updates can be skipped for a commit if # "" is added to the pull request description. name: update-pull-request -# Only trigger for pull requests into main branch. -on: - pull_request: - branches: - - main +on: [pull_request] jobs: description: - if: "!contains(github.event.pull_request.body, '')" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: octue/generate-pull-request-description@1.0.0.beta-2 - id: pr-description - with: - pull_request_url: ${{ github.event.pull_request.url }} - api_token: ${{ secrets.GITHUB_TOKEN }} - - name: Update pull request body - uses: riskledger/update-pr-description@v2 - with: - body: ${{ steps.pr-description.outputs.pull_request_description }} - token: ${{ secrets.GITHUB_TOKEN }} + uses: octue/workflows/.github/workflows/generate-pull-request-description.yml@main + secrets: + token: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: read + pull-requests: write From 25a237c718262f36fc947ecdd67c3885f6664ce2 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 25 Apr 2024 16:48:32 +0100 Subject: [PATCH 13/15] OPS: Test with `python3.9` too --- .github/workflows/python-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 145e36d..ee6840b 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -20,10 +20,10 @@ jobs: if: "!contains(github.event.head_commit.message, 'skipci')" runs-on: ubuntu-latest env: - USING_COVERAGE: '3.8' + USING_COVERAGE: '3.9' strategy: matrix: - python: [3.8] + python: [3.8, 3.9] steps: - name: Checkout Repository uses: actions/checkout@v3 From f38c4aa3e231244f1108206d7fc8fab24c531e35 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 25 Apr 2024 16:49:22 +0100 Subject: [PATCH 14/15] OPS: Use latest `setup-python` action --- .github/workflows/python-ci.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index ee6840b..0de6ee0 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -29,7 +29,7 @@ jobs: uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} @@ -58,7 +58,7 @@ jobs: uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b680c39..9f26cb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} @@ -69,7 +69,7 @@ jobs: uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 From 78a71c66360267ddc2f8633301f08e0c12462ff0 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 25 Apr 2024 16:51:26 +0100 Subject: [PATCH 15/15] OPS: Fix testing config --- .github/workflows/python-ci.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- setup.py | 1 + tox.ini | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 0de6ee0..c7ca99a 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -23,7 +23,7 @@ jobs: USING_COVERAGE: '3.9' strategy: matrix: - python: [3.8, 3.9] + python: ['3.8', '3.9'] steps: - name: Checkout Repository uses: actions/checkout@v3 @@ -60,7 +60,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.9" - name: Make package run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f26cb3..667b70f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,10 @@ jobs: if: "github.event.pull_request.merged == true" runs-on: ubuntu-latest env: - USING_COVERAGE: '3.8' + USING_COVERAGE: '3.9' strategy: matrix: - python: [ 3.8 ] + python: ['3.8', '3.9'] steps: - name: Checkout Repository uses: actions/checkout@v3 diff --git a/setup.py b/setup.py index c80a37e..f5fd9d7 100644 --- a/setup.py +++ b/setup.py @@ -33,6 +33,7 @@ "Topic :: Software Development :: Libraries :: Python Modules", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Operating System :: OS Independent", ], python_requires=">=3.6", diff --git a/tox.ini b/tox.ini index 57f36f6..1a36ae9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py38} +envlist = {py38,py39} [testenv] setenv =