aboutsummaryrefslogtreecommitdiff
path: root/docs/getting_started.md
blob: 4951a25f7531d35922adce382a519ca605bcf958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Getting started
=====
Here are all you need to deal with ArGaze library.

!!! note

    *Consider that all inline commands below have to be executed into ArGaze root folder.*

Installation
------------

Install build tool package:

```console
pip install build
```

Then, build ArGaze package:
```console
python -m build
```

Then, install ArGaze package (replace VERSION by what has been built into dist folder):
```console
pip install ./dist/argaze-VERSION.whl
```

!!! note

    **As Argaze library developper**  
    *You should prefer to install the package in developer mode to test live code changes:*

    ```
    pip install -e .
    ```

Documentation
------------

ArGaze has a standard MkDocs layout which is built by Read the Docs. You can build and view this documentation project locally.

Install required Python dependencies (MkDocs etc.):
```console
pip install -r docs/requirements.in
```

Run the mkdocs development server:
```console
mkdocs serve
```

Export the mkdocs site:
```console
mkdocs build
```

## Cookbook

The `argaze.utils` submodule is a good place to get ready made code examples.


Test
------------

ArGaze package unitary tests are based on [unittest](https://docs.python.org/fr/3.10/library/unittest.html) module.  
Test files tree structure is mirroring the file tree structure of src/argaze folder.

To run all unitary tests:

```shell
python -m unittest discover ./src/argaze.test "*.py"
```

To run only submodule unitary tests:

```shell
python -m unittest discover ./src/argaze.test/SUBMODULE "*.py"
```

To run only a single unitary test file from a submodule:

```shell
python -m unittest discover ./src/argaze.test/SUBMODULE/ TEST_FILE.py
```

!!! note

    **Verbose mode**  
    *Use -v option to get more details.*