Browse Source

Close issue #1

Phyks (Lucas Verney) 2 years ago
parent
commit
9ef1a29d25
3 changed files with 105 additions and 1 deletions
  1. 28
    0
      README.md
  2. 14
    1
      docs/source/index.rst
  3. 63
    0
      docs/source/install.rst

+ 28
- 0
README.md View File

@@ -45,6 +45,34 @@ install the matching software (`CERMINE`, `Grobid` or `pdf-extract`). See the
45 45
 docstrings of those functions for more infos on this particular point.
46 46
 
47 47
 
48
+## Installation
49
+
50
+Either use `pip install libbmc` or download the ZIP archive from this repo and
51
+install it manually using `python setup.py install`.
52
+
53
+
54
+## Running unittests
55
+
56
+Just run
57
+```
58
+nosetests --with-doctest
59
+```
60
+
61
+at the root of the Git repository to run the unittests.
62
+
63
+
64
+## Building the doc
65
+
66
+Just run
67
+
68
+```
69
+cd docs
70
+make html
71
+```
72
+
73
+Documentation will be generated in the `docs/build/html` folder.
74
+
75
+
48 76
 ## Note on `__valid_identifiers__`
49 77
 
50 78
 `libbmc` exposes a `__valid_identifiers__` list, containing the valid

+ 14
- 1
docs/source/index.rst View File

@@ -6,11 +6,25 @@
6 6
 Welcome to LibBMC's documentation!
7 7
 ==================================
8 8
 
9
+:Author: Phyks (Lucas Verney)
10
+:Devel: `github.com project <https://github.com/Phyks/libbmc/>`_
11
+:Mirror: `git.phyks.me <http://git.phyks.me/Phyks/libbmc>`_
12
+:Bugs: `github.com <https://github.com/Phyks/libbmc/issues>`_
13
+:Generated: |today|
14
+:License: MIT
15
+:Version: |release|
16
+
17
+A python library to deal with scientific papers.
18
+
19
+
9 20
 Contents:
10 21
 
11 22
 .. toctree::
12 23
    :maxdepth: 2
13 24
 
25
+   install.rst
26
+   libbmc.rst
27
+
14 28
 
15 29
 
16 30
 Indices and tables
@@ -19,4 +33,3 @@ Indices and tables
19 33
 * :ref:`genindex`
20 34
 * :ref:`modindex`
21 35
 * :ref:`search`
22
-

+ 63
- 0
docs/source/install.rst View File

@@ -0,0 +1,63 @@
1
+========================
2
+How to install and test?
3
+========================
4
+
5
+How to install?
6
+===============
7
+
8
+Requirements
9
+------------
10
+
11
+* python **3.3** or newer
12
+* See ``README.md`` for full details on external dependencies.
13
+
14
+
15
+PyPI (recommended)
16
+---------------------------------
17
+
18
+`See Pypi <https://pypi.python.org/pypi/libbmc/>`_
19
+
20
+To install with pip:
21
+
22
+.. code-block:: sh
23
+
24
+    pip install libbmc
25
+
26
+
27
+Manual installation (recommended for packagers)
28
+-----------------------------------------------
29
+
30
+`Download <ihttps://github.com/Phyks/libbmc/archive/master.zip>`_ the archive.
31
+
32
+.. code-block:: sh
33
+
34
+    python setup.py install
35
+
36
+
37
+How to run the test suite?
38
+==========================
39
+
40
+This page briefly describes how to run the test suite.
41
+This is useful for contributors, for packagers but also for users who wants to check their environment.
42
+
43
+
44
+Virtualenv
45
+----------
46
+
47
+You can make a virtualenv. I like `pew <https://pypi.python.org/pypi/pew/>`_ for that because the API is easier.
48
+
49
+The first time, you need to make a virtualenv
50
+
51
+.. code-block:: sh
52
+
53
+    pew mkproject libbmc
54
+    pip install -r requirements.txt
55
+    python setup.py install
56
+    nosetest
57
+
58
+
59
+If you already have a virtualenv, you can use workon
60
+
61
+.. code-block:: sh
62
+
63
+    pew workon libbmc