Skip to content

Commit

Permalink
Merge pull request #175 from alexdb27/master
Browse files Browse the repository at this point in the history
Fix few bugs and bump to v1.4.0
  • Loading branch information
pierrepo authored Jan 27, 2021
2 parents ba12909 + 10877bd commit 1aea178
Show file tree
Hide file tree
Showing 28 changed files with 67 additions and 68 deletions.
6 changes: 3 additions & 3 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"title": "PBxplore (v1.3.8): A program to explore protein structures with Protein Blocks",
"title": "PBxplore (v1.4.0): A program to explore protein structures with Protein Blocks",
"creators": [{
"name": "Barnoud, Jonathan",
"orcid": "0000-0003-0343-7796"
},
},
{
"name": "Santuz, Hubert",
"orcid": "0000-0001-6149-9480"
},
},
{
"name": "de Brevern, Alexandre G.",
"orcid": "0000-0001-7112-5626"
Expand Down
9 changes: 6 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
**Dev**

**1.4.0**
- Drop support for python2
- Fix weblogo dependancy (package changed name)
- Fix pytest

**1.3.8**
- Add and update version number in zenodo config file
- Update authors affiliations in README
Expand Down Expand Up @@ -66,6 +72,3 @@
- PBxplore is installable via pypi
- api documentation
- PBXplore is installable with setup.py



8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PBxplore
========

.. image:: https://img.shields.io/badge/Python-2.7%203.4%203.5%203.6-brightgreen.svg
.. image:: https://img.shields.io/badge/Python-3.6%203.8-brightgreen.svg
:alt: Python version
:target: https://pypi.python.org/pypi/pbxplore

Expand Down Expand Up @@ -44,7 +44,7 @@ Requirements

PBxplore requires:

* Python 2.7 or Python 3.x (>= 3.4)
* Python 3.x (>= 3.6)
* Python modules: `NumPy <http://numpy.scipy.org/>`_, `Matplotlib <http://matplotlib.org/>`_, `MDAnalysis <https://code.google.com/p/mdanalysis/>`_ (version >= 0.11).

Optionally, PBxplore can use:
Expand Down Expand Up @@ -90,10 +90,10 @@ Contact & Support

PBxplore is a research software and has been developped by:

* Pierre Poulain, "Mitochondria, Metals and Oxidative Stress" group, Institut Jacques Monod, UMR 7592, Univ. Paris Diderot, CNRS, Sorbonne Paris Cité, France.
* Pierre Poulain, "Mitochondria, Metals and Oxidative Stress" group, Institut Jacques Monod, UMR 7592, Univ. Paris, CNRS, France.
* Jonathan Barnoud, University of Groningen, Groningen, The Netherlands.
* Hubert Santuz, Laboratoire de Biochimie Théorique, CNRS UPR 9080, Institut de Biologie Physico-Chimique, Paris, France.
* Alexandre G. de Brevern, DSIMB, INSERM, U 1134, INTS, Paris, France.
* Alexandre G. de Brevern & Gabriel Cretin, DSIMB, INSERM, UMR_S 1134, INTS, Univ Paris, Paris, France.

If you want to report a bug, request a feature,
use the `GitHub issue system <https://github.com/pierrepo/PBxplore/issues>`_.
Expand Down
5 changes: 2 additions & 3 deletions devtools/bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[bumpversion]
commit = True
tag = True
current_version = 1.3.8
current_version = 1.4.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
serialize =
serialize =
{major}.{minor}.{patch}

[bumpversion:file:setup.py]
Expand All @@ -18,4 +18,3 @@ serialize =
search = **Dev**
replace = **Dev**
**{new_version}**

4 changes: 2 additions & 2 deletions devtools/conda/pbxplore/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package:
name: pbxplore
version: "1.3.8"
version: "1.4.0"

source:
git_url: https://github.com/pierrepo/PBxplore.git
git_rev: v1.3.8
git_rev: v1.4.0

build:
entry_points:
Expand Down
14 changes: 7 additions & 7 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import sys
import os

AUTHORS = [u'Jonathan Barnoud', u'Hubert Santuz',
u'Alexandre G. de Brevern', u'Pierre Poulain']
AUTHORS = ['Jonathan Barnoud', 'Hubert Santuz',
'Alexandre G. de Brevern', 'Pierre Poulain']

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -52,8 +52,8 @@
master_doc = 'index'

# General information about the project.
project = u'PBxplore'
copyright = u'2017, Jonathan Barnoud, Hubert Santuz, Alexandre G. de Brevern, and Pierre Poulain'
project = 'PBxplore'
copyright = '2017, Jonathan Barnoud, Hubert Santuz, Alexandre G. de Brevern, and Pierre Poulain'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -209,7 +209,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('ind', 'PBxploreAPI.tex', u'PBxplore API Documentation',
('ind', 'PBxploreAPI.tex', 'PBxplore API Documentation',
' '.join(AUTHORS), 'manual'),
]

Expand Down Expand Up @@ -239,7 +239,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('ind', 'pbxploreapi', u'PBxplore API Documentation',
('ind', 'pbxploreapi', 'PBxplore API Documentation',
AUTHORS, 1)
]

Expand All @@ -253,7 +253,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('ind', 'PBxploreAPI', u'PBxplore API Documentation',
('ind', 'PBxploreAPI', 'PBxplore API Documentation',
' '.join(AUTHORS), 'PBxploreAPI', 'One line description of project.',
'Miscellaneous'),
]
Expand Down
4 changes: 2 additions & 2 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ we try in this document to provide few guidelines regarding PBxplore setup.
Supported Platforms
-------------------

Currently, `PBxplore` run with Python 2.7, 3.4, 3.5 and 3.6 on Linux and Mac OS X.
Currently, `PBxplore` run with Python >=3.6 on Linux and Mac OS X.


Dependencies
Expand Down Expand Up @@ -50,7 +50,7 @@ If none of the dependencies were previously installed, the installation process
The former command will install the PBxplore command-line scripts in:

- ``$HOME/.local/bin`` on Linux.
- ``~/Library/Python/X.Y/bin`` on Mac OSX, where ``X.Y`` stands for the Python version (for instance ``2.7`` for Python 2.7 and ``3.5`` for Python 3.5).
- ``~/Library/Python/X.Y/bin`` on Mac OSX, where ``X.Y`` stands for the Python version (for instance ``3.8`` for Python 3.8).

Do not forget to update your ``$PATH`` environment variable to make all PBxplore tools accessible. As an example, with the Bash shell, this gives:

Expand Down
2 changes: 1 addition & 1 deletion pbxplore/PB.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
.. autoexception:: InvalidBlockError
"""

from __future__ import print_function, absolute_import


# Standard modules
import os
Expand Down
4 changes: 2 additions & 2 deletions pbxplore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
See :func:`pbxplore.assignment.assign`
"""

__version__ = "1.3.8"
__version__ = "1.4.0"

from .structure.loader import *
from .assignment import assign
Expand All @@ -40,7 +40,7 @@ def test():

#Get informations about system
tests.system_info()
print("pytest version {}".format(pytest.__version__))
print(("pytest version {}".format(pytest.__version__)))

# run pytest
try:
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/analysis/compare.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import


# Third-party module
import numpy
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/analysis/count.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import



# Third-party module
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/analysis/neq.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import


# Standard modules
import math
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/analysis/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import



# Local module
Expand Down
20 changes: 10 additions & 10 deletions pbxplore/analysis/visualization.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import


# Standard modules
import os
Expand All @@ -15,14 +15,14 @@
import matplotlib.pyplot as plt

try:
import weblogolib
import weblogo
# Weblogo compatibility
# With version < 3.5, the color class is 'ColorGroup'. In version >= 3.5,
# it is 'SymbolColor'. Here, we change to always have 'ColorGroup'.
try:
ColorGroup = weblogolib.SymbolColor
ColorGroup = weblogo.SymbolColor
except AttributeError:
ColorGroup = weblogolib.ColorGroup
ColorGroup = weblogo.ColorGroup
except ImportError:
IS_WEBLOGO = False
else:
Expand Down Expand Up @@ -221,22 +221,22 @@ def generate_weblogo(fname, count_mat, idx_first_residue=1, residue_min=1, resid
count = utils._slice_matrix(count_mat, idx_first_residue, residue_min, residue_max)

# Create a custom color scheme for PB
colors = weblogolib.ColorScheme([ColorGroup("d", "#1240AB", "strand main"),
colors = weblogo.ColorScheme([ColorGroup("d", "#1240AB", "strand main"),
ColorGroup("abcdef", "#1240AB", "strand others"),
ColorGroup("ghij", "#0BD500", "coil"),
ColorGroup("m", "#FD0006", "helix main"),
ColorGroup("klnop", "#FD0006", "helix others")])

# Load data from an occurence matrix
data = weblogolib.LogoData.from_counts(PB.NAMES, count)
data = weblogo.LogoData.from_counts(PB.NAMES, count)

# Create options
options = weblogolib.LogoOptions(fineprint=False, logo_title=title, color_scheme=colors,
stack_width=weblogolib.std_sizes["large"],
options = weblogo.LogoOptions(fineprint=False, logo_title=title, color_scheme=colors,
stack_width=weblogo.std_sizes["large"],
first_residue=residue_min)

# Generate weblogo
logo = weblogolib.LogoFormat(data, options)
logo = weblogo.LogoFormat(data, options)

# Retrieve image format
image_format = os.path.splitext(fname)[1][1:]
Expand All @@ -245,7 +245,7 @@ def generate_weblogo(fname, count_mat, idx_first_residue=1, residue_min=1, resid
try:
if image_format == 'jpg':
image_format = 'jpeg'
formatter = weblogolib.formatters[image_format]
formatter = weblogo.formatters[image_format]
except KeyError:
raise ValueError("Invalid format image '{0}'."
" Valid ones are : eps, png, pdf, jpg/jpeg, svg".format(image_format))
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.. autofunction:: assign
"""

from __future__ import print_function, absolute_import


# Third-party module
import numpy
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/io/fasta.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import


# Standard modules
import os
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/io/write.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import


# Standard modules
# import os
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/scripts/PBassign.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""

# Use print as a function for python 3 compatibility
from __future__ import print_function


# Standard modules
import os
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/scripts/PBcount.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


# Use print as a function for python 3 compatibility
from __future__ import print_function


# Standard modules
import os
Expand Down
4 changes: 2 additions & 2 deletions pbxplore/scripts/PBstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Modules
# ============================================================================
# Use print as a function for python 3 compatibility
from __future__ import print_function


# Standard modules
import os
Expand All @@ -25,7 +25,7 @@

# Weblogolib is an optional requirement
try:
import weblogolib
import weblogo
except:
IS_WEBLOGO = False
else:
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/structure/PDB.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import


# Standard modules
import os
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/structure/loader.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, print_function

import sys

# Local module
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/structure/structure.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function, absolute_import


# Standard module
import math
Expand Down
2 changes: 1 addition & 1 deletion pbxplore/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def system_info():
module_info("numpy")
module_info("MDAnalysis")
module_info("matplotlib")
module_info("weblogolib")
module_info("weblogo")

py_version = sys.version.replace('\n', '')
print("Python version {0}".format(py_version))
Loading

0 comments on commit 1aea178

Please sign in to comment.