This validates csv and excel files using - goodtables
The work here builds upon existing tools and services, such as csvlint.io from the ODI and the LGA validator though reporting issues found in .xls, .xlsx .xlsm and other file formats, checking headers and validating field data.
Requirements
Install front end build tool (gulp)
npm install && gulp stylesheets
Make a virtualenv for the project and install python dependencies
pip install -r requirements.txt
or pipenv install
Create a postgres db called brownfield
createdb brownfield
Add environment variable to .flaskenv
file
DATABASE_URL=postgresql://localhost/brownfield
Then run db migrations
flask db upgrade
Run the application
python -m flask run
Note you can add and commit public environment variables to .flaskenv, do not add anything secret to this file. Secret configuration variables should be added to a .env file in base directory of the project.
Currently this application is deployed to brownfield-sites-validator.herokuapp.com. The heroku app is configured to deploy on commits to master.
The following environment variables are needed for to run the application on heroku
FLASK_ENV=production
FLASK_CONFIG=config.Config
FLASK_APP=application.wsgi:app
SECRET_KEY=[something secret]
Use the following to copy all GOVUK design system components to templates folder. You'll need to be in src/govuk-frontend
dir.
find . -name '*.njk' | cpio -pdm ../../application/templates/
The software in this project is open source and covered by LICENSE file.
All content and data in this repository is © Crown copyright and available under the terms of the Open Government 3.0 licence.