Skip to content

Commit

Permalink
Merge branch 'master' into feat/project_in_qgis_browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts authored Dec 16, 2024
2 parents 0d6dea7 + 530fffa commit f677a60
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:

- name: Download artifact from build workflow
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')
uses: dawidd6/action-download-artifact@v6
uses: dawidd6/action-download-artifact@v7
with:
allow_forks: false
branch: master
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ deploy.py
# -- CUSTOM ----
*.zip
*.qm
menu_from_project/gui/*.db
menu_from_project/ui/*.db
pyqt5_to_pyqt6.py
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,70 @@ Unreleased
-->

## 2.2.1 - 2024-12-11

### Bugs fixes 🐛

* fix(conf): need to remove projects setting before write by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/139
* fix(settings): invalid remove use we must indicate projects by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/142
* Fix/qgis 3 28 use by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/143

## 2.2.0 - 2024-12-09

### Bugs fixes 🐛

* fix(dataclass): use field and default_factory for default value by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/97
* Fix: help menu was leading to a 404 by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/118
* Docs: fix and reorganize by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/122
* fix(ci): root's requirements file is required by setup-python by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/123
* Fix: i18n workflow by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/124
* fix(project read): must check if layer is available in qgs project by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/126

### Features and enhancements 🎉

* Use QgsProject to load needed informations for menu creation by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/87
* feat: restore xml parsing to avoid postgis request by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/89
* feat: add unit tests by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/90
* feat(project load): run projects config load in a QgsTask by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/91
* feat(plugin): move settings to a specific class by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/92
* feat(layer load): move code for layer load to a specific class LayerLoad by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/93
* feat(layer load): add typing and docstring for better understanding by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/94
* Feat naive cache by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/95
* Feat add cache options by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/96
* feat(cache): add cache validation uri support by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/100
* refacto(quality): apply git hooks to existing codebase by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/121
* update(docs): add contributing guidelines by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/113
* rm(deadcode): remove unused Python logger by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/116
* (feat): use profile cache dir by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/111

### Tooling 🔧

* add(tooling): PR autolabeler by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/109
* Documentation: modernize CI/CD workflow by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/110
* Packaging: modernize plugin package and release workflow by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/115

### Other Changes

* Tooling: update dev dependencies by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/98
* update(tooling): upgrade git hooks by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/99
* update(packaging): make changelog compliant with 'keep a changelog' convention by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/106
* update(packaging): use new project's URL by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/108
* add(tooling): use issue form templates to gather feedback by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/119
* fix(tooling): fix path for flake8 by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/112
* update(docs): complete contribute section by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/114
* update(packaging): set minimum version to 3.28 by @Guts in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/120

## New Contributors

* @jmkerloch made their first contribution in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/87


## 2.2.0-beta2 - 2024-11-29

### Bugs fixes 🐛

* fix(project read): must check if layer is available in qgs project by @jmkerloch in https://github.com/aeag/MenuFromProject-Qgis-Plugin/pull/126

## 2.2.0-beta1 - 2024-11-13

- Layer notes as tooltip
Expand Down
4 changes: 2 additions & 2 deletions menu_from_project/logic/cache_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import List, Optional

# PyQGIS
from qgis.core import QgsFileDownloader, QgsMessageLog
from qgis.core import QgsApplication, QgsFileDownloader, QgsMessageLog
from qgis.PyQt.QtCore import QCoreApplication, QEventLoop, QUrl

# project
Expand Down Expand Up @@ -262,7 +262,7 @@ def get_project_cache_dir(self, project: Project) -> Path:
:return: path to project cache directory
:rtype: Path
"""
cache_path = Path(self.iface.userProfileManager().userProfile().folder())
cache_path = Path(QgsApplication.qgisSettingsDirPath())
cache_path = cache_path / "cache" / "menu_from_project" / project.id
cache_path.mkdir(parents=True, exist_ok=True)
return cache_path
Expand Down
2 changes: 1 addition & 1 deletion menu_from_project/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ qgisMaximumVersion=3.98
description=Build layers shortcuts menus based on QGIS projects
about=Allow easy opening of layers maintaining their style.

version=2.2.1-DEV
version=2.3.0-DEV

changelog=

Expand Down
1 change: 1 addition & 0 deletions menu_from_project/toolbelt/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def save_from_object(cls, plugin_settings_obj: PlgSettingsStructure):
s.setValue("optionOpenLinks", plugin_settings_obj.optionOpenLinks)
s.setValue("optionSourceMD", ",".join(plugin_settings_obj.optionSourceMD))

s.remove("projects")
s.beginWriteArray("projects", len(plugin_settings_obj.projects))
try:
for i, project in enumerate(plugin_settings_obj.projects):
Expand Down

0 comments on commit f677a60

Please sign in to comment.