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

feat(qdt export): initialization of qdt export #24

Merged
merged 17 commits into from
Oct 4, 2024

Conversation

jmkerloch
Copy link
Collaborator

@jmkerloch jmkerloch commented Oct 2, 2024

In this PR we introduce a new panel in profile-manager to export profile as QDT profile .json file (https://guts.github.io/qgis-deployment-cli/reference/qdt_profile.html#model-definition) with a copy of the profile files used by QDT.

Refactoring

For better maintability of the project we moved and updated some functions from the main plugin entrypoint (profile_manager/profile_manager.py) to a new file (profile_manager/profiles/utils.py)

New functions are defined to get information about the profiles:

GUI

Since we needed a way to display the available profiles, we created a QStandardItemModel : ProfileListModel.

This model is using QgsUserProfileManager to get all available profile and also be notified any time a new profile is created.

This model is now used for all profile selection combobox / listview.

We also are displaying profile icon.

QDT Export

A new panel is added in main GUI.

You can select profile to export and define the export directory and some informations about the QDT Profile.
If a QDT profile.json file is already available we are reading informations for QDT profile creation in file.

When creating a QDT Profile export directory we:

  • copy all content of the QGIS profile directory
  • remove cache and python plugin directory
  • create a QDT profile.json file with the QGIS profile information:
    • define plugin informations from QGIS plugin manager ( ⚠️ for now only official QGIS plugin are supported)

Missing

  • support for unofficial plugins
  • need to check the folder_name value in QDT profile.json (need to discuss with @Guts)

@jmkerloch jmkerloch marked this pull request as ready for review October 2, 2024 08:22
@jmkerloch jmkerloch self-assigned this Oct 2, 2024
@jmkerloch jmkerloch requested review from Guts and kannes October 2, 2024 08:22
@Guts Guts linked an issue Oct 3, 2024 that may be closed by this pull request
@Guts Guts added the enhancement New feature or request label Oct 3, 2024
requirements.txt Outdated Show resolved Hide resolved
jmkerloch and others added 15 commits October 3, 2024 18:11
- qgis profiles path
- profile list
- QGIS3.ini for profile
- metadata from plugin in profile
- metadata for plugin from QGIS
- copy all profile content
- remove cache folders
- remove python plugin folders
- create profile.json file for QDT from profile plugins
- use QgsUserProfileManager to get available profiles
- connect to profilesChanged for model update
… profile combobox

- convert QListWidget to QListView
- add function in ProfileManagerDialog to get current selected profile in list
- closes Profile Manager does not respect --profiles-path start up option WhereGroup#5
@github-actions github-actions bot added the UI User interface: forms, widgets... label Oct 3, 2024
@jmkerloch jmkerloch requested a review from Guts October 3, 2024 16:15
Copy link
Collaborator

@Guts Guts left a comment

Choose a reason for hiding this comment

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

LGTM 🚀!

We have a plugin ready for a new release!

@jmkerloch jmkerloch merged commit 1fbad82 into WhereGroup:main Oct 4, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UI User interface: forms, widgets...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Profile Manager does not respect --profiles-path start up option
2 participants