Skip to content
David Leoni edited this page Nov 15, 2015 · 67 revisions

Jackan

Guidelines

Maven snapshots

Testing

Portals to test


In this wiki we only put information about development of Jackan. For usage information please refer to the project website

For information about CKAN API and DCAT see the right sidebar.

Guidelines

For contributing to Jackan we follow the same guidelines and procedures described in tod-commons wiki

In general we don't aim to cover all ckan api, if there are two ways to obtain the same result we just implement one and make sure it works.

Maven snapshots

WARNING: THIS IS A DEVELOPMENT VERSION THAT CAN CHANGE AT ANY TIME, DO NOT USE IT IN PRODUCTION

To use snapshots version in Maven, add this to your pom.xml:

  <repositories>
    <repository>
        <id>sonatype-nexus-snapshots</id>
        <name>project</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>            
    </repository>        
</repositories>

in the dependencies section, add:

    <dependency>
      <groupId>eu.trentorise.opendata</groupId>
      <artifactId>jackan</artifactId>
      <version>0.4.1-SNAPSHOT</version>
    </dependency>

Snapshot deployment

Snapshot deployment is done on Sonatype: https://oss.sonatype.org/content/repositories/snapshots/eu/trentorise/opendata/jackan/

    mvn clean deploy

Testing

There are normal Junit tests and also integration tests. JUnit tests are run during build process while integration tests are run in the proper Maven integration-test phase. Integration tests all have filenames ending with IT.java

To run the integration tests:


mvn integration-test

In order to tune logging for your needs and for the tests that write into catalogs to work you need to:

  1. Copy *.properties files of the folder src/test/resources_into the folder conf in the root of the project
  2. Edit the file conf/jackan.test.properties with your catalog credentials

Portals to test

As reference portals we take dati.trentino.it and dati.toscana.it . All reading tests must pass for these catalogs. For writing tests, we currently only test against dati.trentino.it version. In the future we might set up some travis build that downloads latest ckan and writes into it. Sometimes we also test against latest ckan in demo.ckan.org.

Further portals we will consider for testing are listed in ckan-instances.txt file.

There is also available a complete report with test runs for all these catalogs made by CkanTestReporter app. The reporter can be run with command:

 mvn exec:java -Dexec.mainClass="eu.trentorise.opendata.jackan.test.ckan.CkanTestReporter"  -Dexec.classpathScope="test"

Multilingual portals

Switzerland has a pilot CKAN portal:

http://www.opendata.admin.ch

It's interesting because it has multilingual data, for example here you have same dataset description in 4 languages (!): German French English Italian

Multilingual info doesn't seem exposed in the api: (at least Switlerland's 'default' one and '/en' one)

Vanilla CKAN has so called Multilingual extension , but Canadian open data devs say they had to build a new extension from scratch to handle multilinguism properly.

Clone this wiki locally