From f6bf14afd22d8e5b706670590cc95f29d4483434 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 18 Oct 2019 15:57:13 +0200 Subject: [PATCH] Add project release config and cleanup project setup. (#398) * Add project release config and use Travis build stages. Refs #378. * Restructure project to use src/ and tests/ directories. * Fix testing. * Remove eggs. * More fixes. - isort and flake8 config - manifest template update - tox ini extension - docs build fixes - docs content fixes * Docs and license cleanup. --- .gitignore | 4 + .isort.cfg | 6 + .travis.yml | 38 +- HACKING | 14 - LICENSE | 3 +- MANIFEST.in | 7 +- Makefile | 6 - docs/_templates/sidebarintro.html | 31 -- docs/_templates/sidebarlogo.html | 22 - docs/_themes/.gitignore | 3 - docs/_themes/LICENSE | 45 -- docs/_themes/README.rst | 24 - docs/_themes/flask_theme_support.py | 86 ---- docs/_themes/kr/layout.html | 54 -- docs/_themes/kr/relations.html | 19 - docs/_themes/kr/static/flasky.css_t | 470 ------------------ docs/_themes/kr/static/small_flask.css | 70 --- docs/_themes/kr/theme.conf | 7 - docs/_themes/kr_small/layout.html | 22 - docs/_themes/kr_small/static/flasky.css_t | 287 ----------- docs/_themes/kr_small/theme.conf | 10 - docs/api.rst | 4 +- docs/conf.py | 34 +- docs/development.rst | 26 +- docs/tutorial.rst | 5 +- pytest.ini | 4 + setup.py | 37 +- src/tablib/__init__.py | 13 + {tablib => src/tablib}/compat.py | 0 {tablib => src/tablib}/core.py | 15 +- {tablib => src/tablib}/formats/__init__.py | 0 {tablib => src/tablib}/formats/_csv.py | 0 {tablib => src/tablib}/formats/_dbf.py | 0 {tablib => src/tablib}/formats/_df.py | 0 {tablib => src/tablib}/formats/_html.py | 0 {tablib => src/tablib}/formats/_jira.py | 0 {tablib => src/tablib}/formats/_json.py | 0 {tablib => src/tablib}/formats/_latex.py | 0 {tablib => src/tablib}/formats/_ods.py | 0 {tablib => src/tablib}/formats/_rst.py | 0 {tablib => src/tablib}/formats/_tsv.py | 0 {tablib => src/tablib}/formats/_xls.py | 0 {tablib => src/tablib}/formats/_xlsx.py | 0 {tablib => src/tablib}/formats/_yaml.py | 0 {tablib => src/tablib}/packages/__init__.py | 0 .../tablib}/packages/dbfpy/__init__.py | 0 {tablib => src/tablib}/packages/dbfpy/dbf.py | 8 +- .../tablib}/packages/dbfpy/dbfnew.py | 12 +- .../tablib}/packages/dbfpy/fields.py | 0 .../tablib}/packages/dbfpy/header.py | 0 .../tablib}/packages/dbfpy/record.py | 0 .../tablib}/packages/dbfpy/utils.py | 0 .../tablib}/packages/dbfpy3/__init__.py | 0 {tablib => src/tablib}/packages/dbfpy3/dbf.py | 5 +- .../tablib}/packages/dbfpy3/dbfnew.py | 0 .../tablib}/packages/dbfpy3/fields.py | 0 .../tablib}/packages/dbfpy3/header.py | 0 .../tablib}/packages/dbfpy3/record.py | 0 .../tablib}/packages/dbfpy3/utils.py | 0 {tablib => src/tablib}/packages/statistics.py | 0 tablib/__init__.py | 7 - requirements.txt => tests/requirements.txt | 2 + test_tablib.py => tests/test_tablib.py | 4 - tox.ini | 38 +- 64 files changed, 135 insertions(+), 1307 deletions(-) create mode 100644 .isort.cfg delete mode 100644 HACKING delete mode 100644 Makefile delete mode 100644 docs/_themes/.gitignore delete mode 100644 docs/_themes/LICENSE delete mode 100644 docs/_themes/README.rst delete mode 100644 docs/_themes/flask_theme_support.py delete mode 100644 docs/_themes/kr/layout.html delete mode 100644 docs/_themes/kr/relations.html delete mode 100644 docs/_themes/kr/static/flasky.css_t delete mode 100644 docs/_themes/kr/static/small_flask.css delete mode 100644 docs/_themes/kr/theme.conf delete mode 100644 docs/_themes/kr_small/layout.html delete mode 100644 docs/_themes/kr_small/static/flasky.css_t delete mode 100644 docs/_themes/kr_small/theme.conf create mode 100644 pytest.ini create mode 100644 src/tablib/__init__.py rename {tablib => src/tablib}/compat.py (100%) rename {tablib => src/tablib}/core.py (98%) rename {tablib => src/tablib}/formats/__init__.py (100%) rename {tablib => src/tablib}/formats/_csv.py (100%) rename {tablib => src/tablib}/formats/_dbf.py (100%) rename {tablib => src/tablib}/formats/_df.py (100%) rename {tablib => src/tablib}/formats/_html.py (100%) rename {tablib => src/tablib}/formats/_jira.py (100%) rename {tablib => src/tablib}/formats/_json.py (100%) rename {tablib => src/tablib}/formats/_latex.py (100%) rename {tablib => src/tablib}/formats/_ods.py (100%) rename {tablib => src/tablib}/formats/_rst.py (100%) rename {tablib => src/tablib}/formats/_tsv.py (100%) rename {tablib => src/tablib}/formats/_xls.py (100%) rename {tablib => src/tablib}/formats/_xlsx.py (100%) rename {tablib => src/tablib}/formats/_yaml.py (100%) rename {tablib => src/tablib}/packages/__init__.py (100%) rename {tablib => src/tablib}/packages/dbfpy/__init__.py (100%) rename {tablib => src/tablib}/packages/dbfpy/dbf.py (98%) rename {tablib => src/tablib}/packages/dbfpy/dbfnew.py (96%) rename {tablib => src/tablib}/packages/dbfpy/fields.py (100%) rename {tablib => src/tablib}/packages/dbfpy/header.py (100%) rename {tablib => src/tablib}/packages/dbfpy/record.py (100%) rename {tablib => src/tablib}/packages/dbfpy/utils.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/__init__.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/dbf.py (98%) rename {tablib => src/tablib}/packages/dbfpy3/dbfnew.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/fields.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/header.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/record.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/utils.py (100%) rename {tablib => src/tablib}/packages/statistics.py (100%) delete mode 100644 tablib/__init__.py rename requirements.txt => tests/requirements.txt (83%) rename test_tablib.py => tests/test_tablib.py (99%) diff --git a/.gitignore b/.gitignore index 432f8e08..7f307270 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,7 @@ tablib.egg-info/* # Coverage .coverage htmlcov + +# setuptools noise +.eggs +*.egg-info diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 00000000..ba2778dc --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,6 @@ +[settings] +multi_line_output=3 +include_trailing_comma=True +force_grid_wrap=0 +use_parentheses=True +line_length=88 diff --git a/.travis.yml b/.travis.yml index 79a51758..92538283 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,22 @@ language: python +python: +- 2.7 +- 3.6 +- 3.7 +- 3.8-dev cache: pip - -matrix: - include: - - python: 2.7 - - python: 3.5 - - python: 3.6 - - python: 3.7 - - python: 3.8-dev - -install: - - pip install -r requirements.txt - - pip install -U pytest pytest-cov - -script: pytest --cov tablib - -after_success: - - pip install -U codecov - - codecov +dist: xenial +install: travis_retry pip install tox-travis +script: tox +after_success: bash <(curl -s https://codecov.io/bash) +deploy: + provider: pypi + user: jazzband + server: https://jazzband.co/projects/tablib/upload + distributions: sdist bdist_wheel + password: + secure: svV4fYtodwW+iTyFOm5ISEfhVwcA+6vTskD3x6peznc40TdMV9Ek8nT3Q/NB4lCbXoUw2qR4H6uhLCjesnv/VvVk/qbitCyD8ySlgwOV5n7NzJs8lC8EYaHSjGQjatTwJAokfGVYkPawkI7HXDqtDggLUQBK+Ag8HDW+XBSbQIU= + on: + tags: true + repo: jazzband/tablib + python: 3.7 diff --git a/HACKING b/HACKING deleted file mode 100644 index ebbb24cc..00000000 --- a/HACKING +++ /dev/null @@ -1,14 +0,0 @@ -Where possible, please follow PEP8 with regard to coding style. Sometimes the line -length restriction is too hard to follow, so don't bend over backwards there. - -Triple-quotes should always be """, single quotes are ' unless using " -would result in less escaping within the string. - -All modules, functions, and methods should be well documented reStructuredText for -Sphinx AutoDoc. - -All functionality should be available in pure Python. Optional C (via Cython) -implementations may be written for performance reasons, but should never -replace the Python implementation. - -Lastly, don't take yourself too seriously :) \ No newline at end of file diff --git a/LICENSE b/LICENSE index 068005bd..9bfca256 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ Copyright 2016 Kenneth Reitz +Copyright 2019 Jazzband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16,4 +17,4 @@ 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. \ No newline at end of file +THE SOFTWARE. diff --git a/MANIFEST.in b/MANIFEST.in index 65583dc6..2f5f4f3d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,6 @@ -include HISTORY.md README.md LICENSE AUTHORS test_tablib.py +recursive-include docs * +recursive-include tests * +include pytest.ini tox.ini .isort.cfg .coveragerc HISTORY.md README.md LICENSE AUTHORS +prune docs/_build +prune *.pyc +prune __pycache__ diff --git a/Makefile b/Makefile deleted file mode 100644 index 35470bd2..00000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -test: - python test_tablib.py -publish: - python setup.py register - python setup.py sdist upload - python setup.py bdist_wheel --universal upload diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index 6da5e197..376af426 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -2,37 +2,6 @@

About Tablib

Tablib is an MIT Licensed format-agnostic tabular dataset library, written in Python. It allows you to import, export, and manipulate tabular data sets. Advanced features include, segregation, dynamic columns, tags & filtering, and seamless format import & export.

- - - - - -

Feedback

-

- Feedback is greatly appreciated. If you have any questions, comments, - random praise, or anonymous threats, - shoot me an email. -

- -

Useful Links