Difference between revisions of "GEPS 008: File Organization"

From Gramps
Jump to: navigation, search
(gramps/gui/)
(gramps/gui/)
Line 78: Line 78:
 
=== gramps/gui/plug/ ===
 
=== gramps/gui/plug/ ===
 
The gui.plug directory contains windows, dialogs, and tools that the plugins will use.
 
The gui.plug directory contains windows, dialogs, and tools that the plugins will use.
 +
 +
=== gramps/gui/plug/quick ===
 +
This directory contains code for running quick views.
  
 
=== gramps/gui/plug/report ===
 
=== gramps/gui/plug/report ===

Revision as of 00:06, 1 June 2012

Gramps was originally written as a GTK application intended to only be used in a graphical environment. Over time, support has been added for other user interfaces (CLI and web). In order to reduce unnecessary dependencies between the various interfaces, the software architecture is being organized into 5 main categories of code - each in their own directory.

The descriptions below provide the general purpose and scope of each category. Not all code in the source tree conforms to this architecture yet.

However, new code should attempt to move the source in a direction that conforms to this organization. Moving to this architecture is an ongoing process and a work in progress.

gramps/gen/

This directory contains the core components of Gramps. The gramps/gen/ directory shall not have any dependencies on the other top level source directories (gramps/gui/, gramps/cli/, gramps/web/, etc). The gramps/gen/ directory also shall not have any dependencies on the gtk library.

The word "gen" was chosen because it is short for "general" and "generic" which is a good way to describe code in this directory because it doesn't depend on or require a specific user interface. "gen" is also short for "genealogy" which is also an appropriate term for the code in this directory because it implements the "business logic" that makes Gramps a genealogy application.

gramps/gen/datehandler/

The datehandler directory contains the code for handling dates in different locales.

gramps/gen/db/

The db directory contains the code for manipulating the Gramps database.

gramps/gen/display/

The display directory contains business logic for displaying database objects in textual form. For example, localized date display and name display code.

gramps/gen/filters/

The filters directory contains the code for filtering objects.

gramps/gen/filters/rules

The rules directory contains the code for rules used by the filters. The rules are divided into sub-directories according to primary object type:

  • gramps/gen/filters/rules/citation
  • gramps/gen/filters/rules/event
  • gramps/gen/filters/rules/family
  • gramps/gen/filters/rules/media
  • gramps/gen/filters/rules/note
  • gramps/gen/filters/rules/person
  • gramps/gen/filters/rules/place
  • gramps/gen/filters/rules/repository
  • gramps/gen/filters/rules/source

gramps/gen/lib/

The lib directory contains the classes for the database objects.

gramps/gen/locale/

The locale directory contains the code for handling locale settings in Gramps.

gramps/gen/merge/

The merge directory contains the classes for merging database objects.

gramps/gen/mime/

The mime directory contains the code for handling mime types in Gramps.

gramps/gen/plug/

The plug directory contains the core logic for registering and running plugins. It also contains any utility classes used by plugins.

gramps/gen/plug/report/

This directory contains the base class for reports, constants, and basic utilities.

gramps/gui/

This directory contains the code for the desktop graphical user interface. Any file that imports GTK or glade should live in this directory or a subdirectory of this directory.

gramps/gui/editors/

This directory contains the code for the object editors used in the GUI.

gramps/gui/editors/displaytabs/

This directory contains the code for the tabs used in the GUI editors.

gramps/gui/filters/

This directory contains the code for the GUI filter interface.

gramps/gui/filters/sidebar

This directory contains the code for the GUI sidebar filters.

gramps/gui/glade/

This directory contains Glade user interface definition files.

gramps/gui/logger/

This directory contains the code for GUI error logging and reporting.

gramps/gui/merge/

This directory contains the code for merging objects in the GUI.

gramps/gui/plug/

The gui.plug directory contains windows, dialogs, and tools that the plugins will use.

gramps/gui/plug/quick

This directory contains code for running quick views.

gramps/gui/plug/report

This directory has the dialogs for running reports, such as selection criteria, file pickers, and paper sizes.

gramps/gui/views/

This directory contains the code for the various graphical "views" in the GUI.

gramps/gui/views/treemodels/

This directory contains the code for the models used in the GUI.

gramps/gui/views/selectors/

This directory contains the code for the object selection dialogs in the GUI.

gramps/gui/widgets/

This directory contains widgets used by the GUI

gramps/cli/

This directory contains the code for the command line interface.

gramps/web/

This directory contains the code for the gramps-connect web interface.

gramps/plugins/

This directory contains all the plugins for Gramps.

gramps/plugins/docgen/

This directory contains all the document generator plugins.

gramps/plugins/drawreport/

This directory contains all the graphical report plugins.

gramps/plugins/export/

This directory contains all the export plugins.

gramps/plugins/gramplet/

This directory contains all the gramplet plugins.

gramps/plugins/graph/

This directory contains all the graph report plugins.

gramps/plugins/import/

This directory contains all the import plugins.

gramps/plugins/lib/

This directory contains shared library code for Gramps plugins.

gramps/plugins/mapservices/

This directory contains all the map service plugins.

gramps/plugins/quickview/

This directory contains all the quickview plugins.

gramps/plugins/rel/

This directory contains the relationship calculator plugins.

gramps/plugins/report/

This directory contains all the report plugins.

Should the drawreport, graph, textreport and webreport directories be moved under here?

gramps/plugins/sidebar/

This directory contains all the navigation sidebar plugins.

gramps/plugins/textreport/

This directory contains all the text report plugins.

gramps/plugins/tool/

This directory contains all the tool plugins.

gramps/plugins/view/

This directory contains all the view plugins.

gramps/plugins/webreport/

This directory contains all the web report plugins.

gramps/plugins/webstuff/

This directory contains plugins providing web resources.

Related Gramps Bugs

  • #2622: File Organization (GEPS 008)
  • #4646: reports cannot be run from the command line in a non-GUI environment
  • #2621: use python-setuptools instead of make