1
1
# Tests
2
2
Currently most of the code is not tested. The project has a basic ` tox ` setup
3
- which performs simple tests using ` pytest ` and generates documentation using
4
- ` sphinx ` . The tests are far from complete.
3
+ which performs simple tests using ` pytest ` .
5
4
6
5
Use ` tox ` command to run the tests:
7
6
```
11
10
## Configuration files explained
12
11
- ` setup.cfg ` is a configuration for setuptools.
13
12
- ` tox.ini ` defines what does the ` tox ` command do.
14
- - sphinx configuration is inside ` sphinx_config /conf.py` file.
15
- - ` sphinx_config/index.rst ` defines the content of ` index.html ` file generated
16
- with sphinx. There are other ` rst ` files that define other pages.
17
- - sphinx documentation is generated into ` documentation/ ` path which is
18
- excluded with ` .gitignore `
13
+ - sphinx configuration is inside ` docs /conf.py` file.
14
+ - sphinx documentation can be build using bat script inside ` docs ` folder.
15
+ In order to build the documentation for local preview ` cd ` into ` docs ` folder
16
+ and run ` build.bat html ` script. The documentation will be available in
17
+ ` docs/_build/html ` folder.
19
18
- All test functions should have name compliant to these patterns: ` test_* ` or
20
19
` *_test ` (it's required by ` pytest ` ).
21
20
22
21
# Publishing documentation
23
- This code uses Github pages for documentation. The github pages code is
24
- a copy of ` documentation/ ` directory moved to ` gh-pages ` branch.
22
+ The projects is set up to publish documentation on readthedocs.org.
23
+ This is very basic setup based on the tutorial:
24
+ https://docs.readthedocs.io/en/stable/tutorial/
25
25
26
- You can use the ` mv_documentation.py ` script to copy content of the
27
- ` documentation/ ` folder (generated with ` tox ` ) to ` gh-pages ` branch in order
28
- to publish it.
29
-
30
- The script checkouts to the ` gh-pages ` branch, removes all fiels
31
- and moves the content of ` documentation/ ` directory to root directory. If you
32
- want to stage and commit that changes you have to do that manually.
26
+ The documentation is build automatically on every commit to the ` master `
27
+ branch.
33
28
34
29
# Submodules
35
30
The project uses a git submodule for the source code. I intend to use the same
@@ -44,6 +39,19 @@ git submodule foreach "git add -A"
44
39
git submodule foreach "git commit -m 'Some comment.'"
45
40
```
46
41
42
+ Pulling changes for submodules:
43
+ ```
44
+ git submodule update --remote --recursive
45
+ ```
46
+
47
+ After pulling, if you want to checkout the latest commit from the submodule
48
+ you can use:
49
+ ```
50
+ git submodule foreach "git checkout master"
51
+ ```
52
+ (by default it checks out to specific commit)
53
+
54
+
47
55
# Project configuration
48
56
As of the writing of this document ` setuptools ` uses ` setup.cfg ` and the
49
57
` pyproject.toml ` is in beta. I expect that in the future everything will be
0 commit comments