Development¶
Get the code and the dependencies¶
Clone the repository:
$ git clone https://git.entrouvert.org/authentic.git
Install lasso python packages:
$ curl https://deb.entrouvert.org/entrouvert.gpg | sudo apt-key add - $ echo deb http://deb.entrouvert.org/ buster main | \ sudo tee /etc/apt/sources.list.d/entrouvert.list $ sudo apt-get update $ sudo apt-get install python-lasso python3-lassoInstall dependencies:
$ sudo apt-get install postgresql build-essential gettext sassc \ libldap2-dev libsasl2-dev python3-dev
Run the tests¶
Setup a virtualenv:
$ sudo apt-get install direnv $ echo layout python3 > authentic/.envrc $ direnv allow authentic $ cd authentic $ pip install tox
Run:
$ JENKINS_URL=fakeurl pg_virtualenv tox
Note
tests/test_ldap.py will fail if apparmor_status reports that /usr/sbin/slapd is in enforce mode.
Note
Setting JENKINS_URL instructs tox to run [tox:jenkins] instead of the default [tox].
Run with code coverage:
$ pg_virtualenv tox < /dev/null $ firefox htmlcov/index.html
Note
When running from an interactive shell < /dev/null unsets the tty tox sub-type and defines the COVERAGE variable.
Update translations¶
They are updated upstream before the releases to help keep the vocabulary consistent.
Note
The only exception would be a trivial fix such as a typo.
The .po files can be updated as follows:
$ ./update-locales.sh
Build the documentation¶
Clone the repository:
$ git clone https://git.entrouvert.org/authentic2-doc.git
Setup a virtualenv:
$ sudo apt-get install direnv $ echo layout python3 > authentic2-doc/.envrc $ direnv allow authentic2-doc $ cd authentic2-doc $ pip install sphinx
Build:
$ make html
Display:
$ firefox _build/html/index.html