Skip to content

Commit

Permalink
Merge branch 'master' of github.com:datosgobar/pydatajson
Browse files Browse the repository at this point in the history
  • Loading branch information
capitantoto committed Nov 23, 2016
2 parents 06be3a7 + 858cdcd commit 49c1c4c
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 42 deletions.
57 changes: 28 additions & 29 deletions .travis.yml
@@ -1,32 +1,31 @@
# Config file for automatic testing at travis-ci.org
# This file will be regenerated if you run travis_pypi_setup.py

language: python
python: 3.5

env:
- TOXENV=py35
- TOXENV=py34
- TOXENV=py33
- TOXENV=py27
- TOXENV=py26
- TOXENV=pypy

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -U tox

# command to run tests, e.g. python setup.py test
script: tox -e ${TOXENV}

# After you create the Github repo and add it to Travis, run the
# travis_pypi_setup.py script to finish PyPI deployment setup
# This file was autogenerated and will overwrite each time you run travis_pypi_setup.py
after_success:
# - travis-sphinx deploy
- coveralls
deploy:
provider: pypi
true:
repo: datosgobar/pydatajson
tags: true
distributions: sdist bdist_wheel
user: datosgobar
password:
secure: PLEASE_REPLACE_ME
on:
tags: true
repo: datosgobar/pydatajson
condition: $TOXENV == py27
secure: DxjG/q7BPmslp22ISFrFhzW0my1M0lQLPojqY//98TLm2xQuJvJZWS/4Hzwg9yLbQO6G+9KuZWPDHFZbo77FoGwPEmDCUOSl7MQYprK2qgZDmyEpMk4LPRDR1kObaVM16ykiZtxPfKrHHLrWdUegheQPrEPY4JZ1CST47lNaVO8bDDKde1cBCoJGRiRiX+gzRfhoymjYSYsO8ZfZOkuaI/TUmbUea6l77R4tb3+m/kgeb0WMI406x9uzrn6YBZZ4i3Bo6xtteLNtSV2McENSfGnA0dzQ3XUTxq4fOD9XlK153DZKIPjdFuuvujxCI8/YdVhmFdtR9RY4hs4lYrVInn4/tDrlOWAQrATzBtLGnZg6meixzk3+Ks6nVaYnu8ehh+dchx05i28GJ4yPstbuV9cvoSgBbG7yUj3H9vhb3CYaClM8R36nz7IKmUKfhyZk75lQK67gbCITEURyN5FUOsWgjZcqF7XVDGgseoPSed7L/qip9hi7XPBlf0KvXCtkt7UTJojgwE47dR0KFkBxkWWOZ6/2tESsBm79O7DubVp1y451ibGK/oPk5C2vqFK4Hj9g7yc0syKUwwEk7TnF0m8VaCXnSJiCyRMiKNilcx+PxPNoFQoGEBDMyAuUp9hRCt4XVWjuAQbs125RCcFEAdsgznn92INf3nrnFnONFpo=
provider: pypi
user: datosgobar
matrix:
allow_failures:
- python: '2.6'
- python: '3.4'
- python: pypy
install:
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- pip install python-coveralls
- pip install coveralls
language: python
python:
- '2.7'
script:
- nosetests --with-coverage
# - travis-sphinx --source=docs -n build
sudo: false

8 changes: 4 additions & 4 deletions Makefile
Expand Up @@ -51,16 +51,16 @@ lint: ## check style with flake8
flake8 pydatajson tests

test: ## run tests quickly with the default Python

python setup.py test

test-all: ## run tests on every Python version with tox
tox

coverage: ## check code coverage quickly with the default Python

coverage run --source pydatajson setup.py test

coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
Expand Down Expand Up @@ -94,5 +94,5 @@ register: ## register the package to PyPi
python setup.py register

pypi: ## register the package to PyPi get travis ready to deploy to pip
python setup.py register
twine upload dist/*
python travis_pypi_setup.py
17 changes: 15 additions & 2 deletions README.md
Expand Up @@ -26,13 +26,26 @@ Paquete en python con herramientas para generar y validar metadatos de catálogo
```python
from pydatajson import DataJson

dj = DataJson("path/to/data.json")
validation_result = dj.is_valid_structure()
dj = DataJson()
validation_result = dj.is_valid_catalog("path/to/data.json")

print validation_result
True
```

Con ejemplos del repositorio

```python
validation_result = dj.is_valid_catalog("tests/samples/full_data.json")
print validation_result
True

validation_result = dj.is_valid_catalog(
"tests/samples/missing_catalog_title_data.json")
print validation_result
False
```

## Tests

*AYUDA: ¿Cómo correr los tests? ¿Cómo me instalo dependencias para los tests?*
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
@@ -0,0 +1 @@
jsonschema
3 changes: 2 additions & 1 deletion requirements_dev.txt
Expand Up @@ -9,4 +9,5 @@ Sphinx==1.4.8
cryptography==1.4
PyYAML==3.11
nose
recommonmark==0.5.4
recommonmark
twine
7 changes: 1 addition & 6 deletions setup.py
Expand Up @@ -17,7 +17,7 @@

setup(
name='pydatajson',
version='0.1.0',
version='0.0.8',
description="Paquete en python con herramientas para generar y validar metadatos de catálogos de datos en formato data.json.",
long_description=readme + '\n\n' + history,
author="Datos Argentina",
Expand All @@ -39,12 +39,7 @@
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
test_suite='tests',
tests_require=test_requirements
Expand Down

0 comments on commit 49c1c4c

Please sign in to comment.