Code Monkey home page Code Monkey logo

ckanext-desq's Introduction

ckanext-desq

Customizations for DESQ. This CKAN plugin is not designed to be generic or easily applicable to other data portals. It requires specific changes to the CKAN configuration and the Solr schema.

Requirements

  • Python 3.9
  • Ubuntu packages required by PyICU:
    sudo apt install libicu-dev python3-icu pkg-config
  • CKAN 2.9.5 fork, installed with:
    pip install -e 'git+https://github.com/whiskyechobravo/[email protected]#egg=ckan[requirements]'

Tested under Ubuntu 20.04 and 22.04.

Installation

  1. Activate your CKAN virtualenv, for example:

    . /usr/lib/ckan/default/bin/activate
  2. Install ckanext-desq in the virtualenv:

    pip install -e 'git+https://github.com/whiskyechobravo/ckanext-desq.git#egg=ckanext-desq'

    That will also install some dependencies (listed in ckanext-desq/setup.cfg).

  3. Use config/ckan/sample.ini as a replacement to /etc/ckan/default/ckan.ini, but edit the following settings:

    • beaker.session.secret
    • sqlalchemy.url
    • api_token.jwt.encode.secret
    • api_token.jwt.decode.secret
    • solr_url
    • solr_user
    • solr_password
    • licenses_group_url (must link to ckanext-desq/config/ckan/licenses.json)
    • ckan.storage_path (if need to change from /var/lib/ckan/default)
  4. Copy the required webfonts to the ckanext/desq/public/webfonts/ directory.

  5. Restart CKAN. Assuming it's installed as a systemd service:

    sudo service ckan restart

Performing manual backup and restore

References:

Backup:

sudo -u postgres pg_dump --format=custom -d ckan_default > desq-$(date +%Y%m%d-%H%M).pgdump

Restore (replace path to .ini file if necessary):

ckan -c /etc/ckan/default/ckan.ini db clean
sudo -u postgres pg_restore --clean --if-exists -d ckan_default < desq-YYYYMMDD-HHMM.pgdump
ckan -c /etc/ckan/default/ckan.ini search-index rebuild

Managing translations

References:

Creating the .pot file:

python setup.py extract_messages

Creating a .po file for a locale:

python setup.py init_catalog --locale LANG

Updating existing translations:

python setup.py update_catalog --locale LANG

Compile translations into a .mo file:

python setup.py compile_catalog --locale LANG

The binary .mo file is commited to the repository for ease of deployment.

ckanext-desq's People

Contributors

davidlesieur avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.