Introducing gPrime

gPrime is a new browser-based genealogy program descended from Gramps, and this is a new blog to describe and discuss it. gPrime is designed to become a modern, easy-to-use genealogy program for the 21st century. Specifically it is designed:

  • for collaboration – multi-user ready
  • powerful, easy to use search – select exactly what you want to see with a Google-like text search
  • with security in mind, to keep your information safe and private
  • for very large family trees
  • for future generations
  • for long term and modern technologies – robust database and storage formats
  • for the modern genealogist, including flexible gender categories
  • browser-based interface – works locally, on a server, and on mobile platforms such as Android, iPhones, iPads, etc.

gPrime uses the JSON format for storing all data. This makes your data safer than other programs (Gramps uses “pickled” data which is a security issue, and may not be available to decode for future generations as it has changed over time). gPrime uses modern SQL databases (sqlite, MySQL, and PostgreSQL), although it does not use relational structures.

gPrime is designed so that you can select a subset of any genealogical data based on any criteria. For example, if you want to search common fields, you just enter the information, selected by commas. For example, entering this in the search field:

Smith, Amber

would search common fields for “Smith” and “Amber” and show those that have both. You can also specific which fields to search, like this:

surname=Smith, given=Amber

Finally, you can search for any specific bit of information, if you know how that is specified in the data. For example, imagine that you wanted to find all people who have a father named “Edwin”, then you could enter:

parent_family_list.father_handle.primary_name.first_name=Edwin%

That is a little complicated, but the point is that you do not need to wait for a programmer to add a special filter to search for something, nor do you need a complex set of combinations of filters to select items based on simple values. We’ll try to make this easier, too, over time.

The goal is to make gPrime complete by July 2017, but it is already somewhat usable. See the github software repository for instructions. We’ll cover more details about how to install, test, and help.

38 thoughts on “Introducing gPrime

    1. Great question! The design of the database backend can be swapped out fairly easily if we want to allow MongoDB, or some as yet not created database engine.

      But I decided that for now we want to support as many operating systems in as robust a fashion as possible. So, we went with the best choice: sqlite. But rather than targeting just sqlite, it is written in abstract SQL (DB-API 2.0) so other SQL backends can also be used.

      Like

  1. Thank you, I’ll have a go at it, though it will likely be n fits and starts depending on how well I make out and what else needs attention 🙂

    Like

  2. Being quite new to this sort of thing, now that I have Anaconda installed,
    what sort of interface/environment would you recommend to start with?
    conda/Navigator/Jupyter/IP/Spyder?? Others?

    Like

    1. You don’t need any development tools to just run a local copy for testing. If you want to look/edit the code, then Jupyter, IPython, or Spyder will work fine. I use emacs.

      This is fine for now.

      Like

  3. Thank you, Doug
    Right now I have installed Anaconda and gprime using pip, as explained on the github page.
    I have gprime in my AppData\Roaming\Python directories – I am running Win 10 – but that is where I am stuck. I have tried to continue on from ‘Getting Started’, but have not found the proper place or incantations yet.
    In the Anaconda prompt window, I have:
    (C:\Users\Arnold\Anaconda3) C:\Users\Arnold>python
    Python 3.5.2 |Anaconda custom (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
    Type “help”, “copyright”, “credits” or “license” for more information.
    >>>quit()
    So I know I have python available.
    Where and how do I start a test server as a first effort 🙂
    gprime code is present in several places:
    C:\Users\Arnold\AppData\Roaming\Python\Python35\site-packages\gprime\
    C:\Users\Arnold\AppData\Roaming\Python\share\gprime
    c:\Users\Arnold\AppData\Roaming\Python\Python35\Scripts\gprime.exe
    I have tried a few things, but no success and lots of different error messages 😦

    Like

      1. In an admin DOS box, I cd’d to the scripts dir and tried:
        ——————————-
        C:\Windows\system32>cd \users\Arnold\AppData\Roaming\Python\Python35\Scripts

        C:\Users\Arnold\AppData\Roaming\Python\Python35\Scripts>gprime.exe
        .gprime.utils.locale.WARNING: ICU not loaded because No module named ‘PyICU’. Localization will be impaired. Use your package manager to install PyICU
        .gprime.utils.locale.WARNING: Localization library libintl not on %PATH%, localization will be incomplete
        Traceback (most recent call last):
        File “c:\users\arnold\anaconda3\lib\runpy.py”, line 184, in _run_module_as_main
        “__main__”, mod_spec)
        File “c:\users\arnold\anaconda3\lib\runpy.py”, line 85, in _run_code
        exec(code, run_globals)
        File “C:\Users\Arnold\AppData\Roaming\Python\Python35\Scripts\gprime.exe\__main__.py”, line 9, in
        File “C:\Users\Arnold\AppData\Roaming\Python\Python35\site-packages\gprime\app\app.py”, line 380, in main
        raise Exception(“–site-dir=NAME was not provided”)
        Exception: –site-dir=NAME was not provided
        ——————-
        So I created d:\FamilyTree and then tried again:

        C:\Users\Arnold\AppData\Roaming\Python\Python35\Scripts>gprime.exe –site-dir=”d:\FamilyTree” –create=”My Family Tree”
        .gprime.utils.locale.WARNING: ICU not loaded because No module named ‘PyICU’. Localization will be impaired. Use your package manager to install PyICU
        .gprime.utils.locale.WARNING: Localization library libintl not on %PATH%, localization will be incomplete
        Traceback (most recent call last):
        File “c:\users\arnold\anaconda3\lib\runpy.py”, line 184, in _run_module_as_main
        “__main__”, mod_spec)
        File “c:\users\arnold\anaconda3\lib\runpy.py”, line 85, in _run_code
        exec(code, run_globals)
        File “C:\Users\Arnold\AppData\Roaming\Python\Python35\Scripts\gprime.exe\__main__.py”, line 9, in
        File “C:\Users\Arnold\AppData\Roaming\Python\Python35\site-packages\gprime\app\app.py”, line 396, in main
        os.makedirs(options.site_dir)
        File “c:\users\arnold\anaconda3\lib\os.py”, line 231, in makedirs
        makedirs(head, mode, exist_ok)
        File “c:\users\arnold\anaconda3\lib\os.py”, line 241, in makedirs
        mkdir(name, mode)
        PermissionError: [WinError 5] Access is denied: ‘d:\\’

        C:\Users\Arnold\AppData\Roaming\Python\Python35\Scripts>
        ——————
        I was hoping that all those extra libs would be part of the installation.
        Tried the same in an Anaconda prompt, with the same results

        Like

  4. Dropping the path of the ‘family tree’ I get:

    (C:\Users\Arnold\Anaconda3) C:\Users\Arnold\AppData\Roaming\Python\Python35\Scripts>gprime –site-dir=”FamilyTree” –create=”My Family Tree”
    .gprime.utils.locale.WARNING: ICU not loaded because No module named ‘PyICU’. Localization will be impaired. Use your package manager to install PyICU
    .gprime.utils.locale.WARNING: Localization library libintl not on %PATH%, localization will be incomplete
    Traceback (most recent call last):
    File “c:\users\arnold\anaconda3\lib\runpy.py”, line 184, in _run_module_as_main
    “__main__”, mod_spec)
    File “c:\users\arnold\anaconda3\lib\runpy.py”, line 85, in _run_code
    exec(code, run_globals)
    File “C:\Users\Arnold\AppData\Roaming\Python\Python35\Scripts\gprime.exe\__main__.py”, line 9, in
    File “C:\Users\Arnold\AppData\Roaming\Python\Python35\site-packages\gprime\app\app.py”, line 398, in main
    DbState().create_database(database_dir, options.create)
    File “C:\Users\Arnold\AppData\Roaming\Python\Python35\site-packages\gprime\dbstate.py”, line 240, in create_database
    db.write_version(dirpath)
    File “C:\Users\Arnold\AppData\Roaming\Python\Python35\site-packages\gprime\plugins\db\dbapi\dbapi.py”, line 141, in write_version
    shutil.copy2(settings_ini, directory)
    File “c:\users\arnold\anaconda3\lib\shutil.py”, line 251, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
    File “c:\users\arnold\anaconda3\lib\shutil.py”, line 114, in copyfile
    with open(src, ‘rb’) as fsrc:
    FileNotFoundError: [Errno 2] No such file or directory: ‘C:\\Users\\Arnold\\AppData\\Roaming\\Python\\Python35\\site-packages\\gprime\\plugins\\db\\dbapi\\settings.ini’
    ——————
    though a directory ‘FamilyTree is created in the scripts dir, so I have made some progress.
    Next I made sure both Scripts and site-packages were not write protected, but no difference.

    Like

    1. Two things:

      1) Looks like you are running older code. Try pip install gprime -U

      2) I think the proper way to specify the filename is:


      gprime.exe --site-dir="d:\\FamilyTree" --create="My Family Tree"

      or


      gprime.exe --site-dir="d:/FamilyTree" --create="My Family Tree"

      Like

      1. Sometimes – my last post was somewhat lengthy – possibly that was the issue.
        Basically, I had to move to another machine and downloading the latest gprime does not give me a gprime.exe.

        running the commands as given, without the ‘.exe’, gives me:
        C:\Windows\System32>gprime –site-dir=”d:/familytree” –create=”My Fanily Tree”
        .gprime.utils.locale.WARNING: ICU not loaded because No module named ‘PyICU’. Localization will be impaired. Use your package manager to install PyICU
        .gprime.utils.locale.WARNING: Localization library libintl not on %PATH%, localization will be incomplete
        Traceback (most recent call last):
        File “c:\users\arnold\anaconda3\lib\runpy.py”, line 184, in _run_module_as_main
        “__main__”, mod_spec)
        File “c:\users\arnold\anaconda3\lib\runpy.py”, line 85, in _run_code
        exec(code, run_globals)
        File “C:\Users\arnold\Anaconda3\Scripts\gprime.exe\__main__.py”, line 9, in
        File “c:\users\arnold\anaconda3\lib\site-packages\gprime\app\app.py”, line 398, in main
        DbState().create_database(database_dir, options.create)
        File “c:\users\arnold\anaconda3\lib\site-packages\gprime\dbstate.py”, line 240, in create_database
        db.write_version(dirpath)
        File “c:\users\arnold\anaconda3\lib\site-packages\gprime\plugins\db\dbapi\dbapi.py”, line 141, in write_version
        shutil.copy2(settings_ini, directory)
        File “c:\users\arnold\anaconda3\lib\shutil.py”, line 251, in copy2
        copyfile(src, dst, follow_symlinks=follow_symlinks)
        File “c:\users\arnold\anaconda3\lib\shutil.py”, line 114, in copyfile
        with open(src, ‘rb’) as fsrc:
        FileNotFoundError: [Errno 2] No such file or directory: ‘c:\\users\\arnold\\anaconda3\\lib\\site-packages\\gprime\\plugins\\db\\dbapi\\settings.ini’

        C:\Windows\System32>

        Like

    1. Yes, I did:
      C:\Users\Public\Public_Genealogy\gPrime0\gprime>pip install gprime -U
      Collecting gprime
      Downloading gprime-0.0.5-py2.py3-none-any.whl (10.6MB)
      100% |################################| 10.6MB 64kB/s
      Requirement already up-to-date: passlib in c:\users\arnold\anaconda3\lib\site-packages (from gprime)
      Requirement already up-to-date: pillow in c:\users\arnold\anaconda3\lib\site-packages (from gprime)
      Requirement already up-to-date: simplejson in c:\users\arnold\anaconda3\lib\site-packages (from gprime)
      Collecting meta (from gprime)
      Using cached meta-0.4.1.tar.gz
      Requirement already up-to-date: tornado in c:\users\arnold\anaconda3\lib\site-packages (from gprime)
      Collecting olefile (from pillow->gprime)
      Downloading olefile-0.44.zip (74kB)
      100% |################################| 81kB 1.7MB/s
      Building wheels for collected packages: meta, olefile
      Running setup.py bdist_wheel for meta … done
      Stored in directory: C:\Users\arnold\AppData\Local\pip\Cache\wheels\1f\8f\8b\768237a0185f3dc9b0b67b5053acf31a5eacd2ef7fb4c2389d
      Running setup.py bdist_wheel for olefile … done
      Stored in directory: C:\Users\arnold\AppData\Local\pip\Cache\wheels\20\58\49\cc7bd00345397059149a10b0259ef38b867935ea2ecff99a9b
      Successfully built meta olefile
      Installing collected packages: meta, gprime, olefile
      Found existing installation: meta –
      Uninstalling meta–:
      Successfully uninstalled meta–
      Successfully installed gprime-0.0.5 meta– olefile-0.44
      C:\Users\Public\Public_Genealogy\gPrime0\gprime>

      Liked by 5 people

  5. Trying to install pyICU:
    C:\Windows\System32>pip install pyICU
    Collecting pyICU
    Using cached PyICU-1.9.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
    File “”, line 1, in
    File “C:\Users\arnold\AppData\Local\Temp\pip-build-hjavfegl\pyICU\setup.py”, line 11, in
    ICU_VERSION = subprocess.check_output((‘icu-config’, ‘–version’)).strip()
    File “c:\users\arnold\anaconda3\lib\subprocess.py”, line 626, in check_output
    **kwargs).stdout
    File “c:\users\arnold\anaconda3\lib\subprocess.py”, line 693, in run
    with Popen(*popenargs, **kwargs) as process:
    File “c:\users\arnold\anaconda3\lib\subprocess.py”, line 947, in __init__
    restore_signals, start_new_session)
    File “c:\users\arnold\anaconda3\lib\subprocess.py”, line 1224, in _execute_child
    startupinfo)
    FileNotFoundError: [WinError 2] The system cannot find the file specified

    —————————————-
    Command “python setup.py egg_info” failed with error code 1 in C:\Users\arnold\AppData\Local\Temp\pip-build-hjavfegl\pyICU\

    C:\Windows\System32>

    Liked by 5 people

    1. Gramps AIO seems to have it, but moving PyICU-1.9.2-py3.5.egg-info, icu.py & PyICU.py from there to C:\Users\arnold\Anaconda3\Lib\site-packages did not help

      Liked by 5 people

  6. Finally, after re-installing the latest Anaconda 4.3.0 – updating some of the packages in the previous 4.2 version seemed to kill things – I was able to follow your instructions and use the gprime.exe to actually install and set up a demo installation.
    Thank you for work on gPrime & your help in getting me this far.

    Liked by 5 people

  7. Use your package manager to install PyICU
    . py egg_info” failed with error code 1 in C:\Users\arnold\AppData\Local\Temp\pip-build-hjavfegl\pyICU\
    C:\Windows\System32>

    Like

  8. The problem with PyICU is that it tries to compile the code, and so you need more tools on Windows.

    You might be able work around this for now by installing gprime without dependencies, and then installing just the ones that you need:

    pip install gprime –no-deps
    pip install tornado

    Like

  9. py egg_info” failed with error code 1 in C:\Users\arnold\AppData\Local\Temp\pip-build-hjavfegl\pyICU\
    C:\Windows\System32> Use your package manager to install PyICU
    .

    Like

    1. Good question. Here is my plan: gPrime really needs a modern Javascript/CSS framework. I have an idea in mind, but the framework isn’t quite finished yet. As soon as it is (or maybe slightly before) I’ll start re-implementing gPrime in it. So, my plan is to re-do everything from the ground up in this new framework. I’ll build a prototype around December 2017, and do some major development in the spring of 2018.

      Like

  10. Thanks for that. Could you give an overview of the functionality of the current code and what is missing or not working? From what I can see displaying items seems to be there, not sure about the editing/updating though.

    Cheers
    Martin

    Like

Leave a comment