From 44658ff17c621aa06f9d4e11ee2649c70a7ba472 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Thu, 1 Aug 2024 16:07:57 +0200 Subject: [PATCH 1/3] CI: Fix workflow to be kept alive after 60 days --- .github/workflows/weekly.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 86e8f20..986292b 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -42,3 +42,11 @@ jobs: else python -m pytest -v -s -l fi + keepalive-job: + name: Keepalive Workflow + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - uses: actions/checkout@v4 + - uses: gautamkrishnar/keepalive-workflow@v2 From ebf29af031b2599fc2f33c3601569dc0c9e09b42 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Thu, 1 Aug 2024 16:46:45 +0200 Subject: [PATCH 2/3] Bump version to 2.0.10 --- qface/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qface/__about__.py b/qface/__about__.py index aa6883c..7b1d16a 100644 --- a/qface/__about__.py +++ b/qface/__about__.py @@ -9,7 +9,7 @@ __title__ = "qface" __summary__ = "A generator framework based on a common modern IDL" __url__ = "https://pelagicore.github.io/qface/" -__version__ = "2.0.9" +__version__ = "2.0.10" __author__ = "JRyannel" __author_email__ = "" __copyright__ = "2019 Pelagicore" From 800579a430b619d98342e380c309228f1b0d2577 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Thu, 1 Aug 2024 16:47:00 +0200 Subject: [PATCH 3/3] Fix utils to work with pathlib Also added an autotest for it --- qface/utils.py | 2 +- tests/test_generator.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qface/utils.py b/qface/utils.py index d784bff..16520b8 100644 --- a/qface/utils.py +++ b/qface/utils.py @@ -19,6 +19,6 @@ def load_filters(path): ctx = { 'filters': {} } - exec(path.text(), ctx) + exec(path.read_text(), ctx) return ctx['filters'] diff --git a/tests/test_generator.py b/tests/test_generator.py index 9e1d53c..8a496b3 100644 --- a/tests/test_generator.py +++ b/tests/test_generator.py @@ -1,4 +1,5 @@ from qface.generator import FileSystem, Generator +from qface.utils import load_filters from unittest.mock import patch from io import StringIO import logging @@ -43,6 +44,10 @@ def test_parse_document(): system = FileSystem.parse(inputPath / 'com.pelagicore.ivi.tuner.qface') assert system.lookup('com.pelagicore.ivi.tuner') +def test_extra_filters(): + system = FileSystem.parse(inputPath / 'com.pelagicore.ivi.tuner.qface') + load_filters(Path('tests/templates/filters.py')) + assert system.lookup('com.pelagicore.ivi.tuner') def test_parse_document_list(): src = [inputPath / 'com.pelagicore.ivi.tuner.qface',