Commit 9a856cf5 authored by Pierre Dittgen's avatar Pierre Dittgen

Adapt to validata_core

parent 33d578b4
......@@ -26,7 +26,7 @@ setup(
'flask',
'goodtables',
'requests',
'validata_validate >= 0.1, < 0.2',
'validata_core >= 0.1, < 0.2',
'commonmark',
'ezodf',
......
......@@ -2,12 +2,12 @@
from pathlib import Path
from flask import Flask
import validata_validate
import validata_core
from validata_ui.validate_helper import ValidatorHelper
# Schemas settings
schemas_config = validata_validate.get_schemas_config()
schemas_config = validata_core.get_schemas_config()
ValidatorHelper.init(schemas_config)
# Flask things
......
/* Custom CSS rules for Validata-UI */
/* Validation report
Customize h2 display in popovers
*/
div.popover h2 {
font-size: 1.0em;
font-weight: bold;
}
\ No newline at end of file
......@@ -10,8 +10,6 @@
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="{{url_for('static', filename='css/bootstrap.min.css')}}" crossorigin="anonymous">
<link rel="stylesheet" href="{{url_for('static', filename='css/sticky-footer-navbar.css')}}" crossorigin="anonymous">
<!-- Validata.css -->
<link ref="stylesheet" href="{{url_for('static', filename='css/validata.css')}}" />
<title>Validata - {% block title %}{% endblock %}</title>
{% endblock %}
......
......@@ -2,6 +2,12 @@
{% block title %}{{ title }}{% endblock %}
{% block head %}
{{ super() }}
<style>
.popover .popover-body h2 {
font-size: 1.2em;
font-weight: bold;
}
</style>
{% endblock %}
{% block content %}
<h1>{{ title }}</h1>
......@@ -33,8 +39,8 @@
<hr />
<p class="text alert alert-info" style="margin-bottom: 0;">
Source
({% if source_type == 'file' %}fichier{% endif %}{% if source_type == 'url' %}URL{% endif %})
: <em>{{ source.name }}</em>
({% if source_type == 'file' %}fichier{% endif %}{% if source_type == 'url' %}URL{% endif %})
: <em>{{ source.name }}</em>
<br />
Dimensions : <em>{{ report.table.col_count }} colonnes et {{ report.table.row_count }} lignes</em>
</p>
......@@ -135,4 +141,4 @@
{{ report.table.errors.body|length }} erreur(s) détectée(s)
#}
{% endblock %}
{% endblock %}
\ No newline at end of file
......@@ -5,10 +5,10 @@ import logging
import requests
from validata_validate import validate
from validata_core import validate
#
# MEMENTO: json.load(pkg_resources.resource_stream('validata_validate', 'spec.json'))
# MEMENTO: json.load(pkg_resources.resource_stream('validata_core', 'spec.json'))
#
log = logging.getLogger(__name__)
......
......@@ -18,8 +18,8 @@ from validata_ui import app
from validata_ui.util import (ValidataSource, flash_error, flash_info,
flash_success, flash_warning)
from validata_ui.validate_helper import ValidatorHelper
from validata_validate import csv_helpers
from validata_validate.loaders import custom_loaders
from validata_core import csv_helpers
from validata_core.loaders import custom_loaders
def extract_source_data(source: ValidataSource, preview_rows_nb=5):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment