diff --git a/.github/workflows/quality_assurance.yml b/.github/workflows/quality_assurance.yml index ce8f595..13a9b2a 100644 --- a/.github/workflows/quality_assurance.yml +++ b/.github/workflows/quality_assurance.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11"] env: PYTHON: ${{ matrix.python-version }} steps: diff --git a/.requirements/base.txt b/.requirements/base.txt index e54b377..9ddeaee 100644 --- a/.requirements/base.txt +++ b/.requirements/base.txt @@ -1,8 +1,8 @@ -Django>=3.2,<5.0 +Django>=3.2,<6.0 django-epsg-cache==0.2.1 eulxml==1.1.3 isodate==0.6.1 camel-converter==3.1.1 -requests>=2.23.0,<2.30.0 -pygeofilter==0.2.1 +requests>=2.23.0,<2.32.0 +pygeofilter==0.2.4 pygml==0.2.2 \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 097eaa5..054e2f7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +[v0.15.0] - 2024-10-14 +---------------------- + +Added +~~~~~ + +* cql filter possibility to csw `get_records_request` function. + +Changed +~~~~~~~ + +* increased django version support up to 5.1 +* increased requests support up to 2.31.0 +* increased pygeofilter support up to 0.2.4 + +Removed +~~~~~~~ + +* python 3.8 and 3.9 support [v0.14.5] - 2024-04-03 ---------------------- diff --git a/ows_lib/__init__.py b/ows_lib/__init__.py index 7626f4c..3b0da66 100644 --- a/ows_lib/__init__.py +++ b/ows_lib/__init__.py @@ -1,2 +1,2 @@ -__version__ = "0.14.5" +__version__ = "0.15.0" VERSION = __version__ # synonym diff --git a/ows_lib/client/csw/mixins.py b/ows_lib/client/csw/mixins.py index adc318b..7e2ce20 100644 --- a/ows_lib/client/csw/mixins.py +++ b/ows_lib/client/csw/mixins.py @@ -30,9 +30,9 @@ def get_records_request( output_schema: str = "http://www.isotc211.org/2005/gmd", element_set_name: str = "full", xml_constraint: str = None, + cql_constraint: str = None, max_records: int = None, start_position: int = None, - ) -> OGCRequest: params = { @@ -51,7 +51,12 @@ def get_records_request( "CONSTRAINT_LANGUAGE_VERSION": "1.1.0", "Constraint": xml_constraint }) - + elif cql_constraint: + params.update({ + "constraintLanguage": "CQL_TEXT", + "CONSTRAINT_LANGUAGE_VERSION": "1.1.0", + "Constraint": cql_constraint + }) if max_records: params.update({ "maxRecords": max_records diff --git a/setup.py b/setup.py index 0ace405..fee31f3 100644 --- a/setup.py +++ b/setup.py @@ -56,10 +56,10 @@ def get_version(package): "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Natural Language :: English", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Internet :: WWW/HTTP", "Environment :: Web Environment", "Framework :: Django", diff --git a/tox.ini b/tox.ini index 52c3e7d..0ccce4e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ requires = tox>=4 env_list = - py{38,39,310,311}-django{32,40,41,42}-requests{223,224,225,226,227,228,229}-pygeofilter{021} + py{310,311}-django{32,40,41,42,50,51}-requests{223,224,225,226,227,228,229,230,231,232}-pygeofilter{021} [testenv] description = run unit tests @@ -11,6 +11,8 @@ deps= django40: Django>=4.0,<4.1 django41: Django>=4.1,<4.2 django42: Django>=4.2,<4.3 + django50: Django>=5.0,<5.1 + django51: Django>=5.1,<5.2 requests223: requests>=2.23.0,<2.24.0 requests224: requests>=2.24.0,<2.25.0 requests225: requests>=2.25.0,<2.26.0 @@ -18,6 +20,9 @@ deps= requests227: requests>=2.27.0,<2.28.0 requests228: requests>=2.28.0,<2.29.0 requests229: requests>=2.29.0,<2.30.0 + requests230: requests>=2.30.0,<2.31.0 + requests231: requests>=2.31.0,<2.32.0 + requests232: requests>=2.32.0,<2.33.0 pygeofilter021: pygeofilter>=0.2.1,<0.3.0 django-epsg-cache==0.2.1 eulxml==1.1.3