-
-
Notifications
You must be signed in to change notification settings - Fork 73
Extending the WFS-Probe request to handle the count parameter. #469
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
Conversation
max_count added to the PARAM_DEFS with a default of 1000.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nollpa Thanks for this quick action! Unit tests are automatically run. We have one failure: a WFS test on WFS from the Dutch national GDI: https://service.pdok.nl/lv/bag/wfs/v2_0?service=WFS&version=1.1.0&request=GetCapabilities (buildings and addresses).
As I was already wondering looking at the code, the WFS Request Template: before WFS 2.0.0 the WFS parameter was called "maxfeatures", for 2.0.0 and higher "count". It depends a bit on the WFS implementation (GeoServer, MapServer, deegree) what is accepted, some WFS-es, also through configuration, can be more "forgiving".
The Probe request template uses WFS 1.1.0, so that would require maxfeatures, but the most optimal would be to support multiple WFS versions like the GetCapabilities Probe.
Quickest way now is to use maxfeatures, see if that works and then extend with new PRs. I also see room now for a plain GetFeature Probe, even as GET, with max_count. Filling in a BBOX is always tricky, default is entire bbox of datatype..
Another suggestion: the default of 1000 is a bit high, some features like GML appschema maybe be very big, and does not add to validation, suggestion is to use 5.
|
@justb4 |
|
The unit test still fails, but I think/hope for a different reason: the max_count parameter has https://github.com/geopython/GeoHealthCheck/blob/master/tests/data/resources.json#L196 Maybe adding Maybe first see what happens if |
…n for one probe for test purposes.
|
I've ran the tests on my local environment. After my newest changes, the tests regarding the WFS-Resources are fine. But I got an error on the LDPROXY FEATURES test. I got that error on master branch, too. So maybe it is a local problem? Does it pass successfully in your environment? The max_count paramter must be set within the fixtures.json. Without, it raises an error for "missing key 'max_count'". No matter if the parameter is set to required or not. This is caused by the mismatching keys during self.REQUEST_TEMPLATE.format(**request_parms). What is resources.json used for? I don't found a place of usage. |
|
All unit tests (at least from the GitHUb CI) now pass!
I would not worry about this. It passes in GH CI. General problem: relying on external services for tests. On the other hand we like to test with as many (in this OGC API Features) implementations as possible.
Hmm, Alternatively, a bit more work, is to adapt
But I now see only Focus only on Thanks for patience! |
|
Hi all: any update on this issue? |
* Extending the WFS-Probe request to handle the count parameter. max_count added to the PARAM_DEFS with a default of 1000. * set maxfeature instead of count parameter, to be compatible with WFS v1.1.0. * set default value for maxfeatures to 5. * set max_count to required:False and insert max_count in resources.json for one probe for test purposes. * Fix a typo. Added max_count to fixtures.json and resources.json * add PDF support for docs * #469 add WFS count to Probe with fixing merge conflicts * upgrade GitHub Action to use Ubuntu 24.04 Python 3.10 * upgrade GitHub Action to use Ubuntu 24.04 with Python 3.10.12 * Fix Paver build - upgrade Leaflet and its CDN * Fix Paver build - upgrade Leaflet and its CDN - Flake8 trap.. --------- Co-authored-by: Patrick Noll <[email protected]> Co-authored-by: Tom Kralidis <[email protected]>
justb4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nollpa ! (and @tomkralidis )
We finally found time to test/review. As GHC code has also progressed in the meantime, it was not possible to auto-merge this PR from within GitHub. I merged your branch with git commands plus edits. Main problem was that resources.json is no more in repo (obsolete).
During testing found one major issue and fixed that as well:
in WFS 1.1.0 the maxFeatures attribute should be in the wfs:GetFeature Element, not the wfs:Query Element, so moved there in the template in wfs.py.
So need to close this PR. Thanks for your patience!
max_count added to the PARAM_DEFS with a default of 1000.