geosolutions-it / ckanext-umbria

GNU Affero General Public License v3.0
0 stars 0 forks source link

Tests

ckanext-umbria

Custom extension for Regione Umbria.

Based on ckanext-geosolutions-ui

Installation

With CKAN virtualenv in Linux Machine

  1. Activate your CKAN virtual environment, for example:

     . /usr/lib/ckan/default/bin/activate
  2. Clone the source and install it on the virtualenv

    git clone https://github.com/geosolutions-it/ckanext-umbria.git
    cd ckanext-umbria
    pip install -r requirements.txt
    pip install -e .
  3. Add umbria to the ckan.plugins setting in your CKAN ini file

    vim /etc/ckan/default/ckan.ini
  4. Add umbria_dcat_ap to the ckanext.dcat.rdf.profiles setting in your CKAN ini file, so that it reads:

    ckanext.dcat.rdf.profiles = euro_dcat_ap it_dcat_ap umbria_dcat_ap
  5. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:

     sudo service apache2 reload

With Docker

ckan docker setup

  1. add the plugin to the production.ini config

    #this command have to run inside docker
    vim /etc/ckan/production.ini
  2. append the name of plugin in the list and set debug equal true (both are in the file)

    debug = true
    ....
    
    ckan.plugins = stats text_view image_view recline_view umbria
  3. detach from docker container bash shell and restart ckan docker

    docker-compose restart ckan

    Usage

  1. Style

In the less folder, is possibile change the less variables, to have a basic style customization.

To change the logo file, in header and footer override the file

or change the logo var in

  1. Change footer info

    templates/footer.html change this var

        {% set logo = '/base/img/logo.png' %}
        {% set domain = 'http://www.regione.umbria.it/' %}
        {% set customer = 'About Regione Umbria' %}
        {% set landingPage = 'about' %}
        {% set powerdByDomain = 'https://www.geosolutionsgroup.com/' %}
        {% set powerdBy = 'GeoSolutions' %}
  2. Minimize main.css file

        npm run compile-css

Tests

To run the tests, do:

    pytest --ckan-ini=test.ini

License

AGPL