From b0c1dd00eea2515c67c8a0f6ff43f1c89749a820 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:55:09 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v6.0.0) - [github.com/mgedmin/check-manifest: 0.49 → 0.51](https://github.com/mgedmin/check-manifest/compare/0.49...0.51) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.3.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/23.3.0...26.1.0) - [github.com/PyCQA/flake8: 6.0.0 → 7.3.0](https://github.com/PyCQA/flake8/compare/6.0.0...7.3.0) - [github.com/asottile/setup-cfg-fmt: v2.3.0 → v3.2.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.3.0...v3.2.0) - [github.com/pycqa/isort: 5.12.0 → 7.0.0](https://github.com/pycqa/isort/compare/5.12.0...7.0.0) - [github.com/asottile/pyupgrade: v3.6.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.6.0...v3.21.2) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61fd032..b720492 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-json - id: check-yaml @@ -15,34 +15,34 @@ repos: - id: yamlfmt - repo: https://github.com/mgedmin/check-manifest - rev: '0.49' + rev: '0.51' hooks: - id: check-manifest - - repo: https://github.com/psf/black - rev: 23.3.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.1.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.3.0 hooks: - id: flake8 args: [--count, --show-source, --statistics] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.3.0 + rev: v3.2.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 7.0.0 hooks: - id: isort args: [--profile, black, --filter-files] - repo: https://github.com/asottile/pyupgrade - rev: v3.6.0 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py38-plus] From 44daea1533ad941eb8978d766a0f2c367abddf57 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:55:24 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/mp_api.py | 1 + marketplace/app/__init__.py | 1 + marketplace/datasink_client/utils.py | 24 ++++++++---------------- setup.cfg | 3 +-- setup.py | 1 + tests/test_core.py | 1 + 6 files changed, 13 insertions(+), 18 deletions(-) diff --git a/examples/mp_api.py b/examples/mp_api.py index 9fefbac..131b37b 100644 --- a/examples/mp_api.py +++ b/examples/mp_api.py @@ -1,4 +1,5 @@ """Simple script illustrating some of the features of this package.""" + from pprint import pprint from fastapi.responses import HTMLResponse diff --git a/marketplace/app/__init__.py b/marketplace/app/__init__.py index c4ba784..72dda56 100644 --- a/marketplace/app/__init__.py +++ b/marketplace/app/__init__.py @@ -3,6 +3,7 @@ .. currentmodule:: marketplace.app .. moduleauthor:: Pablo de Andres, Pranjali Singh (Fraunhofer IWM) """ + from typing import Optional from packaging.version import parse diff --git a/marketplace/datasink_client/utils.py b/marketplace/datasink_client/utils.py index 9de9792..2bcaa19 100644 --- a/marketplace/datasink_client/utils.py +++ b/marketplace/datasink_client/utils.py @@ -17,15 +17,13 @@ def get_datasets_uid_sparql(collections): g = Graph() g.parse(data=collections, format="json-ld") - qrs = g.query( - """ + qrs = g.query(""" SELECT ?asource ?id WHERE { ?asource a . ?asource ?id. } - """ - ) + """) for row in qrs: uid_list.append(row.id.value) @@ -46,15 +44,13 @@ def get_collections_uid_sparql(collections): g = Graph() g.parse(data=collections, format="json-ld") - qrs = g.query( - """ + qrs = g.query(""" SELECT ?asource ?id WHERE { ?asource a . ?asource ?id. } - """ - ) + """) for row in qrs: uid_list.append(row.id.value) @@ -74,16 +70,14 @@ def get_collections_from_catalog(collections): g = Graph() g.parse(data=collections, format="json-ld") - qrs = g.query( - """ + qrs = g.query(""" SELECT ?asource ?identifier ?subject ?title WHERE { ?asource a . ?asource ?identifier. ?asource ?title. } - """ - ) + """) for row in qrs: inf_packages.append(row.identifier.value) @@ -214,8 +208,7 @@ def get_datasets_from_catalog(datasets): g = Graph() g.parse(data=datasets, format="turtle") - qrs = g.query( - """ + qrs = g.query(""" SELECT ?asource ?identifier ?isPartOf ?title ?spatial WHERE { ?asource a . @@ -224,8 +217,7 @@ def get_datasets_from_catalog(datasets): ?asource ?title. ?asource ?spatial. } - """ - ) + """) for row in qrs: dataset = {} diff --git a/setup.cfg b/setup.cfg index d2da37b..f179e04 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,6 @@ license = MIT license_files = LICENSE classifiers = Development Status :: 2 - Pre-Alpha - License :: OSI Approved :: MIT License Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython @@ -27,7 +26,7 @@ install_requires = rdflib==6.2.0 rdflib-jsonld==0.6.2 requests>2.26.0,<3.0 -python_requires = >=3.8 +python_requires = >=3.10 [options.entry_points] console_scripts = diff --git a/setup.py b/setup.py index 5948248..63e14cb 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ """This file is required for editable installs of the package.""" + from setuptools import setup setup() diff --git a/tests/test_core.py b/tests/test_core.py index 293d6ba..9106f48 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -4,6 +4,7 @@ .. moduleauthor:: Carl Simon Adorf """ + import pytest from marketplace.client import MarketPlaceClient