Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds cql filter possibility to get_records request #30

Merged
merged 8 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/quality_assurance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .requirements/base.txt
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------------------
Expand Down
2 changes: 1 addition & 1 deletion ows_lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.14.5"
__version__ = "0.15.0"
VERSION = __version__ # synonym
9 changes: 7 additions & 2 deletions ows_lib/client/csw/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,13 +11,18 @@ 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
requests226: requests>=2.26.0,<2.27.0
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
Expand Down
Loading