Changes

Jump to: navigation, search

Getting started with Gramps development

237 bytes added, 23:23, 3 October 2021
m
Get the source tree: link to help pages
{{man tip|Information on The article is about developing for the Gramps program|If you are looking to use the Gramps program or install addons visit:<br>* [[Portal:Using_GrampsUsing Gramps]]<br>* [[Third-party Addons]]}}
{{man warn|Warning:|This tutorial is a work in progress. Feel free to help and modify it.}}
== Linux: Optional : set up a development environment ==
{{man warn|Warning:|It is highly recommended that you do not use your normal/usual environment for developing Gramps.<br />|Definitely do '''not''' work on your main Gramps family tree.<br />Doing so may result in data loss in your Gramps Family Tree !}}
If you run your development version of Gramps as the usual user, it will show all your usual Gramps family trees, so loading one by mistake is possible and a bug may result in losing productive data. To prevent this, you could use a [[GRAMPSHOME]] environment variable to create a separate folder for productive data, see [[Run Gramps from a portable drive]] for more information.
=== None of above ===
{{man warn|You have been warned!|At a minimum :* [[How to make a backup|Make a Gramps XML Backup]]* Prefix the name of your test family trees '<code>a_test</code>'a_test_nameeg:'<code>a_test_FamilyTreeName</code>'. By starting with <code>'a_test'</code> they will show at the top of the {{man label|Family Tree}} manager, and the word '''test''' makes it clear what they are created for.}}
== Mac OS X ==
{{man tip|Whichever editor you use|Make sure that it is set up so that the indent level is 4 spaces. Do not use the Tab character to indent.}}
The following list of text editors are in alphabetic order. Choose the one text editor you like to work with. If your favourite text Editor is not listed you can add it and describe how to set it up here.
=== Eclipse + PyDev ===
=== PyCharm ===
[https://www.jetbrains.com/pycharm/ PyCharm] is more powerful and out-of-the-box than Eclipse with pydev, although it is not Free Software like Eclipse is. Seems But seems to be recognizing more Python syntax and feels faster on my box. I unpacked the distribution, launched bin/pycharm.sh script, and it just worked. 'File » Open Directory' and selected the "Gramps/src" directory in my local checked out Git WD, and things work from there.
'Version Control » Update Project' automatically syncs up with the Git repository.
[http://scribes.sourceforge.net/ Scribes] is a text editor written in python and Gtk, that uniquely blends simplicity with well researched powerful functions.
=== Other ===(If you have a favourite Editor and want to share it : describe how to set it up here.) ====Kate====
[https://kate-editor.org/ Kate] works well as a general editor for Python. It also recognizes key words of Python and marks them in colours. Kate is a Linux KDE desktop program. Of course, it also works on gnome installations.
====Idle====
'''Idle''' is a handy simple editor that takes advantage of the interpreter features of Python. Often Idle comes with Python packages. Idle works well in Linux and other OS's, including the "dominant OS". If you install Windows version of Python, you will probably install from the same package Idle. One feature of Idle tends to confuse newcomers: Idle main window is NOT used for program writing, but for displaying the results. Notice that there is a Python tutorial, automagically installed with Idle on a Windows box. It is worth noting that the Tutorial gives quite extensive introduction into Python and is authored by the originator of Python: Guido van Rossum.
== Get the source tree ==
To get the source tree, you will need Git. Please have a look at read the dedicated tutorial [[Brief introduction to Git]] for details.
You can also use a graphical Git tool like "[https://git-scm.com/docs/gitk/ gitk(The Git repository browser)]" or "[https://git-scm.com/docs/git-gui/ git-gui( A portable graphical interface to Git)]".
'''This tutorial now assumes you have cloned the Gramps repository into a directory called "<code>~/Gramps"</code>. If not, you have to change this path when it is used below.'''
{{man warn|Warning:|Let it be clear that the settings directory <code>"~/.gramps/"</code> is a '''different''' hidden directory in your home-dir. Do not store anything there.''}}
== Run Gramps from the source ==
== Correct Translation in development ==
{{man warn|'''To check be checked if following is still current!'''}}{{stub}}
Warning: you will not be able to load translations on /usr/local/share/locale, because you will load /usr/share/locale, which could be translations for stable release (set on grampsapp.py).
You may generate a custom launcher by adding this line:
* [[Using database API]]
* [https://www.gramps-project.org/docs/ API Code Documentation] - Gramps current release.
* [[Devhelp]]- How to include [https://gramps-project.org/docs/ Gramps API] into the Devhelp index.
* [[Committing policies]]
1,969
edits

Navigation menu