By tomfumb


2019-03-14 22:19:05 8 Comments

All the QGIS documentation I've seen on custom functions (used in expressions) says that the code is saved in the user's local expressions directory, e.g. ~/.local/share/QGIS/QGIS3/profiles/default/python/expressions in Linux. The same documentation typically says something like "remember to share your expression files if others need this functionality" (example)

It seems like the only way to share this code is for other users to manually copy it to their own expressions directory, however that seems inadequate. If multiple map developers share a version control system the onus is on them to manually copy any updates to custom functions to their expressions directory. It does not seem possible for expressions to be loaded from an alternate path, e.g. one relative to the .qgs file, and therefore automatically update each time a project is loaded.

I plan to create a Feature Request for loading custom functions from a relative path, but first wanted to check that I have understood the current situation correctly. Do all users of shared custom functions really need to manually copy the code to their expressions directory each time it changes?

0 comments

Related Questions

Sponsored Content

0 Answered Questions

Changing the Location of Python Expressions QGIS3

1 Answered Questions

[SOLVED] Relative path not working in QGIS with Google Drive?

1 Answered Questions

[SOLVED] Calling QGIS functions via Function Editor?

2 Answered Questions

0 Answered Questions

Custom QGIS expression to filter atlas pages

1 Answered Questions

1 Answered Questions

[SOLVED] Documenting custom Python functions in QGIS

1 Answered Questions

[SOLVED] Custom Python Expression Functions (QGIS Tutorial)

1 Answered Questions

[SOLVED] Deleting custom functions in QGIS Field Calculator

1 Answered Questions

[SOLVED] Custom labeling expression in QGIS?

Sponsored Content