Skip to content

Commit

Permalink
Finalize docs for 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed Mar 27, 2017
1 parent 62a0668 commit 80703c9
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 28 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
abipy is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License version 2 as published by
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation

abipy is distributed in the hope that it will be useful,
Expand All @@ -8,4 +8,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with abipy.
If not, see <http://www.gnu.org/licenses/>.
If not, see http://www.gnu.org/licenses/.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.. :Repository: https://github.com/abinit/abipy
.. :Author: Matteo Giantomassi (http://github.com/abinit)
.. image:: https://pypip.in/v/abipy/badge.png
:target: https://pypi.python.org/pypi/abipy
.. image:: https://badge.fury.io/py/abipy.svg
:target: https://badge.fury.io/py/abipy

.. image:: https://img.shields.io/travis/abinit/abipy/master.svg
.. image:: https://travis-ci.org/abinit/abipy.svg?branch=develop
:target: https://travis-ci.org/abinit/abipy

.. image:: https://coveralls.io/repos/github/abinit/abipy/badge.svg?branch=master
:target: https://coveralls.io/github/abinit/abipy?branch=master
.. image:: https://coveralls.io/repos/github/abinit/abipy/badge.svg?branch=develop
:target: https://coveralls.io/github/abinit/abipy?branch=develop

.. image:: https://img.shields.io/badge/license-GPL-blue.svg

Expand Down
5 changes: 2 additions & 3 deletions abipy/examples/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
==============
abipy examples
AbiPy examples
==============

There are a variety of ways to use abipy, and most of them are
There are a variety of ways to use AbiPy, and most of them are
illustrated in the examples in this directory.

Below is a brief description of the different directories found here:
Expand Down
9 changes: 8 additions & 1 deletion abipy/examples/_runplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from subprocess import call, Popen
from abipy.core.testing import change_matplotlib_backend, revert_matplotlib_backend


def str_examples():
examples = """
Usage example:\n\n
Expand All @@ -36,7 +37,8 @@ def show_examples_and_exit(err_msg=None, error_code=1):
def main():
parser = argparse.ArgumentParser(epilog=str_examples(),formatter_class=argparse.RawDescriptionHelpFormatter)

parser.add_argument('-b', '--backend', type=str, default="", help="matplotlib backend")
parser.add_argument('-b', '--backend', type=str, default="",
help="matplotlib backend e.g. Agg for non-graphical display.")

parser.add_argument('-m', '--mode', type=str, default="automatic",
help="execution mode. Either s (sequential) or a (automatic)")
Expand All @@ -46,6 +48,11 @@ def main():

options = parser.parse_args()

#import matplotlib
#if options.backend:
# print("Using ", matplotlib.backend, "matplotlib backend")
# matplotlib.use(matplotlib.backend)

change_matplotlib_backend(new_backend=options.backend)

# Find scripts.
Expand Down
14 changes: 12 additions & 2 deletions abipy/examples/tests/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,19 @@

class TestPlots(AbipyTest):

def test_plots(self):
#def test_plots_with_runtests(self):
# """Running _runplots script."""
# if not self.has_matplotlib():
# raise unittest.SkipTest("matplotlib is not installed")

# script = os.path.abspath(os.path.join(root, "..", "_runplots.py"))
# assert os.path.exists(script)
# assert os.system(script + " --backend Agg")

def test_plots_with_exec(self):
"""Running plot script with exec."""
if not self.has_matplotlib():
raise unittest.SkipTest("sympy is not installed")
raise unittest.SkipTest("matplotlib is not installed")

#0 file /home/travis/build/abinit/abipy/abipy/examples/tests/../plot/plot_qpconverge.py
# Traceback (most recent call last):
Expand Down
7 changes: 2 additions & 5 deletions docs/devel/coding_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ When committing changes to AbiPy, there are a few things to bear in mind.

* Are your changes python2.7 compatible?

* Can you pass the automatic tests? (:file:`README-tests.rst` describes how to run the tests)
* Can you pass the automatic tests?

* Can you add a test to :file:`abipy/tests` to test your changes?
* Can you add a test to test your changes?

* if you have added new files or directories, or reorganized existing
ones, are the new files included in the match patterns in :file:`MANIFEST.in`.
Expand Down Expand Up @@ -60,9 +60,6 @@ Prefer the shortest names that are still readable.
Configure your editor to use spaces, not hard tabs.
The standard indentation unit is always four spaces;
if there is a file with tabs or a different number of spaces it is a bug -- please fix it.
To detect and fix these and other whitespace errors (see below),
use :file:`tools/reindent.py` as a command-line script.
Unless you are sure your editor always does the right thing, please use reindent.py before committing your changes.

Keep docstrings uniformly indented as in the example below, with nothing to the left of the triple quotes.

Expand Down
7 changes: 2 additions & 5 deletions docs/devel/documenting_guide.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
.. _documenting-abipy:

*****************
Documenting abipy
Documenting AbiPy
*****************

Getting started
===============

The documentation for abipy is generated from ReStructured Text using the Sphinx_ documentation generation tool.
Sphinx-1.0 or later is required.

The documentation for AbiPy is generated from ReStructured Text using the Sphinx_ documentation generation tool.
The documentation sources are found in the :file:`docs/` directory in the trunk.
To build the users guide in html format, cd into :file:`docs/` and do::

make html

The output produced by Sphinx can be configured by editing the :file:`conf.py` file located in the :file:`docs/`.


Organization of AbiPy's documentation
=====================================

Expand Down
10 changes: 5 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. image:: https://pypip.in/v/abipy/badge.png
:target: https://pypi.python.org/pypi/abipy
.. image:: https://badge.fury.io/py/abipy.svg
:target: https://badge.fury.io/py/abipy

.. image:: https://img.shields.io/travis/abinit/abipy/master.svg
.. image:: https://travis-ci.org/abinit/abipy.svg?branch=master
:target: https://travis-ci.org/abinit/abipy

.. image:: https://coveralls.io/repos/github/abinit/abipy/badge.svg?branch=master
:target: https://coveralls.io/github/abinit/abipy?branch=master
.. image:: https://coveralls.io/repos/github/abinit/abipy/badge.svg?branch=develop
:target: https://coveralls.io/github/abinit/abipy?branch=develop

.. image:: https://img.shields.io/badge/license-GPL-blue.svg

Expand Down

0 comments on commit 80703c9

Please sign in to comment.