Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata UI
Commits
81155a23
Commit
81155a23
authored
Oct 26, 2018
by
Christophe Benz
Browse files
Use schemas config (moved to validata_validate)
parent
db77fdb3
Changes
2
Show whitespace changes
Inline
Side-by-side
setup.py
View file @
81155a23
...
...
@@ -26,7 +26,7 @@ setup(
install_requires
=
[
'flask'
,
'requests'
,
'validata_validate'
,
'validata_validate
>= 0.1, < 0.2
'
,
'goodtables'
,
'tabulator'
,
...
...
validata_ui/__init__.py
View file @
81155a23
...
...
@@ -2,108 +2,12 @@
from
pathlib
import
Path
from
flask
import
Flask
import
validata_validate
from
validata_ui.validate_helper
import
ValidatorHelper
# Schemas settings
schemas_config
=
{
"scdl-adresses"
:
{
"schema_json_url"
:
"https://git.opendatafrance.net/scdl/adresses/raw/master/schema-scdl-adresses.json"
,
"goodtables_checks_json_url"
:
"https://git.opendatafrance.net/scdl/adresses/raw/master/goodtables-checks.json"
,
"title"
:
"Adresses locales"
,
"description"
:
"Liste des adresses locales d'une collectivité"
,
"specurl"
:
"http://www.opendatafrance.net/SCDL_Adresses_Locales"
,
"docurl"
:
"https://dev.validata.fr/docs/schemas/scdl-adresses.html"
,
"examples"
:
[
{
"name"
:
"Adresses fictives invalides"
,
"url"
:
"https://git.opendatafrance.net/scdl/adresses/raw/v1.1/exemples/exemple_invalide.csv"
},
{
"name"
:
"Adresses de Bayonne avril 2018"
,
"url"
:
"https://git.opendatafrance.net/scdl/adresses/raw/v1.1/exemples/20180424_bal_216401026.csv"
}
]
},
"scdl-deliberations"
:
{
"schema_json_url"
:
"https://git.opendatafrance.net/scdl/deliberations/raw/master/schema.json"
,
"goodtables_checks_json_url"
:
"https://git.opendatafrance.net/scdl/deliberations/raw/master/goodtables-checks.json"
,
"title"
:
"Délibérations"
,
"description"
:
"Liste des délibérations adoptées par une assemblée locale"
,
"specurl"
:
"http://www.opendatafrance.net/SCDL_Deliberations"
,
"docurl"
:
"https://dev.validata.fr/docs/schemas/scdl-deliberations.html"
,
"examples"
:
[
{
"name"
:
"Délibérations fictives valides"
,
"url"
:
"https://git.opendatafrance.net/scdl/deliberations/raw/v2.0/examples/Deliberations_ok.csv"
},
{
"name"
:
"Délibérations fictives invalides"
,
"url"
:
"https://git.opendatafrance.net/scdl/deliberations/raw/v2.0/examples/DeliberationsCindoc.csv"
}
]
},
"scdl-marches-publics"
:
{
"schema_json_url"
:
"https://git.opendatafrance.net/scdl/marches-publics/raw/v1.2/schema.json"
,
"goodtables_checks_json_url"
:
"https://git.opendatafrance.net/scdl/marches-publics/raw/v1.2/goodtables-checks.json"
,
"title"
:
"Marchés publics"
,
"description"
:
"Liste des marchés publics attribués par une collectivité"
,
"specurl"
:
"http://www.opendatafrance.net/SCDL_Marches_Publics"
,
"docurl"
:
"https://dev.validata.fr/docs/schemas/scdl-marches.html"
,
"examples"
:
[
{
"name"
:
"Marchés publics fictifs valides"
,
"url"
:
"https://git.opendatafrance.net/scdl/marches-publics/raw/master/exemples/exemple_marche_public.csv"
},
{
"name"
:
"Marchés publics fictifs invalides"
,
"url"
:
"https://git.opendatafrance.net/scdl/marches-publics/raw/master/exemples/exemple_marche_public_avec_erreurs.csv"
}
]
},
"scdl-prenoms"
:
{
"schema_json_url"
:
"https://github.com/Jailbreak-Paris/liste-prenoms-nouveaux-nes/raw/v1.1.2/prenom-schema.json"
,
"goodtables_checks_json_url"
:
"https://github.com/Jailbreak-Paris/liste-prenoms-nouveaux-nes/raw/v1.1.2/goodtables-checks.json"
,
"title"
:
"Prénoms des nouveaux-nés"
,
"description"
:
"Liste des prénoms des nouveaux-nés déclarés à l'état-civil"
,
"specurl"
:
"https://docs.google.com/document/d/1KuAUWX2nfdsxZnizM1mR54_o6n0827HID52zpMIOaF8/edit#"
,
"docurl"
:
"https://dev.validata.fr/docs/schemas/scdl-prenoms.html"
,
"examples"
:
[
{
"name"
:
"Prénoms des nouveaux-nés Digne-les-Bains 2017"
,
"url"
:
"https://raw.githubusercontent.com/CharlesNepote/liste-prenoms-nouveaux-nes/v1.1.1/DIGNE-PRENOMS-2017.csv"
},
{
"name"
:
"Prénoms des nouveaux-nés fictifs invalides"
,
"url"
:
"https://raw.githubusercontent.com/CharlesNepote/liste-prenoms-nouveaux-nes/v1.1.1/prenoms-nouveaux-nes.exemple.invalide.1.1.csv"
},
{
"name"
:
"Liste des prénoms donnés à Suresnes de 2010 à 2017 (plateforme OpenDataSoft)"
,
"url"
:
"https://data.opendatasoft.com/explore/dataset/prenoms@hauts-de-seine/download/?format=csv&timezone=Europe/Berlin&use_labels_for_header=true"
,
},
]
},
"scdl-subventions"
:
{
"schema_json_url"
:
"https://git.opendatafrance.net/scdl/subventions/raw/master/schema.json"
,
"goodtables_checks_json_url"
:
"https://git.opendatafrance.net/scdl/subventions/raw/master/goodtables-checks.json"
,
"title"
:
"Subventions"
,
"description"
:
"Liste des subventions publiques attribuées par une collectivité"
,
"specurl"
:
"http://www.opendatafrance.net/SCDL_Subventions"
,
"docurl"
:
"https://dev.validata.fr/docs/schemas/scdl-subventions.html"
,
"examples"
:
[
{
"name"
:
"Subventions fictives invalides"
,
"url"
:
"https://git.opendatafrance.net/scdl/subventions/raw/v1.1/exemples/exemple_invalide.csv"
},
{
"name"
:
"Erreur de format (HTML au lieu de CSV)"
,
"url"
:
"https://git.opendatafrance.net/"
}
]
},
}
schemas_config
=
validata_validate
.
get_schemas_config
()
ValidatorHelper
.
init
(
schemas_config
)
# Flask things
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment