Difference between revisions of "Develop an Add-on Rule"

From Gramps
Jump to: navigation, search
m (See also)
m (See also)
Line 40: Line 40:
 
** [[Getting_started_with_Gramps_development|Getting started with Gramps development]]
 
** [[Getting_started_with_Gramps_development|Getting started with Gramps development]]
 
** [https://github.com/gramps-project/gramps/tree/master/gramps/gen/filters/rules Built-in rule definitions]
 
** [https://github.com/gramps-project/gramps/tree/master/gramps/gen/filters/rules Built-in rule definitions]
** [[https://github.com/gramps-project/addons-source/tree/master/FilterRules FilterRules add-on rule definitions]
+
** [https://github.com/gramps-project/addons-source/tree/master/FilterRules FilterRules add-on rule definitions]
** [[https://github.com/gramps-project/addons-source/tree/master/FilterRules2 FilterRules2 add-on rule definitions]
+
** [https://github.com/gramps-project/addons-source/tree/master/FilterRules2 FilterRules2 add-on rule definitions]
  
 
*[[Gramps_Glossary#filter|Filter]] Gramps Glossary definition
 
*[[Gramps_Glossary#filter|Filter]] Gramps Glossary definition
Line 48: Line 48:
 
** [https://www.geneanet.org/forum/viewtopic.php?p=2032470#p2032470 Je kife le SuperTool!] (French: I love the SuperTool! on Geneanet)
 
** [https://www.geneanet.org/forum/viewtopic.php?p=2032470#p2032470 Je kife le SuperTool!] (French: I love the SuperTool! on Geneanet)
 
** [https://gramps.discourse.group/t/a-little-answer-to-geps-015-using-supertool/1771 A little answer to GEPS 015 (Repository Research Support) using Supertool]
 
** [https://gramps.discourse.group/t/a-little-answer-to-geps-015-using-supertool/1771 A little answer to GEPS 015 (Repository Research Support) using Supertool]
** [https://gramps.discourse.group/t/how-is-the-relationships-view-so-responsive/2802 The Gramps Project (Discourse Forum & Mailing List)
+
** [https://gramps.discourse.group/t/how-is-the-relationships-view-so-responsive/2802 How is the Relationships view so responsive?]
How is the Relationships view so responsive?]
 
  
 
<!--
 
<!--
Line 58: Line 57:
 
-->
 
-->
 
* In [https://gramps-project.org/bugs/view_all_bug_page.php in MantisBT] bug reporter for Gramps
 
* In [https://gramps-project.org/bugs/view_all_bug_page.php in MantisBT] bug reporter for Gramps
** Feature Requests for add-on custom filter Rules. (Filter for "filter, rule")  
+
** Feature Requests: search for add-on custom filter Rules. (Filter for "filter, rule")  
 
** {{bug|0011689}}: [GrampsAIO-5.1.2-new_libs_win64] Active and Default Person filter rules
 
** {{bug|0011689}}: [GrampsAIO-5.1.2-new_libs_win64] Active and Default Person filter rules
  

Revision as of 15:39, 23 September 2022

Gnome-important.png
🚧 Work In Progress

This wikipage is a cloned outline from a template. It is being roughed in.

Since you are reading this paragraph, then the WikiContributor has not progressed to the point of trimming out the excess template material. That means the wikipage is probably not ready for collaborative editing yet. Multiple people editing now might unintentionally overwrite their work. Please post your suggestion on the Discussion page instead of directly editing the content.

Custom Filters are built upon Query Rules. Sometimes a filter rule has not been provided to search the part of the Tree desired. Or the existing Rules can not be combined to isolate the desired part of the Tree. If those particular must be repeatedly isolated, building a query rule might be the next logical step.

placeholder

In various rules that allow a Person ID to be selected as a parameter value, both built-in rules & add-on rules use inconsistent placeholders:

  • <Id>
  • <id>
  • <person>

It would be better if they were harmonized.

I suspect any variant of <ID> would ambiguous because sometimes these rules (while needing a Person Gramps ID) are in different category custom rules.

What should the standard nomenclature be for the rule names, descriptions & documentation?

Using add-ons to design and test flight Filter Rule

Designing and optimizing a quality query can be challenging. Even a slow rough-cut query is acceptable for a single-use. But clean and fast code is vital to a frequently used add-on Filter Rule.

There are some power tool add-ons to help when designing queries, testing them and optimize their runtimes.

Particularly, using SuperTool design a rough query, the Query Gramplet to experiment with optimizations, the Generic custom rules to commit the query to a something usable with Custom Filters, and FilterParams to tune is one way to use add-ons in concert.

Converting a query to an add-on Filter Rule

Publishing a new Filter Rule

Update the Rule Expansions wiki page

See also

  • In in MantisBT bug reporter for Gramps
    • Feature Requests: search for add-on custom filter Rules. (Filter for "filter, rule")
    • 0011689: [GrampsAIO-5.1.2-new_libs_win64] Active and Default Person filter rules