Skip to content

Commit

Permalink
release 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xrotwang committed Aug 1, 2018
1 parent 5275a66 commit d299b30
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 108 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Version 2.0 (in development)
- Ignore and deprecate the data argument of TableGroup.check_referential_integrity.


Version 1.4
-----------

- Read all data with encoding specified as UTF-8 using utf-8-sig encoding.


Version 1.0
-----------

Expand Down
76 changes: 76 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# csvw

[![Build Status](https://travis-ci.org/cldf/csvw.svg?branch=master)](https://travis-ci.org/cldf/csvw)
[![codecov](https://codecov.io/gh/cldf/csvw/branch/master/graph/badge.svg)](https://codecov.io/gh/cldf/csvw)
[![Requirements Status](https://requires.io/github/cldf/csvw/requirements.svg?branch=master)](https://requires.io/github/cldf/csvw/requirements/?branch=master)
[![PyPI](https://img.shields.io/pypi/v/csvw.svg)](https://pypi.org/project/csvw)


CSV on the Web



## Links

- GitHub: https://github.com/cldf/csvw
- PyPI: https://pypi.org/project/csvw
- Issue Tracker: https://github.com/cldf/csvw/issues


## Installation

This package runs under Python 2.7, and 3.4+, use pip to install:

```bash
$ pip install csvw
```


## Example


```python
>>> import csvw
>>> tg = csvw.TableGroup.from_file('tests/csv.txt-metadata.json')

>>> tg.check_referential_integrity()
>>> assert len(tg.tables) == 1

>>> assert tg.tables[0] is tg.tabledict['csv.txt']
>>> tg.tables[0].check_primary_key()

>>> from collections import OrderedDict
>>> row = next(tg.tables[0].iterdicts())
>>> assert row == OrderedDict([('ID', 'first'), ('_col.2', 'line')])

>>> assert len(list(tg.tables[0].iterdicts())) == 2
```


## Known limitations

- We read **all** data which is specified as UTF-8 encoded using the
[`utf-8-sig` codecs](https://docs.python.org/3/library/codecs.html#module-encodings.utf_8_sig).
Thus, if such data starts with `U+FEFF` this will be interpreted as [BOM](https://en.wikipedia.org/wiki/Byte_order_mark)
and skipped.
- Low level CSV parsing is delegated to the `csv` module in Python's standard library. Thus, if a `commentPrefix`
is specified in a `Dialect` instance, this will lead to skipping rows where the first value starts
with `commentPrefix`, even if the value was quoted.


## See also

- https://www.w3.org/2013/csvw/wiki/Main_Page
- https://github.com/CLARIAH/COW
- https://github.com/CLARIAH/ruminator
- https://github.com/bloomberg/pycsvw
- https://github.com/frictionlessdata/goodtables-py
- https://github.com/frictionlessdata/tableschema-py
- https://github.com/theodi/csvlint.rb
- https://github.com/ruby-rdf/rdf-tabular
- https://github.com/rdf-ext/rdf-parser-csvw


## License

This package is distributed under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).
99 changes: 0 additions & 99 deletions README.rst

This file was deleted.

5 changes: 4 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ git tag -a v<VERSION> -m"<VERSION> release"
- Release to PyPI:
```shell
rm dist/*
python setup.py sdist bdist_wheel
python setup.py sdist
twine upload dist/*
rm dist/*
python setup.py bdist_wheel
twine upload dist/*
```

Expand Down
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
from setuptools import setup, find_packages


def read(fname):
with open(fname) as fp:
return fp.read()


setup(
name='csvw',
version='1.3.1.dev0',
version='1.4.0',
author='Robert Forkel',
author_email='forkel@shh.mpg.de',
description='',
long_description=read('README.rst'),
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
keywords='csv w3c',
license='Apache 2.0',
url='https://github.com/cldf/csvw',
Expand Down
2 changes: 1 addition & 1 deletion src/csvw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]

__title__ = 'csvw'
__version__ = '1.3.1.dev0'
__version__ = '1.4.0'
__author__ = 'Robert Forkel'
__license__ = 'Apache 2.0, see LICENSE'
__copyright__ = 'Copyright (c) 2018 Robert Forkel'

0 comments on commit d299b30

Please sign in to comment.