-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature: support search_paths
option in QGIS finder job
#535
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #535 +/- ##
==========================================
+ Coverage 71.07% 71.10% +0.02%
==========================================
Files 47 47
Lines 3125 3135 +10
Branches 669 671 +2
==========================================
+ Hits 2221 2229 +8
- Misses 714 716 +2
Partials 190 190
Flags with carried forward coverage won't be shown. Click here to find out more.
|
de09890
to
c1f83ef
Compare
It will be better to support searching in subdirectory for |
0997bfa
to
15f982a
Compare
@jmkerloch Does setting search_path overwrite the default paths (program files/qgis X.y.z and OGESO4W) or not? If not, shouldn't we consider that these are the default values for 'search_paths'? In this way, a user may want QDT to search in a particular location (D://...) without looking in C:/program files/qgis X.y.z and OGESO4W. |
I think there is something to improve regarding version comparison. Test case: scenario:.qdt.yml - name: Find installed QGIS
uses: qgis-installation-finder
with:
version_priority:
- "3.40"
- "3.34"
- "3.28"
- "3.38"
- "3.36"
- "3.32"
search_paths:
- "%PROGRAMFILES%/QGIS"
if_not_found: warn I've installed a QGIS 3.34.9 and the job found it as expected: 2024-09-05 14:51:04||DEBUG||job_qgis_installation_finder||run_needed||135||'QDT_QGIS_EXE_PATH' is not defined. Searching for QGIS executable is necessary.
2024-09-05 14:51:04||DEBUG||job_qgis_installation_finder||_get_qgis_versions_in_dir||237||Searching for QGIS binary in C:\OSGeo4W with pattern ['qgis-bin.exe', 'qgis-ltr-bin.exe']
2024-09-05 14:51:04||DEBUG||job_qgis_installation_finder||_get_qgis_versions_in_dir||237||Searching for QGIS binary in C:\Program Files\QGIS 3.34.4 with pattern ['qgis-bin.exe', 'qgis-ltr-bin.exe']
2024-09-05 14:51:04||DEBUG||job_qgis_installation_finder||_get_qgis_versions_in_dir||237||Searching for QGIS binary in C:\Program Files/QGIS with pattern ['qgis-bin.exe', 'qgis-ltr-bin.exe']
2024-09-05 14:51:06||DEBUG||job_qgis_installation_finder||_search_qgis_version_and_add_to_dict||330||QGIS version 3.34.9 found : C:\Program Files\QGIS\3_34\bin\qgis-ltr-bin.exe
2024-09-05 14:51:06||DEBUG||job_qgis_installation_finder||get_installed_qgis_path||156||Found installed QGIS: {'3.34.9': 'C:\\Program Files\\QGIS\\3_34\\bin\\qgis-ltr-bin.exe'} But then, it complains about a non matching version: 2024-09-05 14:51:06||INFO||job_qgis_installation_finder||get_installed_qgis_path||177||QGIS version(s) [3.40,3.34,3.28,3.38,3.36,3.32] not found. Using most recent found version 3.34.9 : C:\Program Files\QGIS\3_34\bin\qgis-ltr-bin.exe Even if I use a more accurate version number in scenario, it says the same thing: - name: Find installed QGIS
uses: qgis-installation-finder
with:
version_priority:
- "3.40"
- "3.34.9"
- "3.28"
- "3.38"
- "3.36"
- "3.32"
search_paths:
- "%PROGRAMFILES%/QGIS"
if_not_found: warning 2024-09-05 15:02:51||DEBUG||job_qgis_installation_finder||run_needed||135||'QDT_QGIS_EXE_PATH' is not defined. Searching for QGIS executable is necessary.
2024-09-05 15:02:51||DEBUG||job_qgis_installation_finder||_get_qgis_versions_in_dir||237||Searching for QGIS binary in C:\OSGeo4W with pattern ['qgis-bin.exe', 'qgis-ltr-bin.exe']
2024-09-05 15:02:51||DEBUG||job_qgis_installation_finder||_get_qgis_versions_in_dir||237||Searching for QGIS binary in C:\Program Files\QGIS 3.34.4 with pattern ['qgis-bin.exe', 'qgis-ltr-bin.exe']
2024-09-05 15:02:51||DEBUG||job_qgis_installation_finder||_get_qgis_versions_in_dir||237||Searching for QGIS binary in C:\Program Files/QGIS with pattern ['qgis-bin.exe', 'qgis-ltr-bin.exe']
2024-09-05 15:02:52||DEBUG||job_qgis_installation_finder||_search_qgis_version_and_add_to_dict||330||QGIS version 3.34.9 found : C:\Program Files\QGIS\3_34\bin\qgis-ltr-bin.exe
2024-09-05 15:02:52||DEBUG||job_qgis_installation_finder||get_installed_qgis_path||156||Found installed QGIS: {'3.34.9': 'C:\\Program Files\\QGIS\\3_34\\bin\\qgis-ltr-bin.exe'}
2024-09-05 15:02:52||INFO||job_qgis_installation_finder||get_installed_qgis_path||177||QGIS version(s) [3.40,3.34.9,3.28,3.38,3.36,3.32] not found. Using most recent found version 3.34.9 : C:\Program Files\QGIS\3_34\bin\qgis-ltr-bin.exe
2024-09-05 15:02:52||DEBUG||job_qgis_installation_finder||run||103||qgis-installation-finder : QDT_QGIS_EXE_PATH is now C:\Program Files\QGIS\3_34\bin\qgis-ltr-bin.exe
2024-09-05 15:02:52||DEBUG||job_qgis_installation_finder||run||112||Job qgis-installation-finder ran successfully. |
For the specific search in |
Ok. If so, we should disable default locations if search_paths is not None. |
Once it's done, LGTM. |
- we look for QGIS in paths defined in this option
5d3ece1
to
b2477a5
Compare
Quality Gate passedIssues Measures |
Close #523
Search of QGIS installed binary is now done recursively from a list of search paths.