Skip to content

laws-africa/indigo

Folders and files

NameName
Last commit message
Last commit date
Jan 9, 2025
Apr 15, 2018
Dec 14, 2023
Jan 6, 2025
Jul 22, 2024
Mar 3, 2025
Mar 24, 2025
Mar 19, 2025
Oct 17, 2024
Aug 14, 2024
Sep 30, 2024
Jul 14, 2024
Aug 30, 2024
Mar 11, 2015
Jun 11, 2018
May 20, 2024
Aug 14, 2024
Jan 12, 2015
Aug 13, 2020
Aug 14, 2024
May 14, 2020
May 3, 2024
Jun 23, 2023
Jan 9, 2025
May 3, 2024
Jan 12, 2015
Feb 21, 2025
Feb 21, 2025
Mar 19, 2025
Jul 29, 2018
Aug 12, 2024
Apr 17, 2022
Aug 14, 2024

Repository files navigation

Indigo

Build status Coverage Status

Indigo logo

Indigo is Laws.Africa's legislation database for managing, consolidating and publishing legislation in the Akoma Ntoso format.

It is a Django python web application using:

  • Django
  • Cobalt -- a lightweight Python library for working with Akoma Ntoso
  • Bluebell -- a generic Akoma Ntoso 3 parser, supporting all hierarchical elements and multiple document types
  • django-rest-framework

Read the full documentation at indigo.readthedocs.io.

Local development

Refer to https://indigo.readthedocs.io/en/latest/running/index.html

Adding translation strings

Each indigo package has its own translations in the locale directory, and Javascript translations are in static/i18n. Translations for strings are added on CrowdIn.

If you have added or changed strings that need translating, you must tell Django to update the .po files so that translations can be supplied through CrowdIn.

scripts/extract-translations.sh
npm run extract-translations

And then commit the changes. CrowdIn will pick up any changed strings and make them available for translation. Once they are translated, it will open a pull request to merge the changes into master.

Once merged into master, you must tell Django to compile the .po files to .mo files:

python manage.py compilemessages

And then commit the changes.

npm module dependencies

Indigo is migrating to modules written in ES6 using Vue. This code needs to be compiled into a single JS file using webpack.

npm install
npx webpack

During development, using npx webpack -w to watch for changes and recompile automatically.

Testing

To run the tests use:

python manage.py test

Production deployment

Read the documentation for details on deploying Indigo.

An example Dockerfile and docker-compose.yml are provided as a starting point for running Indigo.

Releasing a New Version

  1. Run the tests!
  2. Update __version__ in indigo/version.py appropriately
  3. Update docs/changelog.rst
  4. Commit changes
  5. Tag: git tag vX.X.X and push to github git push; git push --tags

License and Copyright

The project is licensed under a GNU GPL 3 license.

Indigo is Copyright 2015-2020 AfricanLII.