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

Use describeprocess all to speed up the creation of the class #98

Merged
merged 13 commits into from
Jan 11, 2019
Merged

Conversation

huard
Copy link
Contributor

@huard huard commented Jan 8, 2019

Overview

This PR closes #90

Changes:

  • If no processes are specified at WPSClient instantiation time, then describeProcess is called with once with pid='all' instead of one time for each process.

Related Issue / Discussion

Requires: geopython/OWSLib#555

@huard huard requested a review from cehbrecht January 8, 2019 22:37
@cehbrecht cehbrecht added this to the 0.6.0 milestone Jan 9, 2019
Copy link
Member

@cehbrecht cehbrecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested yet ... but code changes look good.

"""
if processes is None:
# Get the description for all processes in one request.
ps = self._wps.describeprocess('all')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case we assume, we always get a list of processes. Which is right :) But need to adapt owslib PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about backward-compatibility? I can also make a pre-release package of owslib on the birdhouse channel.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your're right, if a server had only one process, this would break.

I guess we should try to do something backward compatible, but doing this elegantly might be complicated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last push includes a fix to make the change backward compatible. It only requires owslib to bump version. The change almost divides the test run time by half.

@huard
Copy link
Contributor Author

huard commented Jan 11, 2019

@cehbrecht Ok, ready to go, want to take a last look ?

@cehbrecht
Copy link
Member

@huard I'm ok with it. Please merge :)

@huard huard merged commit 4a162ac into master Jan 11, 2019
@huard huard deleted the fix-90 branch January 11, 2019 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimizations
2 participants