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 QGIS API to convert AMS datasource to dictionary #1051

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

alexbruy
Copy link

@alexbruy alexbruy commented Feb 20, 2025

Use QGIS API to convert data source string to Python dictionary.

Instead of relying on regular expressions, try to parse datasource string using provider-specific decodeUri() method and if corresponding provider does not support it - fallback to use QgsDataSourceUri class. Also removed datasourcearcgis2dict() function as its functionality should be covered by updated datasource2dict().

Note that some tests will fail on QGIS <= 3.43 for now because of the minor bug in PostgreSQL data provider, there is an open PR to fix this qgis/QGIS#60703.

Fixes #276.

@alexbruy alexbruy force-pushed the refactor-datasource2dict branch from 22dc884 to 70f6af8 Compare February 20, 2025 16:28
@alexbruy alexbruy force-pushed the refactor-datasource2dict branch from 70f6af8 to 2460b95 Compare February 20, 2025 20:24
@alexbruy alexbruy marked this pull request as ready for review February 22, 2025 08:28
@alexbruy
Copy link
Author

@wlorenzetti I hope this does not break anything, I'm still learning the code and architecture.

@wlorenzetti
Copy link
Member

@wlorenzetti I hope this does not break anything, I'm still learning the code and architecture.

Don't worry Alex, CI is present :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactoring datasource2dict
2 participants