cikit 0.0.4__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 (248) hide show
  1. cikit-0.1.0/.gitignore +19 -0
  2. {cikit-0.0.4 → cikit-0.1.0}/.gitlab-ci.yml +15 -14
  3. cikit-0.1.0/PKG-INFO +400 -0
  4. cikit-0.1.0/README.md +380 -0
  5. cikit-0.1.0/ci_commands/all_.py +100 -0
  6. {cikit-0.0.4 → cikit-0.1.0}/ci_commands/coverage.py +12 -8
  7. {cikit-0.0.4 → cikit-0.1.0}/ci_commands/init.py +6 -6
  8. {cikit-0.0.4 → cikit-0.1.0}/ci_commands/pylint.py +9 -7
  9. {cikit-0.0.4 → cikit-0.1.0}/ci_commands/ruff.py +9 -6
  10. cikit-0.1.0/ci_commands/sphinx.py +116 -0
  11. {cikit-0.0.4 → cikit-0.1.0}/ci_commands/test.py +12 -15
  12. cikit-0.1.0/docs/concepts/artifacts.rst +650 -0
  13. cikit-0.1.0/docs/concepts/cikit_data.rst +663 -0
  14. cikit-0.1.0/docs/concepts/environment.rst +414 -0
  15. {cikit-0.0.4 → cikit-0.1.0}/docs/concepts/index.rst +1 -1
  16. cikit-0.1.0/docs/concepts/metadata.rst +504 -0
  17. cikit-0.1.0/docs/concepts/providers.rst +696 -0
  18. {cikit-0.0.4 → cikit-0.1.0}/docs/conf.py +1 -0
  19. cikit-0.1.0/docs/getting_started.rst +269 -0
  20. cikit-0.1.0/docs/guides/azure_devops.rst +341 -0
  21. cikit-0.1.0/docs/guides/builds.rst +761 -0
  22. cikit-0.1.0/docs/guides/ci_commands.rst +634 -0
  23. cikit-0.1.0/docs/guides/gitlab_ci.rst +245 -0
  24. {cikit-0.0.4 → cikit-0.1.0}/docs/guides/index.rst +5 -0
  25. cikit-0.1.0/docs/guides/local_pipeline.rst +627 -0
  26. cikit-0.1.0/docs/guides/macros.rst +645 -0
  27. cikit-0.1.0/docs/guides/sphinx_build.rst +502 -0
  28. cikit-0.1.0/docs/guides/sphinx_extensions.rst +757 -0
  29. cikit-0.1.0/docs/guides/timelines.rst +255 -0
  30. {cikit-0.0.4 → cikit-0.1.0}/docs/index.rst +1 -0
  31. cikit-0.1.0/docs/roadmap.rst +33 -0
  32. {cikit-0.0.4 → cikit-0.1.0}/pyproject.toml +10 -6
  33. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/__init__.py +2 -4
  34. cikit-0.1.0/src/cikit/artifacts.py +345 -0
  35. cikit-0.1.0/src/cikit/badge.py +74 -0
  36. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/ci/README.md +22 -3
  37. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/ci/main.py +2 -0
  38. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/ci/runner.py +23 -8
  39. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/command.py +76 -3
  40. cikit-0.1.0/src/cikit/data/README.md +601 -0
  41. cikit-0.1.0/src/cikit/data/__init__.py +14 -0
  42. cikit-0.1.0/src/cikit/data/api.py +326 -0
  43. cikit-0.1.0/src/cikit/data/cli.py +180 -0
  44. {cikit-0.0.4/src/cikit/jobdata → cikit-0.1.0/src/cikit/data}/client.py +30 -31
  45. cikit-0.1.0/src/cikit/data/common.py +87 -0
  46. cikit-0.1.0/src/cikit/env/README.md +593 -0
  47. cikit-0.1.0/src/cikit/env/__init__.py +23 -0
  48. cikit-0.1.0/src/cikit/env/api.py +767 -0
  49. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/env/cli.py +37 -32
  50. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/env/common.py +26 -35
  51. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/env/env_vars.py +10 -22
  52. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/env/provider.py +150 -24
  53. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/errors.py +2 -2
  54. cikit-0.1.0/src/cikit/factory.py +90 -0
  55. cikit-0.1.0/src/cikit/json_utils.py +60 -0
  56. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/lint_to_rst.py +53 -17
  57. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/logging_utils.py +16 -1
  58. cikit-0.1.0/src/cikit/macros/README.md +74 -0
  59. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/macros/__init__.py +2 -2
  60. cikit-0.1.0/src/cikit/macros/bundle.py +96 -0
  61. cikit-0.1.0/src/cikit/macros/cmake.py +332 -0
  62. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/macros/common.py +42 -36
  63. cikit-0.1.0/src/cikit/macros/coverage.py +171 -0
  64. cikit-0.1.0/src/cikit/macros/platformio.py +304 -0
  65. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/macros/pylint.py +73 -65
  66. cikit-0.1.0/src/cikit/macros/pytest.py +79 -0
  67. cikit-0.1.0/src/cikit/macros/reports.py +183 -0
  68. cikit-0.1.0/src/cikit/macros/ruff.py +157 -0
  69. cikit-0.1.0/src/cikit/macros/sphinx.py +139 -0
  70. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/project_meta.py +37 -57
  71. cikit-0.1.0/src/cikit/resources/php/cikit_data/README.md +267 -0
  72. cikit-0.0.4/src/cikit/resources/php/jobdata/jobdata_common.php → cikit-0.1.0/src/cikit/resources/php/cikit_data/cikit_data_common.php +126 -126
  73. cikit-0.0.4/src/cikit/resources/php/jobdata/jobdata_create.php → cikit-0.1.0/src/cikit/resources/php/cikit_data/cikit_data_create.php +200 -200
  74. cikit-0.0.4/src/cikit/resources/php/jobdata/jobdata_latest.php → cikit-0.1.0/src/cikit/resources/php/cikit_data/cikit_data_latest.php +121 -116
  75. cikit-0.0.4/src/cikit/resources/php/jobdata/jobdata_timeline.php → cikit-0.1.0/src/cikit/resources/php/cikit_data/cikit_data_timeline.php +217 -217
  76. cikit-0.0.4/src/cikit/resources/php/jobdata/jobdata_update.php → cikit-0.1.0/src/cikit/resources/php/cikit_data/cikit_data_update.php +160 -160
  77. {cikit-0.0.4/src/cikit/resources/php/jobdata → cikit-0.1.0/src/cikit/resources/php/cikit_data}/config.php +1 -1
  78. {cikit-0.0.4/src/cikit/resources/php/jobdata → cikit-0.1.0/src/cikit/resources/php/cikit_data}/config.php.example +77 -78
  79. cikit-0.1.0/src/cikit/resources/php/cikit_data/generate_secrets.py +38 -0
  80. {cikit-0.0.4/src/cikit/resources/sql/jobdata → cikit-0.1.0/src/cikit/resources/sql/cikit_data}/README.md +7 -7
  81. {cikit-0.0.4/src/cikit/resources/sql/jobdata → cikit-0.1.0/src/cikit/resources/sql/cikit_data}/db_init.sql +132 -132
  82. {cikit-0.0.4/src/cikit/resources/sql/jobdata → cikit-0.1.0/src/cikit/resources/sql/cikit_data}/db_reset.sql +20 -20
  83. cikit-0.1.0/src/cikit/rst_tools.py +463 -0
  84. cikit-0.1.0/src/cikit/sphinx_ext/__init__.py +39 -0
  85. cikit-0.1.0/src/cikit/sphinx_ext/chart.py +111 -0
  86. cikit-0.1.0/src/cikit/sphinx_ext/hash.py +115 -0
  87. cikit-0.1.0/src/cikit/sphinx_ext/log.py +147 -0
  88. cikit-0.1.0/src/cikit/sphinx_ext/metrics.py +70 -0
  89. cikit-0.1.0/src/cikit/systemtest/fixtures.py +85 -0
  90. cikit-0.1.0/src/cikit/timeline/README.md +71 -0
  91. cikit-0.1.0/src/cikit/timeline/__init__.py +17 -0
  92. cikit-0.1.0/src/cikit/timeline/__main__.py +62 -0
  93. cikit-0.1.0/src/cikit/timeline/charts.py +55 -0
  94. cikit-0.1.0/src/cikit/timeline/presets.py +272 -0
  95. cikit-0.1.0/src/cikit/timeline/preview.py +71 -0
  96. cikit-0.1.0/src/cikit/timeline/timeline_chart.py +221 -0
  97. cikit-0.1.0/src/cikit.egg-info/PKG-INFO +400 -0
  98. cikit-0.1.0/src/cikit.egg-info/SOURCES.txt +191 -0
  99. cikit-0.1.0/src/cikit.egg-info/entry_points.txt +4 -0
  100. cikit-0.1.0/tests/systemtests/projects/cmake_error/CMakeLists.txt +6 -0
  101. cikit-0.1.0/tests/systemtests/projects/cmake_error/main.c +7 -0
  102. cikit-0.1.0/tests/systemtests/projects/cmake_native/CMakeLists.txt +19 -0
  103. cikit-0.1.0/tests/systemtests/projects/cmake_native/linker.ld +25 -0
  104. cikit-0.1.0/tests/systemtests/projects/cmake_native/main.c +6 -0
  105. cikit-0.1.0/tests/systemtests/projects/cmake_warning/CMakeLists.txt +6 -0
  106. cikit-0.1.0/tests/systemtests/projects/cmake_warning/main.c +7 -0
  107. cikit-0.1.0/tests/systemtests/projects/platformio_error/platformio.ini +2 -0
  108. cikit-0.1.0/tests/systemtests/projects/platformio_error/src/main.c +6 -0
  109. cikit-0.1.0/tests/systemtests/projects/platformio_native/platformio.ini +2 -0
  110. cikit-0.1.0/tests/systemtests/projects/platformio_native/src/main.cpp +10 -0
  111. cikit-0.1.0/tests/systemtests/projects/sphinx/docs/conf.py +7 -0
  112. cikit-0.1.0/tests/systemtests/projects/sphinx/docs/index.rst +10 -0
  113. cikit-0.1.0/tests/systemtests/projects/sphinx_invalid/docs/ index.rst +4 -0
  114. cikit-0.1.0/tests/systemtests/projects/sphinx_invalid/docs/conf.py +7 -0
  115. {cikit-0.0.4 → cikit-0.1.0}/tests/systemtests/test_ci_cli.py +3 -2
  116. cikit-0.1.0/tests/systemtests/test_cmake.py +106 -0
  117. cikit-0.1.0/tests/systemtests/test_data_cli.py +111 -0
  118. {cikit-0.0.4 → cikit-0.1.0}/tests/systemtests/test_env_cli.py +6 -5
  119. cikit-0.1.0/tests/systemtests/test_platformio.py +94 -0
  120. cikit-0.1.0/tests/systemtests/test_sphinx.py +83 -0
  121. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_ci_commands/test_all.py +31 -6
  122. cikit-0.1.0/tests/unittests/test_ci_commands/test_sphinx.py +54 -0
  123. cikit-0.1.0/tests/unittests/test_cikit/test_artifacts.py +453 -0
  124. cikit-0.1.0/tests/unittests/test_cikit/test_badge.py +119 -0
  125. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_command.py +136 -17
  126. cikit-0.1.0/tests/unittests/test_cikit/test_data/__init__.py +12 -0
  127. cikit-0.1.0/tests/unittests/test_cikit/test_data/test_api.py +297 -0
  128. {cikit-0.0.4/tests/unittests/test_cikit/test_jobdata → cikit-0.1.0/tests/unittests/test_cikit/test_data}/test_cli.py +22 -14
  129. {cikit-0.0.4/tests/unittests/test_cikit/test_jobdata → cikit-0.1.0/tests/unittests/test_cikit/test_data}/test_client.py +104 -84
  130. cikit-0.1.0/tests/unittests/test_cikit/test_data/test_common.py +89 -0
  131. cikit-0.1.0/tests/unittests/test_cikit/test_env/test_api.py +613 -0
  132. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_env/test_env_vars.py +8 -31
  133. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_env/test_provider.py +105 -28
  134. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_errors.py +4 -4
  135. cikit-0.1.0/tests/unittests/test_cikit/test_factory.py +269 -0
  136. cikit-0.1.0/tests/unittests/test_cikit/test_json_utils.py +56 -0
  137. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_lint_to_rst.py +129 -34
  138. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_logging_utils.py +14 -0
  139. cikit-0.1.0/tests/unittests/test_cikit/test_macros/__init__.py +8 -0
  140. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_bundle.py +203 -0
  141. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_cmake.py +572 -0
  142. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_macros/test_common.py +16 -17
  143. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_coverage.py +259 -0
  144. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_platformio.py +583 -0
  145. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_pylint.py +363 -0
  146. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_pytest.py +114 -0
  147. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_reports.py +311 -0
  148. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_ruff.py +268 -0
  149. cikit-0.1.0/tests/unittests/test_cikit/test_macros/test_sphinx.py +214 -0
  150. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_project_meta.py +130 -104
  151. cikit-0.1.0/tests/unittests/test_cikit/test_rst_tools.py +373 -0
  152. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/__init__.py +11 -0
  153. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_chart.py +153 -0
  154. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_hash.py +93 -0
  155. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_init.py +25 -0
  156. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_log.py +154 -0
  157. cikit-0.1.0/tests/unittests/test_cikit/test_sphinx_ext/test_metrics.py +115 -0
  158. cikit-0.1.0/tests/unittests/test_cikit/test_timeline/__init__.py +11 -0
  159. cikit-0.1.0/tests/unittests/test_cikit/test_timeline/test_charts.py +25 -0
  160. cikit-0.1.0/tests/unittests/test_cikit/test_timeline/test_presets.py +58 -0
  161. cikit-0.1.0/tests/unittests/test_cikit/test_timeline/test_preview.py +43 -0
  162. cikit-0.0.4/tests/unittests/test_cikit/test_timeline.py → cikit-0.1.0/tests/unittests/test_cikit/test_timeline/test_timeline_chart.py +82 -84
  163. {cikit-0.0.4 → cikit-0.1.0}/uv.lock +196 -122
  164. cikit-0.0.4/.gitignore +0 -12
  165. cikit-0.0.4/PKG-INFO +0 -197
  166. cikit-0.0.4/README.md +0 -177
  167. cikit-0.0.4/ci_commands/all_.py +0 -79
  168. cikit-0.0.4/ci_commands/sphinx.py +0 -65
  169. cikit-0.0.4/docs/concepts/artifacts.rst +0 -42
  170. cikit-0.0.4/docs/concepts/environment.rst +0 -53
  171. cikit-0.0.4/docs/concepts/jobdata.rst +0 -49
  172. cikit-0.0.4/docs/concepts/metadata.rst +0 -97
  173. cikit-0.0.4/docs/concepts/providers.rst +0 -45
  174. cikit-0.0.4/docs/getting_started.rst +0 -140
  175. cikit-0.0.4/docs/guides/ci_commands.rst +0 -252
  176. cikit-0.0.4/docs/guides/gitlab_ci.rst +0 -82
  177. cikit-0.0.4/docs/guides/local_pipeline.rst +0 -252
  178. cikit-0.0.4/docs/guides/sphinx_build.rst +0 -92
  179. cikit-0.0.4/src/cikit/badge.py +0 -67
  180. cikit-0.0.4/src/cikit/env/README.md +0 -131
  181. cikit-0.0.4/src/cikit/env/__init__.py +0 -33
  182. cikit-0.0.4/src/cikit/env/api.py +0 -578
  183. cikit-0.0.4/src/cikit/factory.py +0 -51
  184. cikit-0.0.4/src/cikit/jobdata/README.md +0 -408
  185. cikit-0.0.4/src/cikit/jobdata/__init__.py +0 -14
  186. cikit-0.0.4/src/cikit/jobdata/api.py +0 -457
  187. cikit-0.0.4/src/cikit/jobdata/cli.py +0 -226
  188. cikit-0.0.4/src/cikit/jobdata/common.py +0 -138
  189. cikit-0.0.4/src/cikit/macros/README.md +0 -266
  190. cikit-0.0.4/src/cikit/macros/cmake.py +0 -120
  191. cikit-0.0.4/src/cikit/macros/coverage.py +0 -200
  192. cikit-0.0.4/src/cikit/macros/pytest.py +0 -91
  193. cikit-0.0.4/src/cikit/macros/ruff.py +0 -151
  194. cikit-0.0.4/src/cikit/macros/sphinx.py +0 -223
  195. cikit-0.0.4/src/cikit/macros/test_report.py +0 -85
  196. cikit-0.0.4/src/cikit/resources/php/jobdata/README.md +0 -258
  197. cikit-0.0.4/src/cikit/rst_tools.py +0 -213
  198. cikit-0.0.4/src/cikit/systemtest/fixtures.py +0 -37
  199. cikit-0.0.4/src/cikit/timeline.py +0 -189
  200. cikit-0.0.4/src/cikit.egg-info/PKG-INFO +0 -197
  201. cikit-0.0.4/src/cikit.egg-info/SOURCES.txt +0 -136
  202. cikit-0.0.4/src/cikit.egg-info/entry_points.txt +0 -4
  203. cikit-0.0.4/tests/systemtests/test_jobdata_cli.py +0 -162
  204. cikit-0.0.4/tests/unittests/test_cikit/test_badge.py +0 -123
  205. cikit-0.0.4/tests/unittests/test_cikit/test_env/test_api.py +0 -348
  206. cikit-0.0.4/tests/unittests/test_cikit/test_factory.py +0 -183
  207. cikit-0.0.4/tests/unittests/test_cikit/test_jobdata/__init__.py +0 -0
  208. cikit-0.0.4/tests/unittests/test_cikit/test_jobdata/test_api.py +0 -437
  209. cikit-0.0.4/tests/unittests/test_cikit/test_jobdata/test_common.py +0 -163
  210. cikit-0.0.4/tests/unittests/test_cikit/test_macros/__init__.py +0 -0
  211. cikit-0.0.4/tests/unittests/test_cikit/test_macros/test_cmake.py +0 -213
  212. cikit-0.0.4/tests/unittests/test_cikit/test_macros/test_coverage.py +0 -244
  213. cikit-0.0.4/tests/unittests/test_cikit/test_macros/test_pylint.py +0 -299
  214. cikit-0.0.4/tests/unittests/test_cikit/test_macros/test_pytest.py +0 -108
  215. cikit-0.0.4/tests/unittests/test_cikit/test_macros/test_ruff.py +0 -222
  216. cikit-0.0.4/tests/unittests/test_cikit/test_macros/test_sphinx.py +0 -183
  217. cikit-0.0.4/tests/unittests/test_cikit/test_macros/test_test_report.py +0 -230
  218. cikit-0.0.4/tests/unittests/test_cikit/test_rst_tools.py +0 -112
  219. {cikit-0.0.4 → cikit-0.1.0}/.project +0 -0
  220. {cikit-0.0.4 → cikit-0.1.0}/.pydevproject +0 -0
  221. {cikit-0.0.4 → cikit-0.1.0}/.pylintrc +0 -0
  222. {cikit-0.0.4 → cikit-0.1.0}/.repomixignore +0 -0
  223. {cikit-0.0.4 → cikit-0.1.0}/LICENSE +0 -0
  224. {cikit-0.0.4 → cikit-0.1.0}/ci_commands/__init__.py +0 -0
  225. {cikit-0.0.4 → cikit-0.1.0}/docs/Makefile +0 -0
  226. {cikit-0.0.4 → cikit-0.1.0}/docs/_static/logo/cikit-logo-192.png +0 -0
  227. {cikit-0.0.4 → cikit-0.1.0}/docs/_static/logo/cikit-logo.png +0 -0
  228. {cikit-0.0.4 → cikit-0.1.0}/docs/_static/logo/favicon.ico +0 -0
  229. {cikit-0.0.4 → cikit-0.1.0}/docs/build_reports/index.rst +0 -0
  230. {cikit-0.0.4 → cikit-0.1.0}/docs/build_reports/lint.rst +0 -0
  231. {cikit-0.0.4 → cikit-0.1.0}/docs/build_reports/tests.rst +0 -0
  232. {cikit-0.0.4 → cikit-0.1.0}/setup.cfg +0 -0
  233. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/ci/__init__.py +0 -0
  234. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/ci/loader.py +0 -0
  235. {cikit-0.0.4/src/cikit/resources/php/jobdata → cikit-0.1.0/src/cikit/resources/php/cikit_data}/.htaccess +0 -0
  236. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/status.py +0 -0
  237. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/systemtest/__init__.py +0 -0
  238. {cikit-0.0.4 → cikit-0.1.0}/src/cikit/xml_tools.py +0 -0
  239. {cikit-0.0.4 → cikit-0.1.0}/src/cikit.egg-info/dependency_links.txt +0 -0
  240. {cikit-0.0.4 → cikit-0.1.0}/src/cikit.egg-info/requires.txt +0 -0
  241. {cikit-0.0.4 → cikit-0.1.0}/src/cikit.egg-info/top_level.txt +0 -0
  242. {cikit-0.0.4 → cikit-0.1.0}/tests/systemtests/conftest.py +0 -0
  243. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_ci_commands/__init__.py +0 -0
  244. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/__init__.py +0 -0
  245. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_env/__init__.py +0 -0
  246. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_env/test_common.py +0 -0
  247. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_status.py +0 -0
  248. {cikit-0.0.4 → cikit-0.1.0}/tests/unittests/test_cikit/test_xml_tools.py +0 -0
cikit-0.1.0/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.egg-info
2
+ src/cikit/resources/php/cikit_data/config.php
3
+ __pycache__
4
+ public
5
+ *.xml
6
+ .coverage
7
+ tmp
8
+ docs/_generated
9
+ docs/_static/badges
10
+ docs/_static/artifacts
11
+ docs/_static/*.svg
12
+ docs/*.inc
13
+ docs/guides/timeline_charts.rst
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,12 +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
- JOBDATA_CACHE_DIR: public/jobdata
20
20
  EXEC_TOOL: "uv run"
21
21
  FF_TIMESTAMPS: "false"
22
+
22
23
 
23
24
 
24
25
  ###################################################################################################
@@ -103,20 +104,26 @@ pylint:
103
104
  unittests:
104
105
  stage: test
105
106
  script:
106
- - $EXEC_TOOL cikit test tests/unittests --alias unittests
107
+ - $EXEC_TOOL cikit --name unittests test tests/unittests --coverage-dir "$CIKIT_COVERAGE_DIR"
107
108
  artifacts:
108
109
  when: always
109
110
  paths:
110
111
  - public
112
+ - "$CIKIT_COVERAGE_DIR"
111
113
 
112
114
  systemtests:
113
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
114
120
  script:
115
- - $EXEC_TOOL cikit test tests/systemtests --alias systemtests
121
+ - $EXEC_TOOL cikit --name systemtests test tests/systemtests --coverage-dir "$CIKIT_COVERAGE_DIR"
116
122
  artifacts:
117
123
  when: always
118
124
  paths:
119
125
  - public
126
+ - "$CIKIT_COVERAGE_DIR"
120
127
 
121
128
 
122
129
  ###################################################################################################
@@ -126,16 +133,11 @@ systemtests:
126
133
  coverage:
127
134
  stage: coverage
128
135
  script:
129
- - $EXEC_TOOL cikit coverage
136
+ - $EXEC_TOOL cikit coverage "$CIKIT_COVERAGE_DIR"
130
137
  artifacts:
131
138
  when: always
132
139
  paths:
133
140
  - public
134
- reports:
135
- coverage_report:
136
- coverage_format: cobertura
137
- path: public/artifacts/cobertura.xml
138
-
139
141
 
140
142
  ###################################################################################################
141
143
  # Build jobs
@@ -161,13 +163,12 @@ sphinx:
161
163
  # Deployment
162
164
  ###################################################################################################
163
165
 
164
- pages:
166
+ deploy-pages:
165
167
  stage: deploy
166
168
  when: always
167
169
  script:
168
170
  - echo "Publishing artifacts to GitLab Pages"
169
171
  rules:
170
172
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
171
- artifacts:
172
- paths:
173
- - 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