<commit_before>[![Build status](https://github.com/geosolutions-it/ckanext-dcatapit/actions/workflows/test.yml/badge.svg)](https://github.com/geosolutions-it/ckanext-dcatapit/actions/workflows/test.yml)
[![Code Coverage](https://codecov.io/github/geosolutions-it/ckanext-dcatapit/coverage.svg?branch=master)](https://codecov.io/github/geosolutions-it/ckanext-dcatapit?branch=master)

# ckanext-dcatapit
CKAN extension for the Italian Open Data Portals (DCAT_AP-IT).

## Contents

- [Overview](#overview)
- [License](#license)
- [Demo Instance](#demo-instance)
- [Requirements](#requirements)
- [Installation](#installation)
- [Development Installation](#development-installation)
- [Running the Tests](#running-the-tests)
- [DCAT_AP-IT CSW Harvester](#dcat_ap-it-csw-harvester)
    - [CSW Metadata Guidelines](#csw-metadata-guidelines)
- [Test Instance and Validation](#test-instance-and-validation)
- [Extending the package schema in your own extension](#extending-the-package-schema-in-your-own-extension)
- [Managing translations](#managing-translations)
    - [Creating a new translation](#creating-a-new-translation)
    - [Updating an existing translation](#updating-an-existing-translation)
- [Updating an old installation](#updating-an-old-installation)
- [Contributing](#contributing)
- [Support, Communication and Credits](#support-communication-and-credits)

## License

**ckanext-dcatapit** is Free and Open Source software and is licensed under the [GNU Affero General Public License (AGPL) v3.0](http://www.fsf.org/licensing/licenses/agpl-3.0.html).


## Demo Instance

A demo instance can be found [here](http://dcatapit.geo-solutions.it/).

## Overview 

This extension provides plugins that allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized according to the [Italian DCAT Application Profile](https://www.dati.gov.it/content/dcat-ap-it-v10-profilo-italiano-dcat-ap-0). The Data Catalog Vocabulary (DCAT) is "an RDF vocabulary designed to facilitate interoperability between data catalogs published on the Web".

Also, if enabled, this extension improves dataset form look'n'feel. See [Dataset form](#dataset-form)

## Requirements

The ckanext-dcatapit extension is compatible with CKAN 2.9 and Python 3.7 (master branch).  
Previous version ([tagged `dcatapit-1.0.0`](https://github.com/geosolutions-it/ckanext-dcatapit/tree/dcatapit-1.0.0) has been developed for CKAN 2.4 and should be compatible with CKAN upto 2.8.

The dcatap-it plugins extend the functionalities of the [ckanext-dcat plugins](https://github.com/ckan/ckanext-dcat).

In order to use the dcatapit CSW harvester functionalities, you need to install also the [ckanext-spatial](https://github.com/ckan/ckanext-spatial) extension.

If you want to manage localized fields, the ckanext-dcatapit extension requires also the [ckanext-multilang plugin](https://github.com/geosolutions-it/ckanext-multilang) installed (see the [WIKI](https://github.com/geosolutions-it/ckanext-multilang/wiki) for more details about that).

## Installation

1. (**Optional**) Install the **ckanext-spatial** extension as described [here](https://github.com/ckan/ckanext-spatial). Install this extension only if you need to use the dcatapit CSW harvester (see below).

1. (**Optional but recommended**) The ckanext-dcatapit extension allows to localize the package fields (eg. title,
   description etc.) according to the schema definition; in order to be able to do it, you need the **ckanext-multilang** extension installed.
   
   If you also need to use the localized resources feature provided by the
   [multilang_resources](https://github.com/geosolutions-it/ckanext-multilang/wiki/Plugin-multilang_resources) plugin in the `ckanext-multilang` extension,
   you'll have to define:
   
        ckanext.dcatapit.localized_resources = True
        
   Also make sure NOT to have the `multilang_resources` directly listed in your `ckan.plugins` line, or it will conflict with the
   internal mechanism of plugin handling.

1. Install the **ckanext-dcat** extension as described [here](https://github.com/ckan/ckanext-dcat/blob/master/README.md#installation).<commit_msg>README: ckanext-multilang is required<commit_after>[![Build status](https://github.com/geosolutions-it/ckanext-dcatapit/actions/workflows/test.yml/badge.svg)](https://github.com/geosolutions-it/ckanext-dcatapit/actions/workflows/test.yml)
[![Code Coverage](https://codecov.io/github/geosolutions-it/ckanext-dcatapit/coverage.svg?branch=master)](https://codecov.io/github/geosolutions-it/ckanext-dcatapit?branch=master)

# ckanext-dcatapit
CKAN extension for the Italian Open Data Portals (DCAT_AP-IT).

## Contents

- [Overview](#overview)
- [License](#license)
- [Demo Instance](#demo-instance)
- [Requirements](#requirements)
- [Installation](#installation)
- [Development Installation](#development-installation)
- [Running the Tests](#running-the-tests)
- [DCAT_AP-IT CSW Harvester](#dcat_ap-it-csw-harvester)
    - [CSW Metadata Guidelines](#csw-metadata-guidelines)
- [Test Instance and Validation](#test-instance-and-validation)
- [Extending the package schema in your own extension](#extending-the-package-schema-in-your-own-extension)
- [Managing translations](#managing-translations)
    - [Creating a new translation](#creating-a-new-translation)
    - [Updating an existing translation](#updating-an-existing-translation)
- [Updating an old installation](#updating-an-old-installation)
- [Contributing](#contributing)
- [Support, Communication and Credits](#support-communication-and-credits)

## License

**ckanext-dcatapit** is Free and Open Source software and is licensed under the [GNU Affero General Public License (AGPL) v3.0](http://www.fsf.org/licensing/licenses/agpl-3.0.html).


## Demo Instance

A demo instance can be found [here](http://dcatapit.geo-solutions.it/).

## Overview 

This extension provides plugins that allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized according to the [Italian DCAT Application Profile](https://www.dati.gov.it/content/dcat-ap-it-v10-profilo-italiano-dcat-ap-0). The Data Catalog Vocabulary (DCAT) is "an RDF vocabulary designed to facilitate interoperability between data catalogs published on the Web".

Also, if enabled, this extension improves dataset form look'n'feel. See [Dataset form](#dataset-form)

## Requirements

The ckanext-dcatapit extension is compatible with CKAN 2.9 and Python 3.7 (master branch).  
Previous version ([tagged `dcatapit-1.0.0`](https://github.com/geosolutions-it/ckanext-dcatapit/tree/dcatapit-1.0.0) has been developed for CKAN 2.4 and should be compatible with CKAN upto 2.8.

The dcatap-it plugins extend the functionalities of the [ckanext-dcat plugins](https://github.com/ckan/ckanext-dcat).

In order to use the dcatapit CSW harvester functionalities, you need to install also the [ckanext-spatial](https://github.com/ckan/ckanext-spatial) extension.

If you want to manage localized fields, the ckanext-dcatapit extension requires also the [ckanext-multilang plugin](https://github.com/geosolutions-it/ckanext-multilang) installed (see the [WIKI](https://github.com/geosolutions-it/ckanext-multilang/wiki) for more details about that).

## Installation

1. (**Optional**) Install the **ckanext-spatial** extension as described [here](https://github.com/ckan/ckanext-spatial). Install this extension only if you need to use the dcatapit CSW harvester (see below).

1. The ckanext-dcatapit extension allows to localize the package fields (eg. title, description etc.) according to the schema definition; in order to be able to do it, you need the **ckanext-multilang** extension installed.
   
   If you also need to use the localized resources feature provided by the
   [multilang_resources](https://github.com/geosolutions-it/ckanext-multilang/wiki/Plugin-multilang_resources) plugin in the `ckanext-multilang` extension,
   you'll have to define:
   
        ckanext.dcatapit.localized_resources = True
        
   Also make sure NOT to have the `multilang_resources` directly listed in your `ckan.plugins` line, or it will conflict with the
   internal mechanism of plugin handling.

1. Install the **ckanext-dcat** extension as described [here](https://github.com/ckan/ckanext-dcat/blob/master/README.md#installation).
{'fraction_non_alphanumeric': 0.1172380724046991, 'fraction_numerical': 0.005754015823543515, 'mean_word_length': 5.0500362581580855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 26, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2383327', 'n_tokens_mistral': 2709, 'n_tokens_neox': 2581, 'n_words': 705}