Skip to content

Commit e13b64a

Browse files
authored
Merge pull request #9 from jmenglund/develop
Develop
2 parents 008c810 + eb6fb56 commit e13b64a

File tree

9 files changed

+50
-29
lines changed

9 files changed

+50
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ lib64/
1616
parts/
1717
sdist/
1818
var/
19+
tmp/
1920
*.egg-info/
2021
.installed.cfg
2122
*.egg

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@ language: python
22

33
python:
44
- '2.7'
5-
- '3.3'
6-
- '3.4'
75
- '3.5'
6+
- '3.6'
87

98
# whitelist
109
branches:
1110
only:
1211
- master
1312

1413
script:
15-
- py.test --pep8
14+
- py.test pandascharm.py --pep8
1615
- coverage run -m py.test
17-
- coverage report --include test_*.py
16+
- coverage report --omit test_*.py
1817

1918
after_success:
2019
- codecov

CHANGELOG.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
Changelog
22
=========
33

4+
0.1.3
5+
-----
6+
7+
* Fixed bug in function ``frame_as_categorical`` that caused an error when
8+
trying to change the dtype to "category".
9+
* Fixed problems with reporting test coverage.
10+
* Removed Travis-CI testing for Python 3.3 and 3.4.
11+
* Added Travis-CI testing for Python 3.6.
12+
* List of included categories are now ignored in matrix conversions involving
13+
categorical data.
14+
* ``pytest-cov`` removed from *requirements.txt*.
15+
* Updates to *setup.py*.
16+
* Updates to *README.rst*.
17+
* Updates to *release-checklist.rst*.
18+
19+
Release date: 2017-08-25
20+
21+
`View commits <https://github.com/jmenglund/pandas-charm/compare/v0.1.2...v0.1.3>`_
22+
423
0.1.2
524
-----
625

README.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ following objects:
1515
* BioPython MultipleSeqAlignment <-> pandas DataFrame
1616
* DendroPy CharacterMatrix <-> pandas DataFrame
1717

18-
The code has been tested with Python 2.7, 3.3, 3.4 and 3.5.
18+
The code has been tested with Python 2.7, 3.5 and 3.6.
1919

2020
Source repository: `<https://github.com/jmenglund/pandas-charm>`_
2121

2222
------------------------------------------
2323

2424
.. contents:: Table of contents
25-
:backlinks: top
25+
:backlinks: none
2626
:local:
2727

2828

@@ -56,13 +56,15 @@ Python path. See for example the environment management system
5656
Running tests
5757
-------------
5858

59-
Testing is carried out with `pytest <http://pytest.org>`_. Here is an
60-
example on how to run the test suite and generating a coverage report:
59+
Testing is carried out with `pytest <http://pytest.org>`_. The following
60+
example shows how you can run the test suite and generate a coverage report:
6161

6262
.. code-block::
6363
64-
$ pip install pytest pytest-cov pytest-pep8 dendropy biopython
65-
$ py.test -v --cov-report term-missing --cov pandascharm.py --pep8
64+
$ pip install pytest pytest-pep8 dendropy biopython
65+
$ py.test -v --pep8
66+
$ coverage run -m py.test
67+
$ coverage report --include pandascharm.py
6668
6769
6870
Usage
@@ -225,8 +227,8 @@ cite the Zenodo DOI of this project:
225227

226228
|DOI-URI|
227229

228-
You can select a citation style from the dropdown menu in the
229-
"Cite as" section on the Zenodo page.
230+
Choose your preferred citation style in the "Cite as" section on the Zenodo
231+
page.
230232

231233

232234
Author

pandascharm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import pandas
55

66

7-
__authors__ = 'Markus Englund'
7+
__author__ = 'Markus Englund'
88
__license__ = 'MIT'
9-
__version__ = '0.1.2'
9+
__version__ = '0.1.3'
1010

1111

1212
def frame_as_categorical(frame, include_categories=None):

release-checklist.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ Things to remember when making a new release of pandas-charm.
99

1010
#. Make desirable changes to the code.
1111

12-
#. Run tests with coverage report and PEP8 check:
12+
#. Run tests with PEP8 check and report coverage:
1313

1414
.. code-block::
1515
16-
$ py.test -v --cov-report term-missing --cov pandascharm.py --pep8
16+
$ py.test -v --pep8 pandascharm.py
17+
$ coverage run -m py.test
18+
$ coverage report --include pandascharm.py -m
1719
1820
#. Update the documentation in *README.rst*.
1921

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ pandas>=0.16
22
pytest>=2.8
33
codecov
44
pytest-pep8
5-
pytest-cov
65
DendroPy>=4.0
76
BioPython

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='pandas-charm',
11-
version='0.1.2',
11+
version='0.1.3',
1212
description=(
1313
'A small Python library for getting character matrices '
1414
'(alignments) into and out of pandas'),
@@ -18,7 +18,7 @@
1818
py_modules=['pandascharm'],
1919
install_requires=['pandas>=0.16', 'numpy'],
2020
extras_require={'testing': [
21-
'coverage', 'pytest', 'pytest-cov', 'biopython', 'dendropy']},
21+
'coverage', 'pytest', 'biopython', 'dendropy']},
2222
author='Markus Englund',
2323
author_email='[email protected]',
2424
url='https://github.com/jmenglund/pandas-charm',
@@ -32,9 +32,8 @@
3232
'Programming Language :: Python :: 2',
3333
'Programming Language :: Python :: 2.7',
3434
'Programming Language :: Python :: 3',
35-
'Programming Language :: Python :: 3.3',
36-
'Programming Language :: Python :: 3.4',
3735
'Programming Language :: Python :: 3.5',
36+
'Programming Language :: Python :: 3.6',
3837
],
3938
keywords=['alignment', 'BioPython', 'DendroPy', 'pandas'],
4039
)

test_pandascharm.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,32 +75,32 @@ def test_conversion(self):
7575
class TestCharmatrixConversion():
7676

7777
dna_charmatrix_string = '3 5\nt1 TCCAA\nt2 TGCAA\nt3 TG-AA\n'
78-
dna_charmatrix = dendropy.DnaCharacterMatrix.get_from_string(
79-
dna_charmatrix_string, schema='phylip')
78+
dna_charmatrix = dendropy.DnaCharacterMatrix.get(
79+
data=dna_charmatrix_string, schema='phylip')
8080
dna_frame = pandas.DataFrame({
8181
't1': ['T', 'C', 'C', 'A', 'A'],
8282
't2': ['T', 'G', 'C', 'A', 'A'],
8383
't3': ['T', 'G', '-', 'A', 'A']}, dtype='category')
8484

8585
rna_charmatrix_string = '3 5\nt1 UCCAA\nt2 UGCAA\nt3 UG-AA\n'
86-
rna_charmatrix = dendropy.RnaCharacterMatrix.get_from_string(
87-
rna_charmatrix_string, schema='phylip')
86+
rna_charmatrix = dendropy.RnaCharacterMatrix.get(
87+
data=rna_charmatrix_string, schema='phylip')
8888
rna_frame = pandas.DataFrame({
8989
't1': ['U', 'C', 'C', 'A', 'A'],
9090
't2': ['U', 'G', 'C', 'A', 'A'],
9191
't3': ['U', 'G', '-', 'A', 'A']}, dtype='category')
9292

9393
protein_charmatrix_string = '3 5\nt1 VKYPN\nt2 VLYPN\nt3 VL-PN\n'
94-
protein_charmatrix = dendropy.ProteinCharacterMatrix.get_from_string(
95-
protein_charmatrix_string, schema='phylip')
94+
protein_charmatrix = dendropy.ProteinCharacterMatrix.get(
95+
data=protein_charmatrix_string, schema='phylip')
9696
protein_frame = pandas.DataFrame({
9797
't1': ['V', 'K', 'Y', 'P', 'N'],
9898
't2': ['V', 'L', 'Y', 'P', 'N'],
9999
't3': ['V', 'L', '-', 'P', 'N']}, dtype='category')
100100

101101
standard_charmatrix_string = '3 5\nt1 01010\nt2 02010\nt3 02-10\n'
102-
standard_charmatrix = dendropy.StandardCharacterMatrix.get_from_string(
103-
standard_charmatrix_string, schema='phylip')
102+
standard_charmatrix = dendropy.StandardCharacterMatrix.get(
103+
data=standard_charmatrix_string, schema='phylip')
104104
standard_frame = pandas.DataFrame({
105105
't1': ['0', '1', '0', '1', '0'],
106106
't2': ['0', '2', '0', '1', '0'],

0 commit comments

Comments
 (0)