Comments (10)
Hi Sandro,
Including CHANGELOG is no problem at all. I will do that soon.
Regarding the tests: I am happy to ship these but I wondered if you had any
advice on how best to go about it? If I just add it to the py_modules list in
setup.py, then people who have installed it will be able to do "import
prettytable_test", right? For some reason it feels weird to me to have the
unit tests be so easily accessible. But maybe this is normal? I have read
this article:
http://as.ynchrono.us/2007/12/filesystem-structure-of-python-project_21.html,
which recommends having a test sub-package of your main package. But right now
PrettyTable is just a module, not a package, and I am loathe to change that
since it will break existing import statements, and also because I feel it is
overkill for such a simple library.
Since you package many Python projects for Debian I thought you may have some
insight?
Original comment by [email protected]
on 6 May 2012 at 9:56
- Changed state: Accepted
from prettytable.
Hi Luke,
sadly the Python ecosystem is very fragmented when we talk about how to run
tests. Some have a test/ directory, so just have a module in their package so
running
python -c "import module; module.test()"
would work, and so on.
given setuptools supports it, it would be cool if you can fill the missing bits
for letting
python setup.py test
works. This patch just makes the trick:
Index: setup.py
===================================================================
--- setup.py (revision 56)
+++ setup.py (working copy)
@@ -17,5 +17,6 @@
author='Luke Maurits',
author_email='[email protected]',
url='http://code.google.com/p/prettytable',
- py_modules=['prettytable']
+ py_modules=['prettytable'],
+ test_suite='prettytable_test'
)
as for installation, I don't think it is worth installing the tests, but being
able to run them when you have the tarball unpacked is nice.
Cheers,
Sandro
Original comment by sandro.tosi
on 12 May 2012 at 8:59
from prettytable.
Hi Sandro,
I had no idea that setuptools had the test_suite option! Thanks very much. I
agree that packaging the tests and having the ability to run them with "python
setup.py test", but not actually installing the tests into site-packages
anywhere is a good way to go about things. I'll get this done soon and upload
the new packages to PyPi. I'll let you know when I've done so so you can make
Debian packages.
Thanks!
Luke
Original comment by [email protected]
on 16 May 2012 at 12:48
from prettytable.
Okay, I've uploaded the new packages. These should have CHANGELOG and
prettytable_test.py in them as requested. Please let me know if everything is
okay, then I can close this Issue.
Original comment by [email protected]
on 16 May 2012 at 2:50
from prettytable.
Mh sorry but where did you uploaded it? aaaah I see, you've overwritten your
previous 0.6 release. Please, don't do that! we won't notice that a new release
was /released/ if you don't bump the version too.
Do you think it's possible to restore the original 0.6 version and release a
completely new version, something like 0.6.1 ?
Original comment by sandro.tosi
on 17 May 2012 at 8:40
from prettytable.
It would be possible to replace the old packages and then release these new
ones as 0.6.1, but I think I would need some convincing that this is actually
the right thing to do. I don't really think of the new packages as
constituting a new "release". I mean, the actual PrettyTable code itself has
not changed one byte. All that's different is that the tarball now includes a
few extra non-source files. To my mind this is a "new packaging", or
"repackaging" of an "old release". I sort of feel like calling it 0.6.1 would
confuse people, since 99% of users will not even notice a change.
Original comment by [email protected]
on 18 May 2012 at 2:13
from prettytable.
the problem is that once you publish something on the web, in particular for
software releases, it's "frozen" any further changes require a completely new
release.
For example, if you were to fix a typo in a comment (and you want to do that
because it's embarassing of some "urgent" matter), would you release a new
version or just "update" the current one?
How can anyone notice you've released a new version, while it's actually just
an "updated" version? I would not. I wouldn't have noticed you've release a
tarball with the doc in if I didn't really know that you did it and I searched
hard to understand where it is, given I was looking at the same version I
already downloaded some time before.
People are used to versions, because they mean something to them, they mean a
specific point in the software evolution that's unchangable, and from that on
you'll have higher versions releases.
I might not be the best speaker (writer? ;) ) but I hope at least you have
shown some opinion on why for any change, a new (different) release is needed.
Original comment by sandro.tosi
on 21 May 2012 at 8:15
from prettytable.
Hi Sandro,
Okay, I will make a 0.6.1 release and restore the previous 0.6 packages, but
probably not for about a week since I am very busy with a conference deadline
at the moment.
Original comment by [email protected]
on 27 May 2012 at 12:15
from prettytable.
Hi Sandro,
This ended up working out quite nicely, since I got a bug report about unicode
in PrettyTable 0.6, so I would have ended up having to do a 0.6.1 release
anyway! I've released the new one today, and replaced the 0.6 packages on PyPi
with ones which do not contain CHANGELOG etc., as they originally were.
I'm going to close this issue now, since the originally problem is now fixed
(as CHANGELOG and prettytable_test.py are now in the 0.6.1 source distribution)
and the 0.6 packages have been restored to their original form.
Original comment by [email protected]
on 3 Jun 2012 at 11:09
- Changed state: Fixed
from prettytable.
Thanks a lot Luke!
Original comment by sandro.tosi
on 6 Jun 2012 at 5:24
from prettytable.
Related Issues (20)
- the data on "how to display chinese character"
- how to display "ambiguous" width in chinese character?
- table.min_width is broken when using PLAIN_COLUMNS style HOT 2
- Field alignment error when using "blessings" module HOT 1
- Adding colors to column values messes up the spacing HOT 2
- Setting float_format in **kwargs does not actually affect output - confusing behavior HOT 1
- Permissions are incorrect HOT 1
- Add date formatting for datetime etc instances HOT 3
- In get_string, end is eval before sortby
- HTML output is lacking borders, alignment
- Cannot print unicode characters, for example: degree symbol °
- Pandas DataFrame Table Factory HOT 3
- Upload new version to pypi
- xterm reset escape sequence not filtered HOT 2
- Support large tables in output HOT 1
- Prettytable 0.7.2 does not handle rowspan correctly
- Creating a PrettyTable inside a for. HOT 1
- Project Future and Plans HOT 5
- Export project to Github (or other git hosting project) HOT 2
- Stretching columns when the data are longer than the header
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettytable.