-
Notifications
You must be signed in to change notification settings - Fork 7
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
101 webconnections not being added #115
base: dev
Are you sure you want to change the base?
Conversation
@cefect Updated with relative paths and added web connections. Need to verify the connections of all the servers. Will look into that further. However connections are getting added. |
@cefect Made updates to PR, adding different connections WMS, WCS and arcgis REST. All getting added. Looking into correcting links for GRA15 and NPRI |
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.
see 1 commnet. also, need to add a test
tests2/Misct/test_webconnections.py
Outdated
from misc.webConnections import WebConnect | ||
|
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.
@cefect Updated test code to ensure, mock user ini file is update and then only test passes.
@cefect PR is updated, Test code is updated, and is ready for review |
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.
see comments. also, are all the tests passing? if not, need to include explanation for each failure.
tests2/Misct/test_webconnections.py
Outdated
) | ||
def test_read_connections(web_connect, config_file, expected_key): | ||
"""Test the read_connections function and check expected QGIS3.ini structure.""" | ||
config_path, expected_key = config_file |
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.
use explicit parameters. i.e., I expect to see 'config_path' in the pytest parameters if this is the parameter you are using. i.e., don't use a nested dictionary like this.
Also, what is going on with 'expected_key' here? It looks like you define it twice?
Also, why not just use the uri info in .\canflood\_pars\WebConnections.ini
? That would save you having to write out all these url strings AND provide a test on the .ini file.
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.
Refactored the code and used explicit parameters. and removed the redundancy of expected_key.
@cefect just tried to keep the test separate from the script. Do you suggest using already present WebConnections.ini ?
Web connections added via pyqgis api
This removes dependency from the Qgis versions.