Skip to content

Commit

Permalink
[BREAKING] Rebased on goodtables.next codebase (#120)
Browse files Browse the repository at this point in the history
* Rebased on goodtables.next codebase (#118)

* removed current codebase

* added updated codebase

* fixed linting

* updated readme

* updated readme

* updated readme

* fixed source checks

* added dataset checks

* min style change

* removed ecode filter from filter_checks

* renamed cells back to columns + row_number

* added dataset check stubs

* implemented dataset checks

* fixed linting

* moved __inspect_table next to inspect for better reading

* fixed list.clear for python2

* added error limit to dataset errors

* updated readme

* updated readme

* added breaking note to readme

* added custom checks support

* implemented custom profiles

* fixed linting

* added options order_fields and infer_fields

* fixed extra_header

* added comments

* updated spec

* renamed unordered_headers to non_matching_header

* renamed col-number to column-number

* min

* updated added dataset errors to readme

* splitted error and check concpets

* fixed linting

* min

* fixed readme

* updated readme

* updated readme

* fixed readme

* fixed readme

* added guard assertion to checks

* updated custom checks API

* fixed linting, readme

* fixed linting, readme

* updated readme

* updated readme

* typo

* moved table errors to Inspector, deleted checks

* added ability to profilies to return errors

* fixed head checks not columns break

* rebased check on in-place erorrs update

* rebased profiles on in-place errors

* fixed readme

* fixed readme

* fixed readme

* fixed readme

* fixed readme

* no extra-header error if infer_fields is True

* implemented proper non-matching-header without ordering

* added custom_profiles, custom_checks arguments instead of global
registry

* moved default args to signatures

* removed make release (use github releases instead!)

* added return code to cli

* improved cli error formatting

* improved error messages, tests

* updated examples

* added custom examples

* added inspector tests

* added limit tests

* fixed tests

* fixed spec link

* added checks options to cli

* fixed profiles

* added description to setup

* added entry_points, keywords

* moved ckan profile to examples

* removed report from spec

* updated version to v1

* updated install instruction for now

* Fixed jsontableschema-error message (#133)

* Rebased on granular tabulator exceptions (#115)

* updated dependencies

* rebases on new tabulator exceptions

* Renamed profile to preset with simplified API (#124)

* renamed profile to preset

* removed errors, tables arguments from preset

* Added infer_schema option, updated preset API (#128)

* minor improvements

* added infer_schema option false by default

* Added support for schema constraints (#55)

* updated jsontableschema version

* implemented all constraints except unique

* implemented unique constraint check

* updated to jsontableschema-v0.8.2

* fixed linting

* Added tables preset (#125)

* added tables preset

* fixed linting

* added tables test

* Implemented order_fields option (#123)

* fixed column producing for body context

* removed column from schema checks only if name slugs are different

* implemented order_fields algo

* improved comments

* Rebased on external spec (#131)

Rebased on external spec

* Improved tests (#127)

* added prev version data examples

* implemented feature tests

* moved files to data

* updated verson

* added features

* marked spec test as xfail

* Rebased on spec-v1.0.0-alpha1 (#131)

* updated spec, added spec to API

* added config with checks order

* rebased in inspector on updated spec

* updated @check API

* rebased on spec message templates

* fixed cutom checks

* fixed linting

* Updated readme note
  • Loading branch information
roll committed Nov 2, 2016
1 parent 4b85254 commit 467b349
Show file tree
Hide file tree
Showing 207 changed files with 3,255 additions and 6,337 deletions.
26 changes: 0 additions & 26 deletions .coveragerc

This file was deleted.

95 changes: 81 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,84 @@
.Python
.DS_Store
.idea
.projectile
*.sublime-project
*.sublime-workspace
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
/dist/
/build/
/*.egg-info
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
shippable/*
/docs/_build
/docs/_static
/docs/_templates
.cache/
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask instance folder
instance/

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# dotenv
.env

# Spyder project settings
.spyderproject

# Extras
.projectile
tabulator
jsontableschema
datapackage
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

39 changes: 35 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
language: python
sudo:
required

dist:
trusty

addons:
apt:
packages:
- pandoc

language:
python

python:
- 2.7
- 3.3
- 3.4
- 3.5

env:
global:
- TOXENV="py${PYTHON_VERSION//./}"

install:
- pip install --upgrade -r requirements/base.txt
- pip install --upgrade -r requirements/test.txt
- make install
- pip install coveralls

script:
- PYTHONPATH=. py.test --cov goodtables --cov-config .coveragerc --cov-report term-missing
- make test

after_success:
- coveralls

before_deploy:
- pandoc --version
- pandoc -f markdown_github -t rst -o README.rst README.md
- mv README.rst README.md

deploy:
provider: pypi
user: okfn
distributions: sdist bdist_wheel
on:
tags: true
password:
secure: Iuf7V4+XHL6wwFYt4IyEe0vWLGO/uOpMJWQnO+1eUjmcQ1qi4E9vyEJvsJRzWKm5+/Lv9uFIRGlmpNWQzUPs5VnMc3LEBh7Clv/WIlRGvi+omCeWoEPAPUueF8qjBcvpT37QNzjB5QXJY074uAihmKh/DU2xA4K0yCB8YQefBHYeNBl0pNYVnELUW8BFmz0GE0lTwHOnM681vgR01LdPjrgIHVEvnTZkKYtDXc/cwkw610fqrFS10srnTX6KjjC/pgDm4WSuaUxbPycmriIhZR29QgAx24NO/wrdGdp5H8TIsvBFnNFlC4QuHfwiXdAKpjL6cMu2uMo639Sev/484XxTorg2QQvNhNAJtiESVAaqVviAlmUItGdmsw4xhZb0JK6NC8fOuOoccL4DBD6JtCyGurwSpznuGXh1DQUYZ7fTd5qaUDnzBuhYGc8XDvcj14XU4P5OKES4NdruRVJOwFiNSMOAT6wm8b2Ue6N+FvgsghjwUr9ESKBrPj0VoouC2+FGZWT65vt/3R9PhFuBdC6SgMLWHESBuU5GW9Bc2ucS3HUi+uUV1IGjpfIsc3qifojNJiaU7hSAggJs9QlXd7goH2fKhb9ro2klzcDKmpBLXmMk3uH0QRpv1dGUYFtgGeEFN93vP3cxYsXf8OvV+MuCxYYGgrGZu3h8fvbc5hY=
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributing

The project follows the [Open Knowledge International coding standards](https://github.com/okfn/coding-standards).

## Getting Started

Recommended way to get started is to create and activate a project virtual environment.
To install package and development dependencies into active environment:

```
$ make install
```

## Testing

To run tests with linting and coverage:

```
$ make test
```

For linting `pylama` configured in `pylama.ini` is used. On this stage it's already
installed into your environment and could be used separately with more fine-grained control
as described in documentation - https://pylama.readthedocs.io/en/latest/.

For example to sort results by error type:

```
$ pylama --sort <path>
```

For testing `tox` configured in `tox.ini` is used.
It's already installed into your environment and could be used separately with more fine-grained control as described in documentation - https://testrun.org/tox/latest/.

For example to check subset of tests against Python 2 environment with increased verbosity.
All positional arguments and options after `--` will be passed to `py.test`:

```
tox -e py27 -- -v tests/<path>
```

Under the hood `tox` uses `pytest` configured in `pytest.ini`, `coverage`
and `mock` packages. This packages are available only in tox envionments.
12 changes: 7 additions & 5 deletions LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Copyright (c) 2015 Open Knowledge Foundation
The MIT License (MIT)

Copyright (c) 2016 Open Knowledge

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -7,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
global-include *.json
global-include *.yml
global-include *.txt
global-include VERSION
include LICENSE.md
include Makefile
include pylama.ini
include pytest.ini
include README.md
include tox.ini
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.PHONY: all install list spec test version


PACKAGE := $(shell grep '^PACKAGE =' setup.py | cut -d "'" -f2)
VERSION := $(shell head -n 1 $(PACKAGE)/VERSION)


all: list

install:
pip install --upgrade -e .[develop]

list:
@grep '^\.PHONY' Makefile | cut -d' ' -f2- | tr ' ' '\n'

spec:
wget -O goodtables/spec.json https://raw.githubusercontent.com/frictionlessdata/data-quality-spec/master/spec.json

test:
pylama $(PACKAGE)
tox

version:
@echo $(VERSION)
Loading

0 comments on commit 467b349

Please sign in to comment.