philosophy.rst 2.26 KB
Newer Older
Tianbai Xiao's avatar
Tianbai Xiao committed
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
Philosophy 
-------------

*************
Open Science
*************


****************************
Code development
****************************

Continuous Integration (CI)
============================

Every commit on the master branch will trigger a build test and unit tests.
If either of the tests fail you will get an email, telling you the 'pipeline' has failed. If this happens, visit the 'CI/CD' tab and check what went wrong and try to fix the error as soon as possible.
Creating a merge request from a branch into the master branch will (not tested yet) also trigger the tests and your merge will be rejected in case any test fails.

As a temporary solution, these tests will currently be done on a low power virtual machine running on a 24/7 online PC at Jannick's place (i.e. don't create computationally expensive tests right now as they will fail if exceeding 1GB of memory).

If you add additional libraries to the code, these also need to be added to the test environment, i.e. the respective docker container.

Little guide:

Test the library installation in the docker container

.. code-block:: bash 

      docker run -it --rm rtsn/test:latest bash

Note the steps required and add them to the `Dockerfile` in the `scripts` folder.
Build the new container (takes some time)

.. code-block:: bash 
      cd docker build -t rtsn/test:latest .

or commit your changes to the image (google that procedure).
Push the new image to `hub.docker.com`

.. code-block:: bash 
     docker push rtsn/test:latest

This last step requires a preceeding `docker login`. Ask Jannick for login credentials.



Coding Style
==============

Please stick to the following coding style for easier code readability:

 - class variables start with an underscore and lowercase letters e.g. ``_foo``
 - functions start with a capital letter e.g. ``GetSettings()``
 - any variable/function names have capital letters at each individual word e.g. ``GetAllCellsAdjacentTo(Cell i)``

Please also use the provided ``code/.clang-format`` style format to format your code before pushing your latest commits.
Some editors offer to automatically apply the style format upon saving a file (e.g. ``Qtcreator``).

***********************
Scrum
***********************