cikit 0.0.5__tar.gz → 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. {cikit-0.0.5 → cikit-0.1.0}/.gitignore +7 -0
  2. {cikit-0.0.5 → cikit-0.1.0}/.gitlab-ci.yml +15 -13
  3. cikit-0.1.0/PKG-INFO +400 -0
  4. cikit-0.1.0/README.md +380 -0
  5. {cikit-0.0.5 → cikit-0.1.0}/ci_commands/all_.py +11 -4
  6. {cikit-0.0.5 → cikit-0.1.0}/ci_commands/coverage.py +7 -3
  7. {cikit-0.0.5 → cikit-0.1.0}/ci_commands/pylint.py +7 -5
  8. {cikit-0.0.5 → cikit-0.1.0}/ci_commands/ruff.py +7 -4
  9. cikit-0.1.0/ci_commands/sphinx.py +116 -0
  10. {cikit-0.0.5 → cikit-0.1.0}/ci_commands/test.py +7 -4
  11. cikit-0.1.0/docs/concepts/artifacts.rst +650 -0
  12. cikit-0.1.0/docs/concepts/cikit_data.rst +663 -0
  13. cikit-0.1.0/docs/concepts/environment.rst +414 -0
  14. cikit-0.1.0/docs/concepts/metadata.rst +504 -0
  15. cikit-0.1.0/docs/concepts/providers.rst +696 -0
  16. {cikit-0.0.5 → cikit-0.1.0}/docs/conf.py +1 -0
  17. cikit-0.1.0/docs/getting_started.rst +269 -0
  18. cikit-0.1.0/docs/guides/azure_devops.rst +341 -0
  19. cikit-0.1.0/docs/guides/builds.rst +761 -0
  20. cikit-0.1.0/docs/guides/ci_commands.rst +634 -0
  21. cikit-0.1.0/docs/guides/gitlab_ci.rst +245 -0
  22. {cikit-0.0.5 → cikit-0.1.0}/docs/guides/index.rst +5 -0
  23. cikit-0.1.0/docs/guides/local_pipeline.rst +627 -0
  24. cikit-0.1.0/docs/guides/macros.rst +645 -0
  25. cikit-0.1.0/docs/guides/sphinx_build.rst +502 -0
  26. cikit-0.1.0/docs/guides/sphinx_extensions.rst +757 -0
  27. cikit-0.1.0/docs/guides/timelines.rst +255 -0
  28. {cikit-0.0.5 → cikit-0.1.0}/docs/index.rst +1 -0
  29. cikit-0.1.0/docs/roadmap.rst +33 -0
  30. {cikit-0.0.5 → cikit-0.1.0}/pyproject.toml +8 -5
  31. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/__init__.py +0 -2
  32. cikit-0.1.0/src/cikit/artifacts.py +345 -0
  33. cikit-0.1.0/src/cikit/badge.py +74 -0
  34. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/command.py +76 -3
  35. cikit-0.1.0/src/cikit/data/README.md +601 -0
  36. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/data/__init__.py +2 -3
  37. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/data/api.py +11 -138
  38. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/data/cli.py +3 -29
  39. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/data/common.py +5 -61
  40. cikit-0.1.0/src/cikit/env/README.md +593 -0
  41. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/env/api.py +227 -53
  42. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/env/env_vars.py +1 -14
  43. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/env/provider.py +100 -0
  44. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/factory.py +38 -1
  45. cikit-0.1.0/src/cikit/json_utils.py +60 -0
  46. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/lint_to_rst.py +53 -17
  47. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/logging_utils.py +16 -1
  48. cikit-0.1.0/src/cikit/macros/README.md +74 -0
  49. cikit-0.1.0/src/cikit/macros/bundle.py +96 -0
  50. cikit-0.1.0/src/cikit/macros/cmake.py +332 -0
  51. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/macros/common.py +5 -4
  52. cikit-0.1.0/src/cikit/macros/coverage.py +171 -0
  53. cikit-0.1.0/src/cikit/macros/platformio.py +304 -0
  54. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/macros/pylint.py +42 -42
  55. cikit-0.1.0/src/cikit/macros/pytest.py +79 -0
  56. cikit-0.1.0/src/cikit/macros/reports.py +183 -0
  57. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/macros/ruff.py +33 -38
  58. cikit-0.1.0/src/cikit/macros/sphinx.py +139 -0
  59. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/project_meta.py +36 -57
  60. cikit-0.1.0/src/cikit/rst_tools.py +463 -0
  61. cikit-0.1.0/src/cikit/sphinx_ext/__init__.py +39 -0
  62. cikit-0.1.0/src/cikit/sphinx_ext/chart.py +111 -0
  63. cikit-0.1.0/src/cikit/sphinx_ext/hash.py +115 -0
  64. cikit-0.1.0/src/cikit/sphinx_ext/log.py +147 -0
  65. cikit-0.1.0/src/cikit/sphinx_ext/metrics.py +70 -0
  66. cikit-0.1.0/src/cikit/systemtest/fixtures.py +85 -0
  67. cikit-0.1.0/src/cikit/timeline/README.md +71 -0
  68. cikit-0.1.0/src/cikit/timeline/__init__.py +17 -0
  69. cikit-0.1.0/src/cikit/timeline/__main__.py +62 -0
  70. cikit-0.1.0/src/cikit/timeline/charts.py +55 -0
  71. cikit-0.1.0/src/cikit/timeline/presets.py +272 -0
  72. cikit-0.1.0/src/cikit/timeline/preview.py +71 -0
  73. cikit-0.1.0/src/cikit/timeline/timeline_chart.py +221 -0
  74. cikit-0.1.0/src/cikit.egg-info/PKG-INFO +400 -0
  75. {cikit-0.0.5 → cikit-0.1.0}/src/cikit.egg-info/SOURCES.txt +58 -4
  76. {cikit-0.0.5 → cikit-0.1.0}/src/cikit.egg-info/entry_points.txt +1 -1
  77. cikit-0.1.0/tests/systemtests/projects/cmake_error/CMakeLists.txt +6 -0
  78. cikit-0.1.0/tests/systemtests/projects/cmake_error/main.c +7 -0
  79. cikit-0.1.0/tests/systemtests/projects/cmake_native/CMakeLists.txt +19 -0
  80. cikit-0.1.0/tests/systemtests/projects/cmake_native/linker.ld +25 -0
  81. cikit-0.1.0/tests/systemtests/projects/cmake_native/main.c +6 -0
  82. cikit-0.1.0/tests/systemtests/projects/cmake_warning/CMakeLists.txt +6 -0
  83. cikit-0.1.0/tests/systemtests/projects/cmake_warning/main.c +7 -0
  84. cikit-0.1.0/tests/systemtests/projects/platformio_error/platformio.ini +2 -0
  85. cikit-0.1.0/tests/systemtests/projects/platformio_error/src/main.c +6 -0
  86. cikit-0.1.0/tests/systemtests/projects/platformio_native/platformio.ini +2 -0
  87. cikit-0.1.0/tests/systemtests/projects/platformio_native/src/main.cpp +10 -0
  88. cikit-0.1.0/tests/systemtests/projects/sphinx/docs/conf.py +7 -0
  89. cikit-0.1.0/tests/systemtests/projects/sphinx/docs/index.rst +10 -0
  90. cikit-0.1.0/tests/systemtests/projects/sphinx_invalid/docs/ index.rst +4 -0
  91. cikit-0.1.0/tests/systemtests/projects/sphinx_invalid/docs/conf.py +7 -0
  92. {cikit-0.0.5 → cikit-0.1.0}/tests/systemtests/test_ci_cli.py +3 -2
  93. cikit-0.1.0/tests/systemtests/test_cmake.py +106 -0
  94. cikit-0.1.0/tests/systemtests/test_data_cli.py +111 -0
  95. {cikit-0.0.5 → cikit-0.1.0}/tests/systemtests/test_env_cli.py +3 -2
  96. cikit-0.1.0/tests/systemtests/test_platformio.py +94 -0
  97. cikit-0.1.0/tests/systemtests/test_sphinx.py +83 -0
  98. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_ci_commands/test_all.py +29 -4
  99. cikit-0.1.0/tests/unittests/test_ci_commands/test_sphinx.py +54 -0
  100. cikit-0.1.0/tests/unittests/test_cikit/test_artifacts.py +453 -0
  101. cikit-0.1.0/tests/unittests/test_cikit/test_badge.py +119 -0
  102. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_command.py +136 -17
  103. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_data/test_api.py +21 -166
  104. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_data/test_cli.py +2 -2
  105. cikit-0.1.0/tests/unittests/test_cikit/test_data/test_common.py +89 -0
  106. cikit-0.1.0/tests/unittests/test_cikit/test_env/test_api.py +613 -0
  107. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_env/test_env_vars.py +1 -24
  108. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_env/test_provider.py +61 -0
  109. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_factory.py +105 -6
  110. cikit-0.1.0/tests/unittests/test_cikit/test_json_utils.py +56 -0
  111. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_lint_to_rst.py +128 -21
  112. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_logging_utils.py +14 -0
  113. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_bundle.py +203 -0
  114. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_cmake.py +572 -0
  115. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_coverage.py +259 -0
  116. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_platformio.py +583 -0
  117. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_pylint.py +363 -0
  118. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_pytest.py +114 -0
  119. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_reports.py +311 -0
  120. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_ruff.py +268 -0
  121. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_sphinx.py +214 -0
  122. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_project_meta.py +127 -104
  123. cikit-0.1.0/tests/unittests/test_cikit/test_rst_tools.py +373 -0
  124. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/__init__.py +11 -0
  125. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_chart.py +153 -0
  126. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_hash.py +93 -0
  127. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_init.py +25 -0
  128. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_log.py +154 -0
  129. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_metrics.py +115 -0
  130. cikit-0.1.0/tests/unittests/test_cikit/test_timeline/__init__.py +11 -0
  131. cikit-0.1.0/tests/unittests/test_cikit/test_timeline/test_charts.py +25 -0
  132. cikit-0.1.0/tests/unittests/test_cikit/test_timeline/test_presets.py +58 -0
  133. cikit-0.1.0/tests/unittests/test_cikit/test_timeline/test_preview.py +43 -0
  134. cikit-0.0.5/tests/unittests/test_cikit/test_timeline.py → cikit-0.1.0/tests/unittests/test_cikit/test_timeline/test_timeline_chart.py +82 -84
  135. {cikit-0.0.5 → cikit-0.1.0}/uv.lock +196 -122
  136. cikit-0.0.5/PKG-INFO +0 -240
  137. cikit-0.0.5/README.md +0 -220
  138. cikit-0.0.5/ci_commands/sphinx.py +0 -65
  139. cikit-0.0.5/docs/concepts/artifacts.rst +0 -42
  140. cikit-0.0.5/docs/concepts/cikit_data.rst +0 -58
  141. cikit-0.0.5/docs/concepts/environment.rst +0 -53
  142. cikit-0.0.5/docs/concepts/metadata.rst +0 -97
  143. cikit-0.0.5/docs/concepts/providers.rst +0 -48
  144. cikit-0.0.5/docs/getting_started.rst +0 -142
  145. cikit-0.0.5/docs/guides/ci_commands.rst +0 -252
  146. cikit-0.0.5/docs/guides/gitlab_ci.rst +0 -101
  147. cikit-0.0.5/docs/guides/local_pipeline.rst +0 -254
  148. cikit-0.0.5/docs/guides/sphinx_build.rst +0 -92
  149. cikit-0.0.5/src/cikit/badge.py +0 -67
  150. cikit-0.0.5/src/cikit/data/README.md +0 -445
  151. cikit-0.0.5/src/cikit/env/README.md +0 -192
  152. cikit-0.0.5/src/cikit/macros/README.md +0 -277
  153. cikit-0.0.5/src/cikit/macros/cmake.py +0 -121
  154. cikit-0.0.5/src/cikit/macros/coverage.py +0 -202
  155. cikit-0.0.5/src/cikit/macros/pytest.py +0 -88
  156. cikit-0.0.5/src/cikit/macros/sphinx.py +0 -227
  157. cikit-0.0.5/src/cikit/macros/test_report.py +0 -85
  158. cikit-0.0.5/src/cikit/rst_tools.py +0 -213
  159. cikit-0.0.5/src/cikit/systemtest/fixtures.py +0 -37
  160. cikit-0.0.5/src/cikit/timeline.py +0 -189
  161. cikit-0.0.5/src/cikit.egg-info/PKG-INFO +0 -240
  162. cikit-0.0.5/tests/systemtests/test_data_cli.py +0 -164
  163. cikit-0.0.5/tests/unittests/test_cikit/test_badge.py +0 -123
  164. cikit-0.0.5/tests/unittests/test_cikit/test_data/test_common.py +0 -168
  165. cikit-0.0.5/tests/unittests/test_cikit/test_env/test_api.py +0 -394
  166. cikit-0.0.5/tests/unittests/test_cikit/test_macros/test_cmake.py +0 -213
  167. cikit-0.0.5/tests/unittests/test_cikit/test_macros/test_coverage.py +0 -233
  168. cikit-0.0.5/tests/unittests/test_cikit/test_macros/test_pylint.py +0 -310
  169. cikit-0.0.5/tests/unittests/test_cikit/test_macros/test_pytest.py +0 -87
  170. cikit-0.0.5/tests/unittests/test_cikit/test_macros/test_ruff.py +0 -233
  171. cikit-0.0.5/tests/unittests/test_cikit/test_macros/test_sphinx.py +0 -183
  172. cikit-0.0.5/tests/unittests/test_cikit/test_macros/test_test_report.py +0 -231
  173. cikit-0.0.5/tests/unittests/test_cikit/test_rst_tools.py +0 -112
  174. {cikit-0.0.5 → cikit-0.1.0}/.project +0 -0
  175. {cikit-0.0.5 → cikit-0.1.0}/.pydevproject +0 -0
  176. {cikit-0.0.5 → cikit-0.1.0}/.pylintrc +0 -0
  177. {cikit-0.0.5 → cikit-0.1.0}/.repomixignore +0 -0
  178. {cikit-0.0.5 → cikit-0.1.0}/LICENSE +0 -0
  179. {cikit-0.0.5 → cikit-0.1.0}/ci_commands/__init__.py +0 -0
  180. {cikit-0.0.5 → cikit-0.1.0}/ci_commands/init.py +0 -0
  181. {cikit-0.0.5 → cikit-0.1.0}/docs/Makefile +0 -0
  182. {cikit-0.0.5 → cikit-0.1.0}/docs/_static/logo/cikit-logo-192.png +0 -0
  183. {cikit-0.0.5 → cikit-0.1.0}/docs/_static/logo/cikit-logo.png +0 -0
  184. {cikit-0.0.5 → cikit-0.1.0}/docs/_static/logo/favicon.ico +0 -0
  185. {cikit-0.0.5 → cikit-0.1.0}/docs/build_reports/index.rst +0 -0
  186. {cikit-0.0.5 → cikit-0.1.0}/docs/build_reports/lint.rst +0 -0
  187. {cikit-0.0.5 → cikit-0.1.0}/docs/build_reports/tests.rst +0 -0
  188. {cikit-0.0.5 → cikit-0.1.0}/docs/concepts/index.rst +1 -1
  189. {cikit-0.0.5 → cikit-0.1.0}/setup.cfg +0 -0
  190. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/ci/README.md +0 -0
  191. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/ci/__init__.py +0 -0
  192. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/ci/loader.py +0 -0
  193. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/ci/main.py +0 -0
  194. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/ci/runner.py +0 -0
  195. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/data/client.py +0 -0
  196. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/env/__init__.py +0 -0
  197. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/env/cli.py +0 -0
  198. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/env/common.py +0 -0
  199. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/errors.py +0 -0
  200. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/macros/__init__.py +0 -0
  201. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/.htaccess +0 -0
  202. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/README.md +0 -0
  203. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/cikit_data_common.php +0 -0
  204. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/cikit_data_create.php +0 -0
  205. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/cikit_data_latest.php +0 -0
  206. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/cikit_data_timeline.php +0 -0
  207. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/cikit_data_update.php +0 -0
  208. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/config.php +0 -0
  209. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/config.php.example +0 -0
  210. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/php/cikit_data/generate_secrets.py +0 -0
  211. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/sql/cikit_data/README.md +0 -0
  212. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/sql/cikit_data/db_init.sql +0 -0
  213. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/resources/sql/cikit_data/db_reset.sql +0 -0
  214. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/status.py +0 -0
  215. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/systemtest/__init__.py +0 -0
  216. {cikit-0.0.5 → cikit-0.1.0}/src/cikit/xml_tools.py +0 -0
  217. {cikit-0.0.5 → cikit-0.1.0}/src/cikit.egg-info/dependency_links.txt +0 -0
  218. {cikit-0.0.5 → cikit-0.1.0}/src/cikit.egg-info/requires.txt +0 -0
  219. {cikit-0.0.5 → cikit-0.1.0}/src/cikit.egg-info/top_level.txt +0 -0
  220. {cikit-0.0.5 → cikit-0.1.0}/tests/systemtests/conftest.py +0 -0
  221. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_ci_commands/__init__.py +0 -0
  222. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/__init__.py +0 -0
  223. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_data/__init__.py +0 -0
  224. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_data/test_client.py +0 -0
  225. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_env/__init__.py +0 -0
  226. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_env/test_common.py +0 -0
  227. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_errors.py +0 -0
  228. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_macros/__init__.py +0 -0
  229. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_macros/test_common.py +0 -0
  230. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_status.py +0 -0
  231. {cikit-0.0.5 → cikit-0.1.0}/tests/unittests/test_cikit/test_xml_tools.py +0 -0
@@ -8,5 +8,12 @@ tmp
8
8
  docs/_generated
9
9
  docs/_static/badges
10
10
  docs/_static/artifacts
11
+ docs/_static/*.svg
11
12
  docs/*.inc
13
+ docs/guides/timeline_charts.rst
12
14
  repomix-output.md
15
+ .pio
16
+ *.map
17
+ timeline_test/
18
+ build
19
+ tests/systemtests/projects/platformio_native/compile_commands.json
@@ -1,4 +1,4 @@
1
- # To contribute improvements to CI/CD templates, please follow the Development guide at:
1
+ # To contribute improvements to CI/CD templates, please follow the Development guide at:
2
2
  # https://docs.gitlab.com/ee/development/cicd/templates.html
3
3
  # This specific template is located at:
4
4
  # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
@@ -13,11 +13,13 @@ variables:
13
13
  UV_VERSION: "0.7"
14
14
  PYTHON_VERSION: "3.12"
15
15
  BASE_LAYER: bookworm-slim
16
+ CIKIT_COVERAGE_DIR: build/coverage
16
17
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
17
18
  UV_CACHE_DIR: "$CI_PROJECT_DIR/.uv-cache"
18
19
  UV_LINK_MODE: copy
19
20
  EXEC_TOOL: "uv run"
20
21
  FF_TIMESTAMPS: "false"
22
+
21
23
 
22
24
 
23
25
  ###################################################################################################
@@ -102,20 +104,26 @@ pylint:
102
104
  unittests:
103
105
  stage: test
104
106
  script:
105
- - $EXEC_TOOL cikit --name unittests test tests/unittests
107
+ - $EXEC_TOOL cikit --name unittests test tests/unittests --coverage-dir "$CIKIT_COVERAGE_DIR"
106
108
  artifacts:
107
109
  when: always
108
110
  paths:
109
111
  - public
112
+ - "$CIKIT_COVERAGE_DIR"
110
113
 
111
114
  systemtests:
112
115
  stage: test
116
+ before_script:
117
+ - apt-get update
118
+ - apt-get install -y --no-install-recommends build-essential cmake ninja-build
119
+ - uv sync --group systemtest
113
120
  script:
114
- - $EXEC_TOOL cikit --name systemtests test tests/systemtests
121
+ - $EXEC_TOOL cikit --name systemtests test tests/systemtests --coverage-dir "$CIKIT_COVERAGE_DIR"
115
122
  artifacts:
116
123
  when: always
117
124
  paths:
118
125
  - public
126
+ - "$CIKIT_COVERAGE_DIR"
119
127
 
120
128
 
121
129
  ###################################################################################################
@@ -125,16 +133,11 @@ systemtests:
125
133
  coverage:
126
134
  stage: coverage
127
135
  script:
128
- - $EXEC_TOOL cikit coverage
136
+ - $EXEC_TOOL cikit coverage "$CIKIT_COVERAGE_DIR"
129
137
  artifacts:
130
138
  when: always
131
139
  paths:
132
140
  - public
133
- reports:
134
- coverage_report:
135
- coverage_format: cobertura
136
- path: public/artifacts/cobertura.xml
137
-
138
141
 
139
142
  ###################################################################################################
140
143
  # Build jobs
@@ -160,13 +163,12 @@ sphinx:
160
163
  # Deployment
161
164
  ###################################################################################################
162
165
 
163
- pages:
166
+ deploy-pages:
164
167
  stage: deploy
165
168
  when: always
166
169
  script:
167
170
  - echo "Publishing artifacts to GitLab Pages"
168
171
  rules:
169
172
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
170
- artifacts:
171
- paths:
172
- - public
173
+ pages:
174
+ publish: public/artifacts/html
cikit-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,400 @@
1
+ Metadata-Version: 2.4
2
+ Name: cikit
3
+ Version: 0.1.0
4
+ Summary: CI helper toolkit
5
+ Author-email: Sven Schlender <svesch@gmx.de>
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Documentation, https://cikit-a4de14.gitlab.io
8
+ Project-URL: Repository, https://gitlab.com/svesch/cikit
9
+ Keywords: ci,gitlab,devops,pipeline,artifacts,sphinx
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Requires-Python: >=3.12
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: requests>=2.34
17
+ Requires-Dist: anybadge>=1.16
18
+ Requires-Dist: pygal>=3.1.0
19
+ Dynamic: license-file
20
+
21
+ # cikit
22
+
23
+ ![python](https://cikit-a4de14.gitlab.io/_images/python.svg)
24
+ ![ai assisted](https://cikit-a4de14.gitlab.io/_images/ai_assisted.svg)
25
+ ![ruff](https://cikit-a4de14.gitlab.io/_images/ruff.svg)
26
+ ![pylint](https://cikit-a4de14.gitlab.io/_images/pylint.svg)
27
+ ![unittests](https://cikit-a4de14.gitlab.io/_images/unittests.svg)
28
+ ![unittests](https://cikit-a4de14.gitlab.io/_images/systemtests.svg)
29
+ ![coverage](https://cikit-a4de14.gitlab.io/_images/coverage.svg)
30
+
31
+ **cikit** is a lightweight Python toolkit for implementing local development and CI workflows
32
+ with reusable Python building blocks instead of large shell scripts or provider-specific pipeline
33
+ logic.
34
+
35
+ It combines a project-specific command framework with CI environment abstraction, reusable macros,
36
+ run data, artifact management, reports, timeline charts, and Sphinx integration.
37
+
38
+ [Documentation](https://cikit-a4de14.gitlab.io/) ·
39
+ [Repository](https://gitlab.com/svesch/cikit)
40
+
41
+ ## Highlights
42
+
43
+ * Project-specific CI commands discovered from a root-level `ci_commands` package
44
+ * Unified execution locally and in CI
45
+ * Provider support for local Git, GitLab, and Azure DevOps
46
+ * Structured environment handling with variable expansion and secret masking
47
+ * Ruff, Pylint, pytest, coverage, CMake, CTest, PlatformIO, and Sphinx helpers
48
+ * Run-bound metrics and persistent artifact metadata
49
+ * Build reports with timings, warnings/errors, memory metrics, artifacts, bundles, and logs
50
+ * Local and optional remote cikit data storage for historical metrics
51
+ * Configurable SVG timeline charts with line, filled-line, bar, and stacked-bar presets
52
+ * Sphinx extensions for inline metrics, interactive charts, collapsible logs, and compact SHA-256 hashes
53
+
54
+ ## Installation
55
+
56
+ cikit requires Python 3.12 or newer.
57
+
58
+ ```bash
59
+ pip install cikit
60
+ ```
61
+
62
+ For a project using uv, cikit is typically added as a development dependency:
63
+
64
+ ```bash
65
+ uv add --dev cikit
66
+ ```
67
+
68
+ ## CI Command Framework
69
+
70
+ cikit deliberately keeps the concrete workflow in the consuming project. A project provides a
71
+ root-level package named `ci_commands`; the `cikit` console command discovers its modules and calls
72
+ their `register()` functions automatically.
73
+
74
+ ```text
75
+ project/
76
+ ├── ci_commands/
77
+ │ ├── __init__.py
78
+ │ ├── init.py
79
+ │ ├── lint.py
80
+ │ ├── test.py
81
+ │ ├── build.py
82
+ │ ├── sphinx.py
83
+ │ └── all_.py
84
+ ├── docs/
85
+ ├── src/
86
+ ├── tests/
87
+ ├── pyproject.toml
88
+ └── public/
89
+ ├── artifacts/
90
+ ├── badges/
91
+ ├── cikit_data/
92
+ └── rst/
93
+ ```
94
+
95
+ A minimal command module can orchestrate reusable cikit macros:
96
+
97
+ ```python
98
+ import argparse
99
+
100
+ from cikit import CiSection
101
+ from cikit.ci import run_ci_script
102
+ from cikit.macros import ruff
103
+
104
+
105
+ def run(env, status, args):
106
+ with CiSection("Running Ruff", status=status):
107
+ ruff.ruff(env, args.paths)
108
+
109
+ with CiSection("Generating Ruff report", status=status):
110
+ ruff.write_rst(env)
111
+
112
+
113
+ def command(args):
114
+ return run_ci_script("ruff", lambda env, status: run(env, status, args), args=args)
115
+
116
+
117
+ def register(subparsers):
118
+ parser = subparsers.add_parser("ruff", help="Run Ruff checks.")
119
+ parser.add_argument("paths", nargs="+")
120
+ parser.set_defaults(func=command)
121
+ ```
122
+
123
+ The resulting command is executed through the shared runner:
124
+
125
+ ```bash
126
+ cikit ruff src tests
127
+ ```
128
+
129
+ The logical run name can be overridden globally. It is used for cikit data and artifact metadata:
130
+
131
+ ```bash
132
+ cikit --name quality ruff src tests
133
+ ```
134
+
135
+ The command set itself is project-specific. The `ci_commands` package in this repository is both the
136
+ workflow used by cikit and a practical reference implementation.
137
+
138
+ ## Environment and Providers
139
+
140
+ `cikit.env` resolves configuration once and exposes it consistently to commands and macros.
141
+ Environment variables may reference previously resolved values using `${VAR}` syntax and can be
142
+ converted to types such as `Path`.
143
+
144
+ ```python
145
+ from cikit.env import CiEnvironment, get_env_vars
146
+
147
+ env = CiEnvironment(get_env_vars())
148
+
149
+ print(env["PROJECT_ROOT"])
150
+ print(env.pipeline_id)
151
+ print(env.branch_name)
152
+ print(env.commit_sha)
153
+ ```
154
+
155
+ Supported providers are:
156
+
157
+ * `LOCALGIT`
158
+ * `GITLAB`
159
+ * `AZURE_DEVOPS`
160
+
161
+ Outside a supported CI system, local Git metadata is used as the fallback. Provider metadata includes
162
+ pipeline, branch, commit, and provider project information without requiring provider-specific logic
163
+ inside reusable macros.
164
+
165
+ For cikit data, `CIKIT_DATA_ADDRESSING` can use either the logical `PROJECT_NAME` or a provider-based
166
+ scope/project key.
167
+
168
+ ## Reusable Macros
169
+
170
+ The `cikit.macros` package contains the reusable workflow implementation. Command modules should
171
+ mainly parse arguments, open CI sections, and compose these macros.
172
+
173
+ | Module | Purpose |
174
+ | --- | --- |
175
+ | `ruff` | Ruff execution, reports, badges, timelines, and GitLab Code Quality output |
176
+ | `pylint` | Pylint execution, reports, badges, timelines, and rule-specific reports |
177
+ | `pytest` | pytest execution, JUnit XML, and optional parallel coverage collection |
178
+ | `coverage` | Python/gcovr coverage, Cobertura XML, HTML reports, badges, and timelines |
179
+ | `cmake` | CMake configure/build, CTest, build metrics, memory parsing, logs, and reports |
180
+ | `platformio` | PlatformIO builds, compiler metadata, build metrics, memory parsing, logs, and reports |
181
+ | `reports` | Shared test and build report generation |
182
+ | `sphinx` | Documentation preparation, build, and artifact integration |
183
+ | `bundle` | ZIP, TAR, and TAR.GZ bundle creation and registration |
184
+
185
+ All run-bound macros operate on a `CiRunEnvironment`, so generated metrics and artifacts belong to a
186
+ well-defined logical run.
187
+
188
+ ## Build Metrics and Reports
189
+
190
+ CMake and PlatformIO builds can collect data such as:
191
+
192
+ * configure, build, and total build time
193
+ * compiled file counts
194
+ * compiler warning and error counts
195
+ * memory usage where the toolchain exposes it
196
+ * command logs
197
+
198
+ The generic build report adds the information available for the active run, including timeline
199
+ charts, memory tables, downloadable build artifacts and bundles with size and SHA-256 metadata,
200
+ and collapsible logs.
201
+
202
+ Typical usage:
203
+
204
+ ```python
205
+ from pathlib import Path
206
+
207
+ from cikit.macros import cmake
208
+
209
+ build_dir = cmake.get_build_dir(env)
210
+
211
+ cmake.cmake_configure(
212
+ env,
213
+ source_dir=Path("."),
214
+ build_dir=build_dir,
215
+ generator="Ninja",
216
+ clean=True,
217
+ )
218
+ cmake.cmake_build(env, build_dir)
219
+ cmake.write_rst(env)
220
+ ```
221
+
222
+ PlatformIO follows the same run-data and report model:
223
+
224
+ ```python
225
+ from cikit.macros import platformio
226
+
227
+ platformio.build(env, clean=True)
228
+ platformio.write_rst(env)
229
+ ```
230
+
231
+ ## Artifacts and Bundles
232
+
233
+ Artifacts are owned by `CiRunEnvironment`. Generated files are copied into cikit-managed storage and
234
+ registered together with their logical run, artifact type, file size, and hash metadata.
235
+
236
+ ```python
237
+ from pathlib import Path
238
+
239
+ from cikit.artifacts import ArtifactType
240
+
241
+ artifact = env.copy_artifact(Path("build/firmware.bin"), ArtifactType.BUILD)
242
+
243
+ print(artifact.path)
244
+ print(artifact.size)
245
+ print(artifact.hash)
246
+ ```
247
+
248
+ For file artifacts, cikit records the size and calculates a SHA-256 hash automatically unless a hash
249
+ is supplied explicitly to `copy_artifact()`. Folder artifacts use `None` for size and hash by
250
+ default.
251
+
252
+ Runtime artifact paths are absolute, while the persistent registry stores portable paths relative to
253
+ the configured artifact root. Artifacts can later be queried by run and type, which allows separate
254
+ pipeline steps to exchange generated reports and build outputs without depending on physical output
255
+ paths.
256
+
257
+ Bundles can package one file or a complete directory:
258
+
259
+ ```python
260
+ from pathlib import Path
261
+
262
+ from cikit.macros import bundle
263
+
264
+ bundle.create(env, "firmware-package.zip", Path("build/release"))
265
+ ```
266
+
267
+ Supported bundle formats are `.zip`, `.tar`, and `.tar.gz`. Bundle artifacts can be included directly
268
+ in generated build reports.
269
+
270
+ ## cikit Data
271
+
272
+ `cikit.data` stores structured data per logical run and provides historical queries for reports,
273
+ badges, and timeline charts.
274
+
275
+ It supports three operating modes:
276
+
277
+ * local JSON cache only
278
+ * remote cikit Data API only
279
+ * local cache with remote synchronization
280
+
281
+ Run-bound access is normally provided by `CiRunEnvironment`:
282
+
283
+ ```python
284
+ env.data_set("build_time", 4.2)
285
+ env.data_update({"warnings": 0, "errors": 0})
286
+
287
+ data = env.data
288
+ ```
289
+
290
+ Timeline data can be queried from the remote backend using reference keys such as timestamps, pipeline
291
+ IDs, commit hashes, or relative indices.
292
+
293
+ The repository also contains the small PHP/MySQL reference backend used by the cikit Data API,
294
+ including schema initialization scripts.
295
+
296
+ ## Timeline Charts
297
+
298
+ `cikit.timeline` renders cikit data as SVG charts using Pygal. `TimelineChart` validates timeline data
299
+ and can render directly or register the result as an artifact.
300
+
301
+ ```python
302
+ from cikit.timeline import TimelineChart, TimelinePreset
303
+
304
+ chart = TimelineChart(data, "Build duration", TimelinePreset.LINE_REPORT)
305
+ chart.create(env, "build-duration")
306
+ ```
307
+
308
+ Available presets cover general, compact, and report-oriented line and bar charts, a filled report line
309
+ chart, and stacked bars. Chart options, style, and individual series options can be overridden after
310
+ selecting a preset.
311
+
312
+ For development and documentation, all presets can be rendered with deterministic preview data:
313
+
314
+ ```bash
315
+ python -m cikit.timeline
316
+ ```
317
+
318
+ ## Sphinx Integration
319
+
320
+ The Sphinx macro consumes registered artifacts instead of relying on fixed public paths. During
321
+ preparation it places generated content into the documentation source tree:
322
+
323
+ * RST artifacts → `docs/_generated`
324
+ * badge artifacts → `docs/_static/badges`
325
+ * other documentation artifacts → `docs/_static/artifacts`
326
+
327
+ The completed HTML documentation is registered again as a folder artifact.
328
+
329
+ cikit provides a bundled Sphinx extension with reusable roles and directives:
330
+
331
+ | Extension | RST interface | Purpose |
332
+ | --- | --- | --- |
333
+ | `cikit.sphinx_ext.metrics` | `:cikit-metric:` | Render a value from the local cikit data cache |
334
+ | `cikit.sphinx_ext.chart` | `.. cikit-chart::` | Embed interactive SVG charts in HTML with a non-HTML fallback |
335
+ | `cikit.sphinx_ext.log` | `.. cikit-log::` | Embed collapsible command logs with a non-HTML fallback |
336
+ | `cikit.sphinx_ext.hash` | `:cikit-hash:` | Render compact SHA-256 hashes with tooltip and clipboard support |
337
+
338
+
339
+ The recommended configuration enables all cikit extensions through the package extension:
340
+
341
+ ```python
342
+ extensions = [
343
+ "cikit.sphinx_ext",
344
+ ]
345
+ ```
346
+
347
+ Individual extensions can still be enabled separately if required.
348
+
349
+ Example RST:
350
+
351
+ ```rst
352
+ Build time: :cikit-metric:`build.build_time` seconds.
353
+
354
+ .. cikit-chart:: ../_static/artifacts/chart_build.svg
355
+ :alt: Build timeline
356
+
357
+ .. cikit-log:: ../_static/artifacts/build.log
358
+ :title: Build log
359
+
360
+ Package hash: :cikit-hash:`0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef`
361
+ ```
362
+
363
+ ## Console Entry Points
364
+
365
+ The package currently installs three console entry points:
366
+
367
+ | Command | Purpose |
368
+ | --- | --- |
369
+ | `cikit` | Discover and run project-specific commands from `ci_commands` |
370
+ | `cikit-data` | Access local/remote cikit data operations directly |
371
+ | `cikit-env` | Inspect, export, document, and prepare the resolved cikit environment |
372
+
373
+ Use `--help` on each command for the available options. Concrete `cikit` subcommands depend on the
374
+ current project's `ci_commands` package.
375
+
376
+ ## Design Goals
377
+
378
+ * Keep project workflow logic in readable Python
379
+ * Share the same commands between local development and CI
380
+ * Separate provider metadata from reusable workflow implementation
381
+ * Keep generated data and artifacts associated with explicit logical runs
382
+ * Make pipeline steps composable through persistent artifact metadata
383
+ * Keep reports and documentation generated from the same underlying data
384
+ * Remain lightweight and testable with a small runtime dependency set
385
+
386
+ ## Documentation
387
+
388
+ The full documentation covers environment configuration, providers, project metadata, command
389
+ architecture, local workflows, GitLab integration, cikit data, artifacts, build reports, and Sphinx
390
+ integration:
391
+
392
+ https://cikit-a4de14.gitlab.io/
393
+
394
+ Repository:
395
+
396
+ https://gitlab.com/svesch/cikit
397
+
398
+ ## License
399
+
400
+ GPL-3.0-or-later