|
10 | 10 | * addons |
11 | 11 |
|
12 | 12 | The **core** folder contains, as the name implies, all the core components that represent Gitlab CI objects in Python. |
13 | | -You need to know that all class names from all Python modules within the _core_ folder are mapped to the gcip |
14 | | -root module. This is done within the `__init__.py` of the gcip folder. Instead of _import gcip.core.job.Job_ |
15 | | -you should _import gcip.Job_. You should import all classes of the _core_ folder the same way. |
| 13 | +You need to know that all class names from all Python modules within the ```core``` folder are mapped to the gcip |
| 14 | +root module. This is done within the ```__init__.py``` of the gcip folder. Instead of ```import gcip.core.job.Job``` |
| 15 | +you should ```import gcip.Job```. You should import all classes of the ```core``` folder the same way. |
16 | 16 |
|
17 | 17 | Always remember: |
18 | 18 |
|
|
30 | 30 | pipeline = pipeline.Pipeline() |
31 | 31 | ``` |
32 | 32 |
|
33 | | -The **lib** folder contains all higher level objects which are derived from the _core_ objects. For example: `gcip.Rule` |
34 | | -from _gcip.core.rule_ is the general Gitlab CI Rule representation, whereas _core.rules_ contains some convenient |
35 | | -predefined Rule instances like `on_main()` or `on_tags()`. |
| 33 | +The **lib** folder contains all higher level objects which are derived from the ```core``` objects. For example: `gcip.Rule` |
| 34 | +from _gcip.core.rule_ is the general Gitlab CI Rule representation, whereas ```core.rules``` contains some convenient |
| 35 | +predefined Rule instances like ```on_main()``` or ```on_tags()```. |
36 | 36 |
|
37 | 37 | The **tools** folder contains all code which is used by the library code but does not represent any Gitlab CI specific |
38 | 38 | functionality. This directory also contains scripts which could be run on their own and are supposed to be called |
39 | | -by Gitlab CI jobs during the pipeline execution. For example _gcip.tools.url.is_valid_url(str)_ which, as the name implies, |
| 39 | +by Gitlab CI jobs during the pipeline execution. For example ```gcip.tools.url.is_valid_url(str)``` which, as the name implies, |
40 | 40 | checks if `str` is a valid url. |
41 | 41 |
|
42 | 42 | The **addons** folder also contains code which extends the core components in form of higher level objects that provide |
|
49 | 49 |
|
50 | 50 | We also use a following naming conventions throughout the library: |
51 | 51 |
|
52 | | -* Files called _job_scripts.py_ hold functions that return strings, which could be used as command within |
| 52 | +* Files called ```_job_scripts.py``` hold functions that return strings, which could be used as command within |
53 | 53 | Gitlab CI jobs. |
54 | 54 | * Directories called _tools_ hold Python scripts which could be called by Gitlab CI jobs during the pipeline |
55 | | -execution. They will be called directly from the Gitlab CI Python library, e.g. `python3 -m gcip.path.to.script`. |
| 55 | +execution. They will be called directly from the Gitlab CI Python library, e.g. ```python3 -m gcip.path.to.script```. |
56 | 56 | """ |
57 | 57 |
|
58 | 58 | from pkg_resources import ( |
|
0 commit comments