make init
.pre-commit install
.make seed
.make test
to run the test suite.Scraping data from people is done in two steps:
make import_people
from the https://namenlijst.rechtspraak.nl/Services/WebNamenlijstService/Zoek
service. These people are saved.https://namenlijst.rechtspraak.nl/Services/WebNamenlijstService/haalOp/?id=<rechtspraak_id>
where rechtspraak_id
is a unique ID assigned by namenlijst.rechtspraak.nl
to the person.Similarly, two commands exist for scraping verdicts and enriching them.
make import_verdicts
.make enrich_verdicts
in two steps: (1) collecting additional metadata of the verdict and (2) checking whether a person is mentioned in a verdict.Warning: The number of verdicts imported by make import_verdicts
can be high (ca. 50k a year). Consider this carefully when you use the --start_date
and --end_date
cli params.
The People
model has an attribute called protected
. Toggling that attribute to True
removes the person from all public listings (i.e. the API search endpoint) and blocks access to their detail page.
These env variables are required for production:
ENV
= production
FLASK_ENV
= production
DATABASE_URL
= url to the database, formatted similar to postgresql://user:password@localhost:port/database_name
(alternatively you can use the individual parts of the database url in separate environment variables as found in .env.dist)SECRET_KEY
= a randomly generated string that is used for encryptionLOG_LEVEL
= a valid level from Python's logging module; generally WARN
or higher is recommended in productiondocker-compose up -d
docker exec ors_webpack_1 npm run prod
docker exec ors_app_1 sh ./release/tasks.sh
release/cron.sh
/sitemap.xml
. You can submit this sitemap to search engines to be indexed faster.Questions? Contact developers@openstate.eu.
Without Flask in Docker, but a Docker based DB:
cp .env.dist .env
export $(cat .env | xargs)
export DATABASE_URL=postgresql://ors2user:ors2@localhost:54322/ors2