Project

General

Profile

Git Workflow

You can make your own branch, or when working together follow these guideline with the branch dev_map as example.

- check in which branch you are (its the one with the asterix)

git branch

- checkout the branch you want to work on (if not already there)
git checkout dev_map

- before working get newest version e.g.
git pull origin dev_map

- do some work and when finished push changes
git commit -a -m "my commit message" 
git push origin dev_map

Version Update Routine

  • master merge
  • read /data/install/update.info for e.g. database updates
  • test application on local system (new features and add/edit)
  • check if someone is online
  • upload application on productive server
    /application (except /configs/password.ini)
    /data/documentation
    /data/language
    /library
    /public
    
  • inform newsletter-user about the update
  • update version on wiki startpage

Translations

When translating the first time:

cd openatlas
pybabel extract -F translations/babel.cfg -k lazy_gettext -o translations/messages.pot .
pybabel init -i translations/messages.pot -d translations -l de

Update existing translations:

cd openatlas
pybabel extract -F translations/babel.cfg -k lazy_gettext -o translations/messages.pot .
pybabel update -i translations/messages.pot -d translations

Archaeologically Expansion

#710 Value types

- define what else is needed (look into ostalpen project)

Recursive Events

To get all child events of a given event the SQL below (replace ROOT_EVENT_ID at bottom). It works but is slow and could be improved.

WITH RECURSIVE tree AS (
  SELECT e.id, ARRAY[]::INTEGER[] AS ancestors
  FROM model.entity e
  WHERE (SELECT s.id FROM model.entity s JOIN model.link l ON s.id = l.range_id AND l.domain_id = e.id AND l.property_id = (SELECT id FROM model.property WHERE code = 'P117')) IS NULL 
  UNION ALL 
  SELECT e.id, tree.ancestors || 
    (SELECT s.id FROM model.entity s JOIN model.link l ON s.id = l.range_id AND l.domain_id = e.id AND l.property_id = (SELECT id FROM model.property WHERE code = 'P117'))
  FROM model.entity e, tree
  WHERE (SELECT s.id FROM model.entity s JOIN model.link l ON s.id = l.range_id AND l.domain_id = e.id AND l.property_id = (SELECT id FROM model.property WHERE code = 'P117')) = tree.id
)
SELECT * FROM tree WHERE ROOT_EVENT_ID = ANY(tree.ancestors);

Flask

To turn of pin on dev machine:

export WERKZEUG_DEBUG_PIN=off