Skip to content

feat(jobs): add new job qglobal-config-manager for qgis_global_settings.ini copy#781

Open
jmkerloch wants to merge 21 commits intomainfrom
feat/qglobal_config_manager
Open

feat(jobs): add new job qglobal-config-manager for qgis_global_settings.ini copy#781
jmkerloch wants to merge 21 commits intomainfrom
feat/qglobal_config_manager

Conversation

@jmkerloch
Copy link
Copy Markdown
Collaborator

@jmkerloch jmkerloch commented Mar 23, 2026

QGIS global config manager

qgis_global_settings.ini file contains global settings for all QGIS profile.

This PR introduce a new job qglobal-config-manager that can be added to a scenario to use a custom file during deployment :

  - name: Handle the qgis_global_settings.ini file
    uses: qglobal-config-manager
    with:
      src: ./global/qgis_global_settings.ini
      dst: ~/config/qgis/global_settings.ini

The job handles:

  • conversion of src and dst for environment variable use
  • download of the src .ini file if the input is an url
  • copy of the src .ini file to the dst .ini file
  • conversion of environment variable in the src .ini
  • define QGIS_GLOBAL_SETTINGS_FILE user environment variable with dst .ini file path

Default values

If no value defined in jobs, default values are used. The value is defined with the same behavior as QGIS :

  • first use QGIS_GLOBAL_SETTINGS_FILE
  • if not defined, use AppDataLocation folder:
    • Linux: $HOME/.local/share/QGIS/QGIS3/
    • Windows : C:\Users\<username>\%AppData%\Roaming\QGIS\QGIS3\
    • MacOS : $HOME/Library/Application Support/QGIS/QGIS3/
  • if file doesn't exists :
    • the installation directory, i.e., your_QGIS_package_path/resources/qgis_global_settings.ini
    • to define the QGIS package path we use QDT_QGIS_EXE_PATH environment variable

Relative src option

src can be a relative path. In this case we check for .ini file related to:

  • repository folder from current scenario
    • when the job qprofiles-synchronizer is run, all profiles repository are stored in a local repositories folder : <qdt_working_folder>/respositories/<scenario_id>
    • .ini file can be stored in profile repository and defined with a relative src : ./myprofile/qgis_global_settings.ini
  • qdt local working directory.
    • can be defined with QDT_LOCAL_WORK_DIR environment variable

@jmkerloch jmkerloch self-assigned this Mar 23, 2026
@github-actions github-actions bot added jobs Scenarios and jobs quality Tests, project resiliency, etc. labels Mar 23, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 85.83333% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...oyment_toolbelt/jobs/job_qglobal_config_manager.py 87.36% 9 Missing and 3 partials ⚠️
qgis_deployment_toolbelt/constants.py 70.58% 1 Missing and 4 partials ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #781      +/-   ##
==========================================
+ Coverage   71.96%   72.75%   +0.78%     
==========================================
  Files          48       49       +1     
  Lines        3360     3479     +119     
  Branches      598      619      +21     
==========================================
+ Hits         2418     2531     +113     
- Misses        719      721       +2     
- Partials      223      227       +4     
Flag Coverage Δ
unittests 72.08% <83.33%> (+0.72%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
qgis_deployment_toolbelt/jobs/orchestrator.py 90.90% <100.00%> (+0.28%) ⬆️
...s_deployment_toolbelt/profiles/qgis_ini_handler.py 72.61% <100.00%> (+4.10%) ⬆️
qgis_deployment_toolbelt/constants.py 77.86% <70.58%> (-1.09%) ⬇️
...oyment_toolbelt/jobs/job_qglobal_config_manager.py 87.36% <87.36%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 23, 2026
@jmkerloch jmkerloch changed the title Feat/qglobal config manager feat(jobs): add new job qglobal-config-manager for qgis_global_settings.ini copy Mar 23, 2026
@jmkerloch jmkerloch marked this pull request as ready for review March 23, 2026 16:21
@jmkerloch jmkerloch marked this pull request as draft March 23, 2026 17:04
@jmkerloch jmkerloch force-pushed the feat/qglobal_config_manager branch from 703c4f5 to 1bb727d Compare March 24, 2026 08:16
@jmkerloch jmkerloch marked this pull request as ready for review March 24, 2026 08:21
@jmkerloch
Copy link
Copy Markdown
Collaborator Author

@Guts examples/scenarios/demo-scenario-global-config.qdt.yml will be updated before merge to indicate main branch. I keep feat/qglobal_config_manager now for test purpose.

@jmkerloch jmkerloch requested a review from Guts March 24, 2026 08:22
@Guts
Copy link
Copy Markdown
Collaborator

Guts commented Mar 24, 2026

@jmkerloch jmkerloch force-pushed the feat/qglobal_config_manager branch from aa60943 to cfac0c7 Compare March 26, 2026 15:27
@jmkerloch
Copy link
Copy Markdown
Collaborator Author

@jmkerloch can you add the corresponding JSON schema into https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/tree/feat/qglobal_config_manager/docs/schemas/scenario/jobs please?

For sure 🕶️ I added a commit.

@jmkerloch jmkerloch force-pushed the feat/qglobal_config_manager branch from cfac0c7 to 5334868 Compare April 2, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation jobs Scenarios and jobs quality Tests, project resiliency, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants