Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bis-aria
ariaec
Commits
476478c5
Commit
476478c5
authored
Mar 30, 2018
by
Fabrice ALLAIN
Browse files
Added coverage report in generated ci files
parent
6ee017a8
Changes
18
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
476478c5
...
...
@@ -36,6 +36,7 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
*.pytest_cache/
# PyInstaller
################################################################################# Usually these files are written by a python script from a template
...
...
.gitlab-ci.yml
View file @
476478c5
...
...
@@ -8,6 +8,7 @@ services:
stages
:
-
build
-
test
-
coverage
-
cleanup
build
:
...
...
@@ -18,19 +19,49 @@ build:
-
docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME" .
-
docker push "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME"
coverage
:
stage
:
coverage
image
:
registry-gitlab.pasteur.fr/bis-aria/ariaec:master
script
:
-
pytest --cov=aria
coverage
:
'
/TOTAL.+
([0-9]{1,3}%)/'
artifacts
:
paths
:
-
htmlcov/
coverage
:
stage
:
coverage
script
:
-
nosetests -c .noserc -q --cover-html-dir=build --cover-html
-
coverage report -m
coverage
:
'
/TOTAL.+
([0-9]{1,3}%)/'
artifacts
:
paths
:
-
build
pages
:
image
:
registry-gitlab.pasteur.fr/bis-aria/ariaec:master
dependencies
:
-
coverage
script
:
-
cd ${CI_PROJECT_DIR}/docs/
-
make html
-
cd ${CI_PROJECT_DIR}
-
mv ${CI_PROJECT_DIR}/docs/_build/html/ public
-
mv htmlcov public/
artifacts
:
paths
:
-
public
only
:
-
master
pytest
:
image
:
registry-gitlab.pasteur.fr/bis-aria/ariaec:master
stage
:
test
script
:
-
pytest -sx --doctest-modules --doctest-ignore-import-errors --cov=aria
# unittest:
# image: registry-gitlab.pasteur.fr/bis-aria/ariaec:master
# stage: test
...
...
Dockerfile
View file @
476478c5
...
...
@@ -4,7 +4,7 @@ MAINTAINER Fabrice Allain <fabrice.allain@pasteur.fr>
RUN
yum
install
-y
epel-release
RUN
yum
install
-y
python2-pip python-devel gcc make
RUN
pip
install
--upgrade
pip
;
pip
install
--upgrade
setuptools
;
pip
install
sphinx
;
pip
install
numpy
;
pip
install
matplotlib
RUN
pip
install
--upgrade
pip
;
pip
install
--upgrade
setuptools
;
pip
install
sphinx
;
pip
install
numpy
;
pip
install
matplotlib
;
pip
install
coverage
;
RUN
mkdir
build-aria
ADD
aria /build-aria/aria
...
...
PKG-INFO
View file @
476478c5
Version: 0.
2.3
Version: 0.
0.17
README.rst
0 → 100644
View file @
476478c5
de Novo Ambiguous Restraints for Iterative Assignment
=====================================================
**A pipeline for automated de novo contact map assignment**
|Pipeline status| |Coverage report|
``ariaec`` is a Python_ library that provides *de novo* structure prediction
based on ARIA_ pipeline and evolutionary restraints inferred from co-evolution.
The package add several command line interfaces aside the usual ARIA commands in
order to convert data, setup an ARIA project with evolutionary restraints,
analyze contact maps or protein structures and generate statistics from a culled
list of PDB files. An exhaustive list of the commands is available in the
section
``nbsphinx`` is a Sphinx_ extension that provides a source parser for
``*.ipynb`` files.
Custom Sphinx directives are used to show `Jupyter `_ code cells (and of
course their results) in both HTML and LaTeX output.
Un-evaluated notebooks -- i.e. notebooks without stored output cells -- will be
automatically executed during the Sphinx build process.
Quick Start:
------------
#. Be sure to check if ``pip`` (>= 9.0), ``setuptools`` (>= 18.0), ``numpy``
(>= 1.11) and ``matplotlib`` are actually instaled in your personnal python
installation or virtual environment.
#. Download the ``zip`` or ``tar`` version at https://gitlab.pasteur.fr/bis-aria/ariaec
#. Edit your ``index.rst`` and add the names of your ``*.ipynb`` files
to the ``toctree``.
#. Run Sphinx!
Online documentation (and example of use):
http://nbsphinx.readthedocs.io/
Source code repository (and issue tracker):
https://github.com/spatialaudio/nbsphinx/
License:
--------
.. MIT -- see the file ``LICENSE`` for details.
.. Hyperlinks
.. _ARIA: http://aria.pasteur.fr
.. _Python: https://www.python.org
.. _Sphinx: http://sphinx-doc.org/
.. _Jupyter Notebook: http://jupyter.org/
aria.shub
View file @
476478c5
...
...
@@ -4,7 +4,7 @@ FROM: centos:centos7
%labels
maintainer Fabrice Allain <fabrice.allain@pasteur.fr>
package.name ariaec
package.version 0.
2.3
package.version 0.
1.0
package.homepage https://gitlab.pasteur.fr/bis-aria/ariaec
%post
...
...
aria/core/JobManager.py
View file @
476478c5
...
...
@@ -42,27 +42,6 @@ import subprocess
import
pkg_resources
as
pkgr
def
check_output
(
*
popenargs
,
**
kwargs
):
r
"""Run command with arguments and return its output as a byte string.
Backported from Python 2.7 as it's implemented as pure python on stdlib.
>>> check_output(['/usr/bin/python', '--version'])
Python 2.6.2
"""
process
=
subprocess
.
Popen
(
stdout
=
subprocess
.
PIPE
,
*
popenargs
,
**
kwargs
)
output
,
unused_err
=
process
.
communicate
()
retcode
=
process
.
poll
()
if
retcode
:
cmd
=
kwargs
.
get
(
"args"
)
if
cmd
is
None
:
cmd
=
popenargs
[
0
]
error
=
subprocess
.
CalledProcessError
(
retcode
,
cmd
)
error
.
output
=
output
raise
error
return
output
class
PartlyUsedNodesFinder
:
def
__init__
(
self
,
queue
,
exclude_list
=
None
):
if
exclude_list
is
None
:
...
...
@@ -72,7 +51,7 @@ class PartlyUsedNodesFinder:
def
find
(
self
):
# Retrieve qstat -f result and split in lines
qstat_array
=
check_output
([
'qstat'
,
'-f'
]).
split
(
'
\n
'
)[:
-
1
]
qstat_array
=
subprocess
.
check_output
([
'qstat'
,
'-f'
]).
split
(
'
\n
'
)[:
-
1
]
# Filter results for the appropiate queue
qstat_array
=
filter
(
lambda
x
:
self
.
queue
in
x
,
qstat_array
)
# split qstat -f row into columns
...
...
aria/core/ccpn2top.py
View file @
476478c5
...
...
@@ -41,7 +41,6 @@ from .Topology import Topology, BaseResidueSettings, BaseResidue, \
# TODO [FALLAIN] works with py3 ?
from
ccp.general.Io
import
getChemComp
from
memops.api
import
Implementation
# TODO [FALLAIN] lines below not used if installation done with setuptools
...
...
aria/core/legacy/AminoAcid.py
View file @
476478c5
...
...
@@ -18,7 +18,7 @@ def AminoAcid(input):
the 3-letter-code as element 1 and the name as element 2.
all returned 1- and 3-letter codes are uppercase, the name
is lowercase.
if the input is not a common amino acid, the elements 0 and 1 will be
if the input is not a common amino acid, the elements 0 and 1 will be
empty
Parameters
----------
...
...
aria/core/legacy/test/test_AminoAcid.py
View file @
476478c5
...
...
@@ -5,14 +5,19 @@ Created on 9/16/16
@author: fallain
"""
import
pytest
from
aria.core.legacy.AminoAcid
import
AminoAcid
from
core.legacy.AminoAcid
import
AminoAcid
@
pytest
.
fixture
()
def
amino_acid_2l3l
():
return
((),())
@
pytest
.
fixture
(
scope
=
"module"
,
params
=
[
'A'
,
'ALA'
,
'R'
,
'ARG'
,
'N'
,
'ASN'
,
'D'
,
'ASP'
,
'C'
,
'CYS'
,
'Q'
,
'GLN'
,
'E'
,
'GLU'
,
'G'
,
'GLY'
,
'H'
,
'HIS'
,
'I'
,
'ILE'
,
'L'
,
'LEU'
,
'K'
,
'LYS'
,
'M'
,
'MET'
,
'F'
,
'PHE'
,
'P'
,
'PRO'
,
'S'
,
'SER'
,
'T'
,
'THR'
,
'W'
,
'TRP'
,
'Y'
,
'TYR'
,
'V'
,
'VAL'
])
def
amino_acid_2l3l
(
request
):
yield
request
.
param
def
test_convert_amino_acid
(
amino_acid_2l3l
):
pass
\ No newline at end of file
aa
=
AminoAcid
(
amino_acid_2l3l
)
assert
len
(
aa
)
==
3
assert
aa
[
0
]
aria/core/scientific/FortranFormat.py
View file @
476478c5
...
...
@@ -21,36 +21,27 @@
#
"""
Fortran-style formatted input/output
Fortran-style formatted input/output
This module provides two classes that aid in reading and writing
Fortran-formatted text files.
This module provides two classes that aid in reading and writing
Fortran-formatted text files.
Example
s:
:
:
Example:
Input::
>>>s = ' 59999'
>>>format = FortranFormat('2I4')
>>>line = FortranLine(s, format)
>>>print(line[0])
>>>print(line[1])
>>> s = ' 59999'
>>> format = FortranFormat('2I4')
>>> line = FortranLine(s, format)
>>> print(line[0])
5
>>> print(line[1])
9999
prints::
>>> format = FortranFormat('2D15.5')
>>> line = FortranLine([3.1415926, 2.71828], format)
>>> print(str(line))
3.14159D+00 2.71828D+00
>>>5
>>>9999
Output::
>>>format = FortranFormat('2D15.5')
>>>line = FortranLine([3.1415926, 2.71828], format)
>>>print(str(line))
prints::
'3.14159D+00 2.71828D+00'
"""
import
string
...
...
aria/core/scientific/PDB.py
View file @
476478c5
...
...
@@ -6,50 +6,55 @@
#
"""
Parsing and writing of Protein Data Bank (PDB) files
This module provides classes that represent PDB (Protein Data Bank)
files and configurations contained in PDB files. It provides access to
PDB files on two levels: low-level (line by line) and high-level
(chains, residues, and atoms).
Caution: The PDB file format has been heavily abused, and it is
probably impossible to write code that can deal with all variants
correctly. This modules tries to read the widest possible range of PDB
files, but gives priority to a correct interpretation of the PDB
format as defined by the Brookhaven National Laboratory.
A special problem are atom names. The PDB file format specifies that
the first two letters contain the right-justified chemical element
name. A later modification allowed the initial space in hydrogen names
to be replaced by a digit. Many programs ignore all this and treat the
name as an arbitrary left-justified four-character name. This makes it
difficult to extract the chemical element accurately; most programs
write the '"CA"' for C_alpha in such a way that it actually stands for
a calcium atom. For this reason a special element field has been added
later, but only few files use it. In the absence of an element field,
the code in this module attempts to guess the element using all information
available.
The low-level routines in this module do not try to deal with the atom
name problem; they return and expect four-character atom names
including spaces in the correct positions. The high-level routines use
atom names without leading or trailing spaces, but provide and use the
element field whenever possible. For output, they use the element
field to place the atom name correctly, and for input, they construct
the element field content from the atom name if no explicit element
field is found in the file.
Except where indicated, numerical values use the same units and
conventions as specified in the PDB format description.
Example::
>>>conf = Structure('example.pdb')
>>>print(conf)
>>>for residue in conf.residues:
>>> for atom in residue:
>>> print(atom)
Parsing and writing of Protein Data Bank (PDB) files
This module provides classes that represent PDB (Protein Data Bank)
files and configurations contained in PDB files. It provides access to
PDB files on two levels: low-level (line by line) and high-level
(chains, residues, and atoms).
Caution: The PDB file format has been heavily abused, and it is
probably impossible to write code that can deal with all variants
correctly. This modules tries to read the widest possible range of PDB
files, but gives priority to a correct interpretation of the PDB
format as defined by the Brookhaven National Laboratory.
A special problem are atom names. The PDB file format specifies that
the first two letters contain the right-justified chemical element
name. A later modification allowed the initial space in hydrogen names
to be replaced by a digit. Many programs ignore all this and treat the
name as an arbitrary left-justified four-character name. This makes it
difficult to extract the chemical element accurately; most programs
write the '"CA"' for C_alpha in such a way that it actually stands for
a calcium atom. For this reason a special element field has been added
later, but only few files use it. In the absence of an element field,
the code in this module attempts to guess the element using all information
available.
The low-level routines in this module do not try to deal with the atom
name problem; they return and expect four-character atom names
including spaces in the correct positions. The high-level routines use
atom names without leading or trailing spaces, but provide and use the
element field whenever possible. For output, they use the element
field to place the atom name correctly, and for input, they construct
the element field content from the atom name if no explicit element
field is found in the file.
Except where indicated, numerical values use the same units and
conventions as specified in the PDB format description.
:Example:
>>> conf = Structure('examples/werner/result/hrdc_10_water.pdb')
>>> print(conf)
Structure('examples/werner/result/hrdc_10_water.pdb'):
Peptide chain of length 91
<BLANKLINE>
>>> for residue in conf.residues:
... for atom in residue:
... pass
>>> print(atom)
Atom OT2 at [7.831 6.168 6.392]
@undocumented: atom_format
@undocumented: anisou_format
...
...
docs/conf.py
View file @
476478c5
...
...
@@ -37,7 +37,8 @@ extensions = [
'sphinx.ext.coverage'
,
'sphinx.ext.mathjax'
,
'sphinx.ext.viewcode'
,
'sphinx.ext.napoleon'
'sphinx.ext.napoleon'
,
'sphinx.ext.nbsphinx'
]
# Add any paths that contain templates here, relative to this directory.
...
...
@@ -53,20 +54,22 @@ source_suffix = '.rst'
master_doc
=
'index'
# General information about the project.
project
=
u
'ARIA'
copyright
=
u
'2017, Benjamin Bardiaux, Michael Habeck, Therese Malliavin,'
\
u
' Wolfgang Rieping, and Michael Nilges'
project
=
u
'ARIAEC'
import
time
author
=
u
'Benjamin Bardiaux, Michael Habeck, Therese Malliavin, '
\
u
'Wolfgang Rieping, and Michael Nilges'
copyright
=
u
'{}, {}'
.
format
(
time
.
strftime
(
"%Y"
),
author
)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version
=
u
'2'
import
setup
version
=
setup
.
get_version
()
# The full version, including alpha/beta/rc tags.
release
=
u
'4'
release
=
setup
.
get_version
()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
...
...
@@ -78,7 +81,7 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns
=
[
'_build'
,
'Thumbs.db'
,
'.DS_Store'
]
exclude_patterns
=
[
'_build'
,
'Thumbs.db'
,
'.DS_Store'
,
'**.ipynb_checkpoints'
]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style
=
'sphinx'
...
...
docs/contents.rst
deleted
100644 → 0
View file @
6ee017a8
.. _contents:
Sphinx documentation contents
=============================
.. toctree::
:maxdepth: 2
installation
tutorial
modules
copyright
Indices and tables
==================
.. only:: builder_html
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
* :ref:`glossary`
.. only:: not builder_html
* :ref:`modindex`
* :ref:`glossary`
\ No newline at end of file
docs/examples/index.rst
0 → 100644
View file @
476478c5
docs/index.rst
View file @
476478c5
...
...
@@ -3,13 +3,19 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to ARIAEC's documentation!
==================================
.. include:: ../README.rst
.. toctree::
:maxdepth:
2
:caption: Contents
:
:maxdepth:
1
:caption: Contents
introduction
changelog
installation
tutorial
examples/index
api
Indices and tables
...
...
setup.cfg
View file @
476478c5
...
...
@@ -5,3 +5,9 @@
universal=1
[egg_info]
# tag_build = .dev
[aliases]
test=pytest
[tool:pytest]
log_print=no
log_cli=no
log_level=info
\ No newline at end of file
setup.py
View file @
476478c5
...
...
@@ -192,8 +192,10 @@ def setup_package():
setup_requires
=
[
# Setuptools 18.0 properly handles Cython extensions.
'setuptools>=18.0'
,
'cython'
'cython'
,
'pytest-runner'
],
tests_requires
=
[
'pytest'
,
'pytest-cov'
],
# Project uses reStructuredText, so ensure that the docutils get
# installed or upgraded on the target machine
install_requires
=
[
...
...
@@ -219,6 +221,7 @@ def setup_package():
'tqdm'
,
'hdbscan'
,
'conkit'
,
'nbsphinx'
,
# 'scikit-bio' Doesn't works with python 2.7. Only 3.4 +
],
entry_points
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment