uData content recommendations bridge
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
requirements
tests
udata_recommendations
.gitignore
.pyup.yml
CHANGELOG.md
LICENSE
MANIFEST.in
README.md
bumpr.rc
setup.cfg
setup.py
tasks.py

README.md

udata-recommendations

This plugin acts as a bridge between uData and a recommendation system.

In our case (data.gouv.fr), it's a set of scripts living here https://github.com/etalab/datasets_reco.

Compatibility

udata-recommendations requires Python 2.7+ and uData.

Installation

Install uData.

Remain in the same virtual environment (for Python) and use the same version of npm (for JS).

Install udata-recommendations:

pip install udata-recommendations

Modify your local configuration file of udata (typically, udata.cfg) as following:

PLUGINS = ['recommendations']
RECOMMENDATIONS_DATASETS_SOURCE_URL = 'http://path/to/recommendations.json'

Then run the command to fetch recommendations:

udata recommendations datasets

Expectations

This plugin expects the following format to provide datasets recommendations:

{
    "id": "dataset-id",
    "recommendations": [
        {
            "id": "dataset-recommended-1"
        },
        {
            "id": "dataset-recommended-2"
        }
    ]
}