From e030aaa1ed7872a795376f332c4ab9d89a77bc0d Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 26 Dec 2018 17:48:51 -0600 Subject: [PATCH 1/4] Fix project name capitalization. Replaced all instances of "PTable" with "ptable" to make the project more pythonic. Ran set up and test scripts, all appreared to pass without further modification. --- README.rst | 32 ++++++++++++++++---------------- docs/_meta.rst | 15 +++++++-------- docs/conf.py | 14 +++++++------- docs/installation.rst | 6 +++--- prettytable/__init__.py | 2 +- setup.py | 4 ++-- 6 files changed, 36 insertions(+), 37 deletions(-) diff --git a/README.rst b/README.rst index b190bc0..4212730 100644 --- a/README.rst +++ b/README.rst @@ -1,40 +1,40 @@ ============ -About PTable +About ptable ============ -PTable is a simple Python library designed to make it quick and easy to +ptable is a simple Python library designed to make it quick and easy to represent tabular data in visually appealing ASCII tables, originally forked from `PrettyTable `_. -.. image:: https://travis-ci.org/kxxoling/PTable.svg - :target: https://travis-ci.org/kxxoling/PTable +.. image:: https://travis-ci.org/kxxoling/ptable.svg + :target: https://travis-ci.org/kxxoling/ptable :alt: Build Status -.. image:: https://landscape.io/github/kxxoling/PTable/master/landscape.svg?style=flat - :target: https://landscape.io/github/kxxoling/PTable/master +.. image:: https://landscape.io/github/kxxoling/ptable/master/landscape.svg?style=flat + :target: https://landscape.io/github/kxxoling/ptable/master :alt: Code Health -.. image:: https://coveralls.io/repos/github/kxxoling/PTable/badge.svg?branch=master - :target: https://coveralls.io/github/kxxoling/PTable?branch=master +.. image:: https://coveralls.io/repos/github/kxxoling/ptable/badge.svg?branch=master + :target: https://coveralls.io/github/kxxoling/ptable?branch=master :alt: Coverage Installation ============ -As PTable is a fork of PrettyTable, and compatible with all its APIs, -so PTable is usage is the same as PrettyTable, and the installation +As ptable is a fork of PrettyTable, and compatible with all its APIs, +so ptable is usage is the same as PrettyTable, and the installation would cover on the original PrettyTable. -As always, you can install PTable in 3 ways. +As always, you can install ptable in 3 ways. Via pip (recommend):: - pip install PTable + pip install ptable Via easy_install:: - easy_install PTable + easy_install ptable From source:: @@ -44,13 +44,13 @@ From source:: Quick start =========== -PTable supports two kinds of usage: +ptable supports two kinds of usage: As a library ------------ -PTable library API is almost as PrettyTable, you can import the same API from +ptable library API is almost as PrettyTable, you can import the same API from ``prettytable`` library: .. code-block:: python @@ -64,7 +64,7 @@ A better hosted document is hosted on `ReadTheDocument `_ . -.. image:: https://travis-ci.org/kxxoling/PTable.svg - :target: https://travis-ci.org/kxxoling/PTable +.. image:: https://travis-ci.org/kxxoling/ptable.svg + :target: https://travis-ci.org/kxxoling/ptable :alt: Build Status -.. image:: https://landscape.io/github/kxxoling/PTable/master/landscape.svg?style=flat - :target: https://landscape.io/github/kxxoling/PTable/master +.. image:: https://landscape.io/github/kxxoling/ptable/master/landscape.svg?style=flat + :target: https://landscape.io/github/kxxoling/ptable/master :alt: Code Health Links @@ -22,4 +22,3 @@ Links * `Source Code (GitHub) `_ * `PyPI `_ * `RTFD `_ - diff --git a/docs/conf.py b/docs/conf.py index cd09fd9..c6e5093 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# PTable documentation build configuration file, created by +# ptable documentation build configuration file, created by # sphinx-quickstart on Sat May 2 13:23:25 2015. # # This file is execfile()d with the current directory set to its @@ -59,7 +59,7 @@ def _warn_node(self, msg, node): master_doc = 'index' # General information about the project. -project = u'PTable' +project = u'ptable' copyright = u'2015, Kane Blueriver' # The version info for the project you're documenting, acts as replacement for @@ -202,7 +202,7 @@ def _warn_node(self, msg, node): #html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'PTabledoc' +htmlhelp_basename = 'ptabledoc' # -- Options for LaTeX output --------------------------------------------- @@ -222,7 +222,7 @@ def _warn_node(self, msg, node): # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'PTable.tex', u'PTable Documentation', + ('index', 'ptable.tex', u'ptable Documentation', u'Kane Blueriver', 'manual'), ] @@ -252,7 +252,7 @@ def _warn_node(self, msg, node): # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'ptable', u'PTable Documentation', + ('index', 'ptable', u'ptable Documentation', [u'Kane Blueriver'], 1) ] @@ -266,8 +266,8 @@ def _warn_node(self, msg, node): # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'PTable', u'PTable Documentation', - u'Kane Blueriver', 'PTable', 'One line description of project.', + ('index', 'ptable', u'ptable Documentation', + u'Kane Blueriver', 'ptable', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/installation.rst b/docs/installation.rst index e83dea9..2f130c1 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,12 +1,12 @@ Installation ------------ -PTable is published on PyPI, so you can easily install it via pip or easy_install, +ptable is published on PyPI, so you can easily install it via pip or easy_install, and pip is recommended:: - pip install PTable + pip install ptable or:: - easy_install PTable + easy_install ptable diff --git a/prettytable/__init__.py b/prettytable/__init__.py index bef5807..fc3d477 100644 --- a/prettytable/__init__.py +++ b/prettytable/__init__.py @@ -4,7 +4,7 @@ # * Chris Clark # * Klein Stephane # * John Filleau -# PTable is forked from original Google Code page in April, 2015, and now +# ptable is forked from original Google Code page in April, 2015, and now # maintained by Kane Blueriver . # # Redistribution and use in source and binary forms, with or without diff --git a/setup.py b/setup.py index 1f49401..b4b1431 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ def fread(filepath): setup( - name='PTable', + name='ptable', version=version, include_package_data=True, zip_safe=False, @@ -38,7 +38,7 @@ def fread(filepath): author_email='luke@maurits.id.au', maintainer='Kane Blueriver', maintainer_email='kxxoling@gmail.com', - url='https://github.com/kxxoling/PTable', + url='https://github.com/kxxoling/ptable', py_modules=['prettytable', 'prettytable.cli', 'prettytable.prettytable', 'prettytable.factory', 'prettytable._compact'], test_suite="test_prettytable", From aa51b6a03d48bb4a7cec099ded21ba0e0672d678 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 26 Dec 2018 19:25:16 -0600 Subject: [PATCH 2/4] Update README.rst --- README.rst | 101 ++++++++++------------------------------------------- 1 file changed, 18 insertions(+), 83 deletions(-) diff --git a/README.rst b/README.rst index 4212730..fa4efdd 100644 --- a/README.rst +++ b/README.rst @@ -1,90 +1,25 @@ ============ -About ptable +About "PTable" ============ -ptable is a simple Python library designed to make it quick and easy to -represent tabular data in visually appealing ASCII tables, originally -forked from `PrettyTable `_. +See: https://github.com/kxxoling/PTable -.. image:: https://travis-ci.org/kxxoling/ptable.svg - :target: https://travis-ci.org/kxxoling/ptable - :alt: Build Status +=============== +About this fork, +"ptable": +=============== +This is a low effort fork of the super handy "PTable" library by Kane Blueriver +( https://github.com/kxxoling ). This fork is meant to simply address the capitalization +of the library name "PTable", changing it to "ptable" in order to be more pythonic. +I became interested in this issue after trying to build packages for other projects +which depend on this package. -.. image:: https://landscape.io/github/kxxoling/ptable/master/landscape.svg?style=flat - :target: https://landscape.io/github/kxxoling/ptable/master - :alt: Code Health +This issue is described in the original project here: +https://github.com/kxxoling/PTable/issues/13 -.. image:: https://coveralls.io/repos/github/kxxoling/ptable/badge.svg?branch=master - :target: https://coveralls.io/github/kxxoling/ptable?branch=master - :alt: Coverage - - -Installation -============ - -As ptable is a fork of PrettyTable, and compatible with all its APIs, -so ptable is usage is the same as PrettyTable, and the installation -would cover on the original PrettyTable. - -As always, you can install ptable in 3 ways. - -Via pip (recommend):: - - pip install ptable - -Via easy_install:: - - easy_install ptable - -From source:: - - python setup.py install - - -Quick start -=========== - -ptable supports two kinds of usage: - - -As a library ------------- - -ptable library API is almost as PrettyTable, you can import the same API from -``prettytable`` library: - -.. code-block:: python - - from prettytable import PrettyTable - x = PrettyTable() - -A better hosted document is hosted on `ReadTheDocument `_. - - -As command-line tool --------------------- - -This is an original function of ptable, can be used as ``ptable`` command: - -.. code-block:: shell - - ptable --csv somefile.csv - -or a Unix style pipe: - -.. code-block:: shell - - cat somefile.csv | ptable - -Will both print a ASCII table in terminal. - - - -Relative links -============== - -* `Source Code (GitHub) `__ -* `RTFD `__ -* `PyPI `__ -* `PrettyTable `_ +Also trying to test repackaging for pypi: +https://test.pypi.org/project/ptable/ +ptable 0.9.2 +To install this fork of "PTable", "ptable": +'pip install -i https://test.pypi.org/simple/ ptable' From 15fd77df997f16a1ea906ef85aad867ed49a8191 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 26 Dec 2018 19:29:17 -0600 Subject: [PATCH 3/4] Revert "Update README.rst" This reverts commit aa51b6a03d48bb4a7cec099ded21ba0e0672d678. --- README.rst | 101 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 83 insertions(+), 18 deletions(-) diff --git a/README.rst b/README.rst index fa4efdd..4212730 100644 --- a/README.rst +++ b/README.rst @@ -1,25 +1,90 @@ ============ -About "PTable" +About ptable ============ -See: https://github.com/kxxoling/PTable +ptable is a simple Python library designed to make it quick and easy to +represent tabular data in visually appealing ASCII tables, originally +forked from `PrettyTable `_. -=============== -About this fork, -"ptable": -=============== -This is a low effort fork of the super handy "PTable" library by Kane Blueriver -( https://github.com/kxxoling ). This fork is meant to simply address the capitalization -of the library name "PTable", changing it to "ptable" in order to be more pythonic. -I became interested in this issue after trying to build packages for other projects -which depend on this package. +.. image:: https://travis-ci.org/kxxoling/ptable.svg + :target: https://travis-ci.org/kxxoling/ptable + :alt: Build Status -This issue is described in the original project here: -https://github.com/kxxoling/PTable/issues/13 +.. image:: https://landscape.io/github/kxxoling/ptable/master/landscape.svg?style=flat + :target: https://landscape.io/github/kxxoling/ptable/master + :alt: Code Health -Also trying to test repackaging for pypi: -https://test.pypi.org/project/ptable/ -ptable 0.9.2 +.. image:: https://coveralls.io/repos/github/kxxoling/ptable/badge.svg?branch=master + :target: https://coveralls.io/github/kxxoling/ptable?branch=master + :alt: Coverage + + +Installation +============ + +As ptable is a fork of PrettyTable, and compatible with all its APIs, +so ptable is usage is the same as PrettyTable, and the installation +would cover on the original PrettyTable. + +As always, you can install ptable in 3 ways. + +Via pip (recommend):: + + pip install ptable + +Via easy_install:: + + easy_install ptable + +From source:: + + python setup.py install + + +Quick start +=========== + +ptable supports two kinds of usage: + + +As a library +------------ + +ptable library API is almost as PrettyTable, you can import the same API from +``prettytable`` library: + +.. code-block:: python + + from prettytable import PrettyTable + x = PrettyTable() + +A better hosted document is hosted on `ReadTheDocument `_. + + +As command-line tool +-------------------- + +This is an original function of ptable, can be used as ``ptable`` command: + +.. code-block:: shell + + ptable --csv somefile.csv + +or a Unix style pipe: + +.. code-block:: shell + + cat somefile.csv | ptable + +Will both print a ASCII table in terminal. + + + +Relative links +============== + +* `Source Code (GitHub) `__ +* `RTFD `__ +* `PyPI `__ +* `PrettyTable `_ -To install this fork of "PTable", "ptable": -'pip install -i https://test.pypi.org/simple/ ptable' From 4d3d78138c70c33d486132e70f69c4d3368272ba Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 26 Dec 2018 19:30:33 -0600 Subject: [PATCH 4/4] Restore original readme. --- README.rst => README.bak | 0 README.txt | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+) rename README.rst => README.bak (100%) create mode 100644 README.txt diff --git a/README.rst b/README.bak similarity index 100% rename from README.rst rename to README.bak diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..fa4efdd --- /dev/null +++ b/README.txt @@ -0,0 +1,25 @@ +============ +About "PTable" +============ + +See: https://github.com/kxxoling/PTable + +=============== +About this fork, +"ptable": +=============== +This is a low effort fork of the super handy "PTable" library by Kane Blueriver +( https://github.com/kxxoling ). This fork is meant to simply address the capitalization +of the library name "PTable", changing it to "ptable" in order to be more pythonic. +I became interested in this issue after trying to build packages for other projects +which depend on this package. + +This issue is described in the original project here: +https://github.com/kxxoling/PTable/issues/13 + +Also trying to test repackaging for pypi: +https://test.pypi.org/project/ptable/ +ptable 0.9.2 + +To install this fork of "PTable", "ptable": +'pip install -i https://test.pypi.org/simple/ ptable'