From f506fb69f873c43de5ca4fb91b8927d43324367e Mon Sep 17 00:00:00 2001 From: IanCa Date: Tue, 20 Feb 2024 18:46:27 -0600 Subject: [PATCH] Pin wordcloud, switch to python 3.8 minimum --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/test_installer.yaml | 2 +- pyproject.toml | 4 ++-- spec_tests/test_errors.py | 6 ++++++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 71b5c629..36773a7f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,10 +16,10 @@ jobs: run: | if [[ "${{ github.event_name }}" == 'push' && "${{ github.ref }}" == 'refs/heads/master' ]]; then # Push to master branch - echo 'matrix=["3.7", "3.9", "3.10", "3.11"]' >> $GITHUB_OUTPUT + echo 'matrix=["3.8", "3.9", "3.10", "3.11"]' >> $GITHUB_OUTPUT elif [[ "${{ github.event_name }}" == 'pull_request' && "${{ github.event.pull_request.base.ref }}" == 'master' ]]; then # PR to master branch - echo 'matrix=["3.7", "3.9", "3.10", "3.11"]' >> $GITHUB_OUTPUT + echo 'matrix=["3.8", "3.9", "3.10", "3.11"]' >> $GITHUB_OUTPUT else echo 'matrix=["3.9"]' >> $GITHUB_OUTPUT fi diff --git a/.github/workflows/test_installer.yaml b/.github/workflows/test_installer.yaml index ef71d32c..31526b7a 100644 --- a/.github/workflows/test_installer.yaml +++ b/.github/workflows/test_installer.yaml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - python-version: ["3.7", "3.10"] + python-version: ["3.8", "3.11"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index 7e73e635..37f40497 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ "Operating System :: OS Independent", ] -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ "defusedxml", @@ -42,7 +42,7 @@ dependencies = [ "rdflib", "semantic-version", "six", - "wordcloud" + "wordcloud==1.9.3" ] [project.urls] diff --git a/spec_tests/test_errors.py b/spec_tests/test_errors.py index b67a4451..c2a48a58 100644 --- a/spec_tests/test_errors.py +++ b/spec_tests/test_errors.py @@ -1,5 +1,7 @@ import os import unittest +import urllib.error + from hed.models import DefinitionDict from hed import load_schema_version, HedString @@ -166,6 +168,7 @@ def _run_single_schema_test(self, info, error_code, description,name, error_hand for result, tests in info.items(): for test in tests: schema_string = "\n".join(test) + issues = [] try: loaded_schema = from_string(schema_string, schema_format=".mediawiki") issues = loaded_schema.check_compliance() @@ -174,6 +177,9 @@ def _run_single_schema_test(self, info, error_code, description,name, error_hand if not issues: issues += [{"code": e.code, "message": e.message}] + except urllib.error.HTTPError: + issues += [{"code": "Http_error", + "message": "HTTP error in testing, probably due to rate limiting for local testing."}] self.report_result(result, issues, error_code, description, name, test, "schema_tests") def test_errors(self):