wiki:DevWikiMain/DevForDummy

This page is a step by step guide for contributing to PostGIS


Workflow:

  • Fork https://github.com/postgis/postgis
  • clone the forked postgis on your computer
  • compile (everything should be ok)
    • ./autogen.sh
    • ./configure
    • make
    • sudo make install
  • if big new feature
    • discuss on the dev mailing list or on irc.freenode.org #postgis
  • if bug correction
    • create / update tickets
  • if minor changes (no API break)
    • directly work on it
  • in all case : create a branch with a telling name (what you will be working on)
  • to code
    • start from SQL looking for the function definition and the associated C function
    • look for C function in postgis sources, and look if the postgis function calls a libgeom function
    • etc
  • if changing existing function signature
    • you need to change the 'postgis_drop_before.sql' to get rid of the old functions
  • to test
    • if libgeom : CUnit
      • cd liblwgeom/cunit/
      • make check
    • test at the postgres level (before submitting the code) -writting/changing test
      • go in regress folder
      • look for the most promising dummy.sql file
      • create a query with a distinct text_id as the first column
      • add corresponding correct answer in dummy_expected file. Warning, line order matters
      • if modifying regress_ogc
        • be carefull, the function will be tested against sfcgal kernel and regular kernel
        • a 2nd expecteed result file must be changed in sfcgal folder
    • testing
      • make
      • make check
      • sudo make install
      • make installcheck
      • (optional) if testing from a client, server restart may be requiered
    • limited testing
      • to test only one function, go in the regress folder, execute './run_test.pl regress_dummy', regress_dummy shall not have extension.
  • to document (mandatory)
    • go in doc folder
    • open the relevant dummy.xml (XML is in docbook format)
    • modify/add the function.
      • Warning, optionnal arg have a perticular syntax
      • Warning, version must be noted
    • test doc with make ...
  • to debug
    • adding a log message : elog(NOTICE, "MESSAGE");


Last modified 9 years ago Last modified on 02/24/16 09:39:30
Note: See TracWiki for help on using the wiki.