Giter VIP home page Giter VIP logo

cada.data.gouv.fr's Introduction

CADA

Build status Join the chat at https://gitter.im/etalab/cada

A simplistic interface to search and consult CADA advices.

This is the engine behind https://cada.data.gouv.fr.

Compatibility

CADA has been tested on Python 3.7, MongoDB 4.1 and ElasticSearch 7.2.

The ElasticSearch ICU Analysis plugin is required.

You can install it with:

elasticsearch-plugin install analysis-icu

Installation

You can install Cada with pip:

$ pip install cada

You need to create the cada working directory, denoted by $HOME in this documentation:

$ mkdir -p $HOME && cd $HOME
$ vim cada.cfg  # See configuration
$ wget https://cada.data.gouv.fr/export -O data.csv
$ cada load data.csv  # Load initial data
$ cada static  # Optional: collect static assets for proper caching
$ cada runserver

local development environment

Please make sure you are in a clean virtualenv.

$ git clone https://github.com/etalab/cada
$ cd cada
$ docker-compose up -d
$ pip install -e .
$ wget https://cada.data.gouv.fr/export -O data.csv
$ cada load data.csv
$ cada reindex
$ cada runserver

Configuration

All configuration is done through the cada.cfg file in $HOME. It's basically a Python file with constants defined in it:

  • SERVER_NAME: the public server name. Mainly used in emails.
  • SECRET_KEY: the common crypto hash. e.g. sessions. openssl rand -hex 24 should be a good start.
  • ELASTICSEARCH_URL: the ElasticSearch server URL in host:port format. Default to localhost:9200 if not set
  • MONGODB_SETTINGS: a dictionary to configure MongoDB. Default to {'DB': 'cada'}. See the official flask-mongoengine documentation for more details.

Mails

Mail server configuration is done through the following variables:

  • MAIL_SERVER: SMTP server hostname. Default to localhost.
  • MAIL_PORT: SMTP server port. Default to 25.
  • MAIL_USE_TLS: activate TLS. Default to False.
  • MAIL_USE_SSL: activate SSL. Default to False.
  • MAIL_USERNAME: optional SMTP server username.
  • MAIL_PASSWORD: optional SMTP server password.
  • MAIL_DEFAULT_SENDER: Sender email used for mailings. Default to cada@localhost.
  • ANON_ALERT_MAIL: destination mail for anonymisation alerts. Default to cada.alert@localhost.

See the official Flask-Mail documentation for more details.

Sentry

There is an optional support for Sentry. You need to install the required dependencies:

$ pip install raven[flask]
# Or to install it with cada
$ pip install cada[sentry]

You need to add your Sentry DSN to the configuration

SENTRY_DSN = 'https://xxxxx:[email protected]/id'

Piwik

There is an optional Piwik support. You simply need to add your Piwik server URL and your Piwik project ID to the configuration:

PIWIK_URL = 'piwik.mydomain.com'
PIWIK_ID = X

cada.data.gouv.fr's People

Contributors

antoineaugusti avatar davidbgk avatar gitter-badger avatar maudetes avatar noirbizarre avatar pborreli avatar restuccia avatar taniki avatar trojette avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cada.data.gouv.fr's Issues

installer annotator.js sur cada.data.gouv.fr

Pour faire pivoter subtilement le produit, cela pourrait être intéressant d'installer annotator.js pour pouvoir faire de la supervision de détection d'entités nommées (articles de loi, institutions, etc) et de générer le jeu de données idoines.

Cela permettrait aussi de proposer une interface utilisateur plus simple pour les signalements de défaut d'anonymisation.

Il y a peut être un module plus récent que annotator.js mais je n'en ai pas trouvé.

générer une version brute de la base de données

Actuellement la base de données ne comporte que les avis modifiés depuis le début de cette application. Cela peut être utile de détecter les avis qui ont été modifiés pour diverses raisons.

solution possible

Créer une nouvelle commande cli qui importerait toutes les avis publiés par la cada et qui rajouterait le contenu dans un colonne content_raw.

Internal Server Error

Internal Server Error on this URL : https://cada.data.gouv.fr/20182193 related to this :
"Avis 20182193
Ministère de l'enseignement supérieur, de la recherche et de l'innovation
Communication par publication du code source de la plateforme Parcoursup".

Nom consistant pour les conclusions comportant un slash

Bonjour,

Actuellement, les valeurs possibles pour les conclusions sont les suivantes :

  • Défavorable/Vie privée
  • Favorable
  • Favorable / Sauf vie privée
  • Favorable/Sauf commercial industriel
  • Favorable/Sauf comportement
  • Favorable/Sauf vie privée
  • Sans objet / Communiqué
  • Sans objet / Inexistant
  • Sans objet/Communiqué
  • Sans objet/Inexistant

Je propose de rassembler les conclusions qui ont un espace avant ou un après le slash. Ceci est fait en supprimant les espaces avant et après le slash séparateur.

J'ai proposé ceci dans la PR #22

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.