Skip to content

Commit de54485

Browse files
author
James Draper
committed
Let's call this version 1.0.0.
I think we can say that we are out of the beta version. I added a codacity badge and made a few minor changes to improve that score.
1 parent 1e25cb8 commit de54485

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@
3030
</a>
3131
</td>
3232
</tr>
33+
<tr>
34+
<td>
35+
Codacity grade
36+
</td>
37+
<td>
38+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/795dad8f6dfd4697ab8474265c4d47cb)](https://www.codacy.com/app/james-draper/qtpandas?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=draperjames/qtpandas&amp;utm_campaign=Badge_Grade)
39+
</td>
40+
</tr>
3341
</table>
42+
3443
[![Join the chat at https://gitter.im/qtpandas/Lobby#](https://badges.gitter.im/qtpandas/lobby.svg)](https://gitter.im/qtpandas/Lobby#)
3544
[![open issues](https://img.shields.io/github/issues-raw/draperjames/qtpandas.svg)](https://github.com/draperjames/qtpandas/issues)
3645
[![closed issues](https://img.shields.io/github/issues-closed/draperjames/qtpandas.svg)](https://github.com/draperjames/qtpandas/issues)

examples/BasicExample.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,41 @@
22
import numpy
33
import sys
44
from qtpandas.excepthook import excepthook
5-
sys.excepthook = excepthook
65

7-
# use QtGui from the compat module to take care if correct sip version, etc.
6+
# Use QtGui from the compat module to take care if correct sip version, etc.
87
from qtpandas.compat import QtGui
98
from qtpandas.models.DataFrameModel import DataFrameModel
109
from qtpandas.views.DataTableView import DataTableWidget
1110
from qtpandas.views._ui import icons_rc
1211

13-
"""setup a new empty model"""
12+
sys.excepthook = excepthook
13+
14+
# Setup a new empty model
1415
model = DataFrameModel()
1516

16-
"""setup an application and create a table view widget"""
17+
# Setup an application and create a table view widget
1718
app = QtGui.QApplication([])
1819
widget = DataTableWidget()
1920
widget.resize(800, 600)
2021
widget.show()
21-
"""asign the created model"""
22+
# Asign the created model"""
2223
widget.setViewModel(model)
2324

24-
"""create some test data"""
25+
# Create some test data
2526
data = {
26-
'A': [10, 11, 12],
27-
'B': [20, 21, 22],
27+
'A': [10, 11, 12],
28+
'B': [20, 21, 22],
2829
'C': ['Peter Pan', 'Cpt. Hook', 'Tinkerbell']
2930
}
3031
df = pandas.DataFrame(data)
31-
"""convert the column to the numpy.int8 datatype to test the delegates in the table
32-
int8 is limited to -128-127
33-
"""
32+
# Convert the column to the numpy.int8 datatype to test the delegates in the
33+
# table int8 is limited to -128-127
34+
3435
df['A'] = df['A'].astype(numpy.int8)
3536
df['B'] = df['B'].astype(numpy.float16)
3637

37-
"""fill the model with data"""
38+
# Fill the model with data
3839
model.setDataFrame(df)
3940

40-
"""start the app"""
41-
app.exec_()
41+
# start the app
42+
app.exec_()

qtpandas/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# -*- coding: utf-8 -*-
22
__import__('pkg_resources').declare_namespace(__name__)
3-
__version__ = '0.2.5'
3+
__version__ = '1.0.0'

qtpandas/encoding.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ class Detector(object):
2727
def __init__(self):
2828
if AUTODETECT:
2929
if sys.platform.startswith('linux'):
30-
# use the system wide installed version comming with windows, the included magic.mgc might be incompatible
30+
# Use the system wide installed version comming with windows.
31+
# The included magic.mgc might be incompatible.
3132
magic_db = os.path.join('/usr/share/file', 'magic.mgc')
3233
else:
33-
magic_db = os.path.join(BASEDIR, '_lib', 'magic', 'db', 'magic.mgc')
34+
magic_db = os.path.join(BASEDIR, '_lib', 'magic', 'db',
35+
'magic.mgc')
3436
if not os.path.exists(magic_db):
3537
raise ImportError('Please install libmagic.')
3638
self.magic = magic.Magic(magic_file=magic_db, mime_encoding=True)

0 commit comments

Comments
 (0)