From 9ef1a29d2514157d1edd6c13ecbd61b07ae9315e Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sat, 2 Apr 2016 16:37:02 +0200 Subject: [PATCH] Close issue #1 --- README.md | 28 ++++++++++++++++++ docs/source/index.rst | 15 +++++++++- docs/source/install.rst | 63 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 docs/source/install.rst diff --git a/README.md b/README.md index 776a4c1..4a3c9e4 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,34 @@ install the matching software (`CERMINE`, `Grobid` or `pdf-extract`). See the docstrings of those functions for more infos on this particular point. +## Installation + +Either use `pip install libbmc` or download the ZIP archive from this repo and +install it manually using `python setup.py install`. + + +## Running unittests + +Just run +``` +nosetests --with-doctest +``` + +at the root of the Git repository to run the unittests. + + +## Building the doc + +Just run + +``` +cd docs +make html +``` + +Documentation will be generated in the `docs/build/html` folder. + + ## Note on `__valid_identifiers__` `libbmc` exposes a `__valid_identifiers__` list, containing the valid diff --git a/docs/source/index.rst b/docs/source/index.rst index 69de99a..e86651f 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,11 +6,25 @@ Welcome to LibBMC's documentation! ================================== +:Author: Phyks (Lucas Verney) +:Devel: `github.com project `_ +:Mirror: `git.phyks.me `_ +:Bugs: `github.com `_ +:Generated: |today| +:License: MIT +:Version: |release| + +A python library to deal with scientific papers. + + Contents: .. toctree:: :maxdepth: 2 + install.rst + libbmc.rst + Indices and tables @@ -19,4 +33,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/docs/source/install.rst b/docs/source/install.rst new file mode 100644 index 0000000..92caa14 --- /dev/null +++ b/docs/source/install.rst @@ -0,0 +1,63 @@ +======================== +How to install and test? +======================== + +How to install? +=============== + +Requirements +------------ + +* python **3.3** or newer +* See ``README.md`` for full details on external dependencies. + + +PyPI (recommended) +--------------------------------- + +`See Pypi `_ + +To install with pip: + +.. code-block:: sh + + pip install libbmc + + +Manual installation (recommended for packagers) +----------------------------------------------- + +`Download `_ the archive. + +.. code-block:: sh + + python setup.py install + + +How to run the test suite? +========================== + +This page briefly describes how to run the test suite. +This is useful for contributors, for packagers but also for users who wants to check their environment. + + +Virtualenv +---------- + +You can make a virtualenv. I like `pew `_ for that because the API is easier. + +The first time, you need to make a virtualenv + +.. code-block:: sh + + pew mkproject libbmc + pip install -r requirements.txt + python setup.py install + nosetest + + +If you already have a virtualenv, you can use workon + +.. code-block:: sh + + pew workon libbmc