Skip to content

Commit

Permalink
v0.2.4 (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Feb 6, 2019
1 parent 985dbaf commit 615a7cf
Show file tree
Hide file tree
Showing 18 changed files with 543 additions and 284 deletions.
2 changes: 1 addition & 1 deletion biopandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
# 'X.Y.dev0' is the canonical version of 'X.Y.dev'
#

__version__ = '0.2.4.dev0'
__version__ = '0.2.4'
__author__ = "Sebastian Raschka <mail@sebastianraschka.com>"
16 changes: 13 additions & 3 deletions biopandas/pdb/pandas_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
from .engines import pdb_df_columns
from .engines import amino3to1dict
import warnings
from distutils.version import LooseVersion


pd_version = LooseVersion(pd.__version__)


class PandasPdb(object):
Expand Down Expand Up @@ -516,16 +520,22 @@ def to_pdb(self, path, records=None, gz=False, append_newline=True):
else:
dfs[r]['OUT'] = dfs[r]['OUT'] + dfs[r][c]

df = pd.concat(dfs)
if pd.__version__ < '0.17.0':
if pd_version < LooseVersion('0.17.0'):
warn("You are using an old pandas version (< 0.17)"
" that relies on the old sorting syntax."
" Please consider updating your pandas"
" installation to a more recent version.",
DeprecationWarning)
df.sort(columns='line_idx', inplace=True)

elif pd_version < LooseVersion('0.23.0'):
df = pd.concat(dfs)

else:
df.sort_values(by='line_idx', inplace=True)
df = pd.concat(dfs, sort=False)

df.sort_values(by='line_idx', inplace=True)

with openf(path, w_mode) as f:

s = df['OUT'].tolist()
Expand Down
8 changes: 5 additions & 3 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ docs_dir: sources

site_favicon: favicon.ico

theme_dir: cinder
theme:
name: null
custom_dir: "./cinder"

markdown_extensions:
- extra
- tables
- fenced_code
- mathjax
- mdx_math:
enable_dollar_delimiter: True #for use of inline $..$
extra_javascript:
- https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
- mathjaxhelper.js
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The CHANGELOG for the current development version is available at
[https://github.com/rasbt/biopandas/blob/master/docs/sources/CHANGELOG.md](https://github.com/rasbt/biopandas/blob/master/docs/sources/CHANGELOG.md).

### 0.2.4 (TBD)
### 0.2.4 (02-05-2019)

##### Downloads

Expand All @@ -16,7 +16,7 @@ The CHANGELOG for the current development version is available at

##### Changes

- -
- Minor adjustments to support to address deprecation warnings in pandas >= 23.0

##### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/api_subpackages/biopandas.mol2.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
biopandas version: 0.2.3dev0
biopandas version: 0.2.4
## PandasMol2

*PandasMol2()*
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/api_subpackages/biopandas.pdb.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
biopandas version: 0.2.3dev0
biopandas version: 0.2.4
## PandasPdb

*PandasPdb()*
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/api_subpackages/biopandas.testutils.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
biopandas version: 0.2.3dev0
biopandas version: 0.2.4
## assert_raises

*assert_raises(exception_type, message, func, *args, **kwargs)*
Expand Down
217 changes: 112 additions & 105 deletions docs/sources/tutorials/Working_with_MOL2_Structures_in_DataFrames.ipynb

Large diffs are not rendered by default.

0 comments on commit 615a7cf

Please sign in to comment.