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

Modularization 2 - manage layer adding cache #212

Merged
merged 3 commits into from
Jul 31, 2019
Merged

Conversation

SimonSAMPERE
Copy link
Collaborator

2 new modules

Context

Improve plugin operation and make corrections (#180 ).

Achievments

modules/results/display.py

  • Issue : Module cache #179

  • Commits : f25e18c, 2e77b1d

  • Class name : ResultsManager

  • Purpose : This class includes two methods of the old ResultsManager class (show_results() and _filepath_builder()) in addition to build_postgis_dict() method from the old UrlBuilder class. The result display works in much the same way as before. This modules/results/display.py corresponds to what remains of the old modules/results.py after removing the cache management and adding the build_postgis_dict() method.

modules/results/cache.py

  • Issue : Module cache #179

  • Commits : f25e18c, 2ce825e

  • Class name : CacheManager

  • Purpose : This class includes the 3 methods removed from the old modules/results.py: _cache_dumper(), _cache_loader() and _cache_cleaner() renamed dumper(), loader() and cleaner(). The management of the cache related to the addition of layer is now isolated in this modules/results/cache.py. It manages the storage of inaccessible elements detected during use, the writing of these elements in the JSON cache file, the recovery of these elements from the JSON cache file and the cleaning of this file.

  • Improvement : The old cache system only supported inaccessible file paths. This CacheManager has been developed to also store inaccessible services (OGC and ESRI) or databases. The structure of the JSON file has been modified to accommodate these 2 new types of elements while integrating the elements saved in the old cache format. It is therefore possible to manage the cache linked to all layer addition options but the detection of the elements to be cached will be developed later and will be managed in the modules/results/display.py.

#179
splitting old modules/results.py into new modules modules/results/cache.py and modules/results/display.py
using modules/results/cache.py into modules/results/display.py and modules/results/display.py  into isogeo.py
@SimonSAMPERE SimonSAMPERE added enhancement Amélioration du fonctionnement existant code art Qualité du code source labels Jul 31, 2019
@SimonSAMPERE SimonSAMPERE requested a review from Guts July 31, 2019 08:21
@SimonSAMPERE SimonSAMPERE self-assigned this Jul 31, 2019
@SimonSAMPERE SimonSAMPERE merged commit 3abd19d into qgis3 Jul 31, 2019
@Guts Guts added this to the Version 2 milestone Aug 30, 2019
@SimonSAMPERE SimonSAMPERE mentioned this pull request Sep 2, 2019
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code art Qualité du code source enhancement Amélioration du fonctionnement existant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants