besa 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 (201) hide show
  1. besa-0.1.0/.clang-format +76 -0
  2. besa-0.1.0/.github/workflows/docs.yml +52 -0
  3. besa-0.1.0/.gitignore +8 -0
  4. besa-0.1.0/PKG-INFO +38 -0
  5. besa-0.1.0/docs/explanation/configuration-lifecycle.md +28 -0
  6. besa-0.1.0/docs/explanation/dependencies.md +17 -0
  7. besa-0.1.0/docs/explanation/features-and-instrumentation.md +25 -0
  8. besa-0.1.0/docs/explanation/self-contained-projects.md +14 -0
  9. besa-0.1.0/docs/how-to/cpp-user-docs.md +180 -0
  10. besa-0.1.0/docs/how-to/dependencies.md +39 -0
  11. besa-0.1.0/docs/how-to/feature-constraints.md +129 -0
  12. besa-0.1.0/docs/how-to/features.md +49 -0
  13. besa-0.1.0/docs/how-to/instrumentation.md +43 -0
  14. besa-0.1.0/docs/how-to/publish-docs.md +30 -0
  15. besa-0.1.0/docs/how-to/run-tests.md +49 -0
  16. besa-0.1.0/docs/how-to/selectors.md +47 -0
  17. besa-0.1.0/docs/how-to/update-cmake.md +21 -0
  18. besa-0.1.0/docs/index.md +28 -0
  19. besa-0.1.0/docs/reference/cli.md +38 -0
  20. besa-0.1.0/docs/reference/cmake-api.md +204 -0
  21. besa-0.1.0/docs/reference/configuration.md +130 -0
  22. besa-0.1.0/docs/reference/dependencies.md +58 -0
  23. besa-0.1.0/docs/reference/instrumentation.md +63 -0
  24. besa-0.1.0/docs/reference/project-layout.md +63 -0
  25. besa-0.1.0/docs/reference/release-process.md +165 -0
  26. besa-0.1.0/docs/reference/selectors.md +70 -0
  27. besa-0.1.0/docs/reference/testing.md +111 -0
  28. besa-0.1.0/docs/reference/versioning.md +38 -0
  29. besa-0.1.0/docs/tutorials/first-cpp-project.md +56 -0
  30. besa-0.1.0/docs/tutorials/first-python-project.md +22 -0
  31. besa-0.1.0/properdocs.yml +54 -0
  32. besa-0.1.0/pyproject.toml +62 -0
  33. besa-0.1.0/readme.md +27 -0
  34. besa-0.1.0/share/besa/cpp/CMakeLists.txt +22 -0
  35. besa-0.1.0/share/besa/cpp/CMakePresets.json +105 -0
  36. besa-0.1.0/share/besa/cpp/cmake/.besa-cmake-module +1 -0
  37. besa-0.1.0/share/besa/cpp/cmake/asan.cmake +16 -0
  38. besa-0.1.0/share/besa/cpp/cmake/besaConfig.cmake +30 -0
  39. besa-0.1.0/share/besa/cpp/cmake/besaConfigVersion.cmake +9 -0
  40. besa-0.1.0/share/besa/cpp/cmake/coverage/clang-report.cmake +37 -0
  41. besa-0.1.0/share/besa/cpp/cmake/coverage.cmake +131 -0
  42. besa-0.1.0/share/besa/cpp/cmake/dependency.cmake +82 -0
  43. besa-0.1.0/share/besa/cpp/cmake/devtools.cmake +175 -0
  44. besa-0.1.0/share/besa/cpp/cmake/directory.cmake +122 -0
  45. besa-0.1.0/share/besa/cpp/cmake/feature.cmake +302 -0
  46. besa-0.1.0/share/besa/cpp/cmake/finalize.cmake +9 -0
  47. besa-0.1.0/share/besa/cpp/cmake/format/clang-format.cmake +32 -0
  48. besa-0.1.0/share/besa/cpp/cmake/format.cmake +27 -0
  49. besa-0.1.0/share/besa/cpp/cmake/internal.cmake +76 -0
  50. besa-0.1.0/share/besa/cpp/cmake/lsan.cmake +16 -0
  51. besa-0.1.0/share/besa/cpp/cmake/package.cmake +104 -0
  52. besa-0.1.0/share/besa/cpp/cmake/selector.cmake +158 -0
  53. besa-0.1.0/share/besa/cpp/cmake/surrogate.cmake +112 -0
  54. besa-0.1.0/share/besa/cpp/cmake/target.cmake +104 -0
  55. besa-0.1.0/share/besa/cpp/cmake/test.cmake +139 -0
  56. besa-0.1.0/share/besa/cpp/cmake/testmode.cmake +209 -0
  57. besa-0.1.0/share/besa/cpp/cmake/tidy.cmake +34 -0
  58. besa-0.1.0/share/besa/cpp/cmake/ubsan.cmake +16 -0
  59. besa-0.1.0/share/besa/cpp/cmake/userdocs/assemble-site.cmake +30 -0
  60. besa-0.1.0/share/besa/cpp/cmake/userdocs/multiversion-metadata.cmake +69 -0
  61. besa-0.1.0/share/besa/cpp/cmake/userdocs.cmake +353 -0
  62. besa-0.1.0/share/besa/cpp/cmake/version.cmake +69 -0
  63. besa-0.1.0/share/besa/cpp/cmake/warning.cmake +97 -0
  64. besa-0.1.0/share/besa/cpp/test/CMakeLists.txt +79 -0
  65. besa-0.1.0/share/besa/cpp/test/asan/.gitignore +1 -0
  66. besa-0.1.0/share/besa/cpp/test/asan/CMakeLists.txt +18 -0
  67. besa-0.1.0/share/besa/cpp/test/asan/CMakePresets.json +59 -0
  68. besa-0.1.0/share/besa/cpp/test/asan/asan.fail.t.cpp +10 -0
  69. besa-0.1.0/share/besa/cpp/test/asan/asan.t.cpp +16 -0
  70. besa-0.1.0/share/besa/cpp/test/builder/.gitignore +1 -0
  71. besa-0.1.0/share/besa/cpp/test/builder/CMakeLists.txt +18 -0
  72. besa-0.1.0/share/besa/cpp/test/builder/CMakePresets.json +58 -0
  73. besa-0.1.0/share/besa/cpp/test/builder/builder.t.cpp +15 -0
  74. besa-0.1.0/share/besa/cpp/test/builder/include/simple.hpp +10 -0
  75. besa-0.1.0/share/besa/cpp/test/builder/lib/simple.cpp +15 -0
  76. besa-0.1.0/share/besa/cpp/test/compile/CMakeLists.txt +20 -0
  77. besa-0.1.0/share/besa/cpp/test/compile/CMakePresets.json +59 -0
  78. besa-0.1.0/share/besa/cpp/test/compile/test/main/satellite.t.cpp +8 -0
  79. besa-0.1.0/share/besa/cpp/test/compile/test/main.t.cpp +17 -0
  80. besa-0.1.0/share/besa/cpp/test/compile/test/other.fail.t.cpp +9 -0
  81. besa-0.1.0/share/besa/cpp/test/coverage/CMakeLists.txt +27 -0
  82. besa-0.1.0/share/besa/cpp/test/coverage/CMakePresets.json +59 -0
  83. besa-0.1.0/share/besa/cpp/test/coverage/a.1.t.cpp +20 -0
  84. besa-0.1.0/share/besa/cpp/test/coverage/a.2.t.cpp +20 -0
  85. besa-0.1.0/share/besa/cpp/test/coverage/include/math.hpp +15 -0
  86. besa-0.1.0/share/besa/cpp/test/coverage/lib/math.cpp +22 -0
  87. besa-0.1.0/share/besa/cpp/test/feature/CMakeLists.txt +16 -0
  88. besa-0.1.0/share/besa/cpp/test/feature/CMakePresets.json +104 -0
  89. besa-0.1.0/share/besa/cpp/test/format/CMakeLists.txt +10 -0
  90. besa-0.1.0/share/besa/cpp/test/format/CMakePresets.json +59 -0
  91. besa-0.1.0/share/besa/cpp/test/format/format.t.cpp +11 -0
  92. besa-0.1.0/share/besa/cpp/test/format.fail/CMakeLists.txt +10 -0
  93. besa-0.1.0/share/besa/cpp/test/format.fail/CMakePresets.json +59 -0
  94. besa-0.1.0/share/besa/cpp/test/format.fail/format.fail.t.cpp +11 -0
  95. besa-0.1.0/share/besa/cpp/test/lsan/.gitignore +1 -0
  96. besa-0.1.0/share/besa/cpp/test/lsan/CMakeLists.txt +18 -0
  97. besa-0.1.0/share/besa/cpp/test/lsan/CMakePresets.json +59 -0
  98. besa-0.1.0/share/besa/cpp/test/lsan/lsan.fail.t.cpp +19 -0
  99. besa-0.1.0/share/besa/cpp/test/lsan/lsan.t.cpp +12 -0
  100. besa-0.1.0/share/besa/cpp/test/surrogate/CMakeLists.txt +19 -0
  101. besa-0.1.0/share/besa/cpp/test/surrogate/CMakePresets.json +59 -0
  102. besa-0.1.0/share/besa/cpp/test/surrogate/badlib/main.hpp +11 -0
  103. besa-0.1.0/share/besa/cpp/test/surrogate/goodlib/main.hpp +12 -0
  104. besa-0.1.0/share/besa/cpp/test/surrogate/lib/main.cpp +5 -0
  105. besa-0.1.0/share/besa/cpp/test/testmode/CMakeLists.txt +48 -0
  106. besa-0.1.0/share/besa/cpp/test/testmode/CMakePresets.json +92 -0
  107. besa-0.1.0/share/besa/cpp/test/tidy/.clang-tidy +11 -0
  108. besa-0.1.0/share/besa/cpp/test/tidy/CMakeLists.txt +11 -0
  109. besa-0.1.0/share/besa/cpp/test/tidy/CMakePresets.json +60 -0
  110. besa-0.1.0/share/besa/cpp/test/tidy/main.t.cpp +12 -0
  111. besa-0.1.0/share/besa/cpp/test/tidy.fail/.clang-tidy +12 -0
  112. besa-0.1.0/share/besa/cpp/test/tidy.fail/CMakeLists.txt +11 -0
  113. besa-0.1.0/share/besa/cpp/test/tidy.fail/CMakePresets.json +60 -0
  114. besa-0.1.0/share/besa/cpp/test/tidy.fail/main.t.cpp +11 -0
  115. besa-0.1.0/share/besa/cpp/test/ubsan/.gitignore +1 -0
  116. besa-0.1.0/share/besa/cpp/test/ubsan/CMakeLists.txt +18 -0
  117. besa-0.1.0/share/besa/cpp/test/ubsan/CMakePresets.json +59 -0
  118. besa-0.1.0/share/besa/cpp/test/ubsan/ubsan.fail.t.cpp +13 -0
  119. besa-0.1.0/share/besa/cpp/test/ubsan/ubsan.t.cpp +13 -0
  120. besa-0.1.0/share/besa/cpp/test/unit/CMakeLists.txt +19 -0
  121. besa-0.1.0/share/besa/cpp/test/unit/CMakePresets.json +59 -0
  122. besa-0.1.0/share/besa/cpp/test/unit/test/main/satellite.t.cpp +8 -0
  123. besa-0.1.0/share/besa/cpp/test/unit/test/main.t.cpp +17 -0
  124. besa-0.1.0/share/besa/cpp/test/unit/test/other.fail.t.cpp +11 -0
  125. besa-0.1.0/share/besa/cpp/vorlage/.clang-format +77 -0
  126. besa-0.1.0/share/besa/cpp/vorlage/.clang-tidy +11 -0
  127. besa-0.1.0/share/besa/cpp/vorlage/.cmake-format.py +244 -0
  128. besa-0.1.0/share/besa/cpp/vorlage/.gitignore +13 -0
  129. besa-0.1.0/share/besa/cpp/vorlage/CMakeLists.txt +176 -0
  130. besa-0.1.0/share/besa/cpp/vorlage/CMakePresets.json +138 -0
  131. besa-0.1.0/share/besa/cpp/vorlage/api-docs/Doxyfile +27 -0
  132. besa-0.1.0/share/besa/cpp/vorlage/api-docs/_static/css/besa-api.css +108 -0
  133. besa-0.1.0/share/besa/cpp/vorlage/api-docs/_templates/project-links.html +8 -0
  134. besa-0.1.0/share/besa/cpp/vorlage/api-docs/_templates/versioning.html +22 -0
  135. besa-0.1.0/share/besa/cpp/vorlage/api-docs/conf.py +190 -0
  136. besa-0.1.0/share/besa/cpp/vorlage/api-docs/index.rst +11 -0
  137. besa-0.1.0/share/besa/cpp/vorlage/docs/CMakeLists.txt +12 -0
  138. besa-0.1.0/share/besa/cpp/vorlage/docs/index.md +7 -0
  139. besa-0.1.0/share/besa/cpp/vorlage/docs/reference/api.md +39 -0
  140. besa-0.1.0/share/besa/cpp/vorlage/docs/reference/index.md +5 -0
  141. besa-0.1.0/share/besa/cpp/vorlage/project/CMakeLists.txt +3 -0
  142. besa-0.1.0/share/besa/cpp/vorlage/project/kosha25/CMakeLists.txt +1 -0
  143. besa-0.1.0/share/besa/cpp/vorlage/properdocs.multiversion.yml +14 -0
  144. besa-0.1.0/share/besa/cpp/vorlage/properdocs.yml +31 -0
  145. besa-0.1.0/share/besa/cpp/vorlage/properdocs_hook.py +117 -0
  146. besa-0.1.0/share/besa/cpp/vorlage/properdocs_multiversion_hook.py +194 -0
  147. besa-0.1.0/share/besa/cpp/vorlage/readme.md +112 -0
  148. besa-0.1.0/share/besa/cpp/vorlage/showcase/CMakeLists.txt +1 -0
  149. besa-0.1.0/share/besa/cpp/vorlage/showcase/hello/CMakeLists.txt +6 -0
  150. besa-0.1.0/share/besa/cpp/vorlage/spack/repos.yaml +3 -0
  151. besa-0.1.0/share/besa/cpp/vorlage/spack/spack_repo/vorlage_dev/packages/properdocs/package.py +48 -0
  152. besa-0.1.0/share/besa/cpp/vorlage/spack/spack_repo/vorlage_dev/packages/vorlage_dev_env/package.py +40 -0
  153. besa-0.1.0/share/besa/cpp/vorlage/spack/spack_repo/vorlage_dev/repo.yaml +3 -0
  154. besa-0.1.0/share/besa/cpp/vorlage/spack.yaml +19 -0
  155. besa-0.1.0/share/besa/cpp/vorlage/src/CMakeLists.txt +35 -0
  156. besa-0.1.0/share/besa/cpp/vorlage/src/asm/bin/.gitkeep +0 -0
  157. besa-0.1.0/share/besa/cpp/vorlage/src/asm/include/.gitkeep +0 -0
  158. besa-0.1.0/share/besa/cpp/vorlage/src/asm/lib/.gitkeep +0 -0
  159. besa-0.1.0/share/besa/cpp/vorlage/src/c/bin/.gitkeep +0 -0
  160. besa-0.1.0/share/besa/cpp/vorlage/src/c/include/.gitkeep +0 -0
  161. besa-0.1.0/share/besa/cpp/vorlage/src/c/lib/.gitkeep +0 -0
  162. besa-0.1.0/share/besa/cpp/vorlage/src/cpp/bin/vorlage.cpp +13 -0
  163. besa-0.1.0/share/besa/cpp/vorlage/src/cpp/include/vorlage/vorlage.hpp +12 -0
  164. besa-0.1.0/share/besa/cpp/vorlage/src/cpp/lib/vorlage.cpp +13 -0
  165. besa-0.1.0/share/besa/cpp/vorlage/src/cuda/bin/.gitkeep +0 -0
  166. besa-0.1.0/share/besa/cpp/vorlage/src/cuda/include/.gitkeep +0 -0
  167. besa-0.1.0/share/besa/cpp/vorlage/src/cuda/lib/cuda.cu +8 -0
  168. besa-0.1.0/share/besa/cpp/vorlage/src/hip/bin/.gitkeep +0 -0
  169. besa-0.1.0/share/besa/cpp/vorlage/src/hip/include/.gitkeep +0 -0
  170. besa-0.1.0/share/besa/cpp/vorlage/src/hip/lib/.gitkeep +0 -0
  171. besa-0.1.0/share/besa/cpp/vorlage/test/CMakeLists.txt +28 -0
  172. besa-0.1.0/share/besa/cpp/vorlage/test/compile/CMakeLists.txt +7 -0
  173. besa-0.1.0/share/besa/cpp/vorlage/test/compile/cpp/header.t.cpp +2 -0
  174. besa-0.1.0/share/besa/cpp/vorlage/test/smoke/CMakeLists.txt +1 -0
  175. besa-0.1.0/share/besa/cpp/vorlage/test/smoke/cpp/CMakeLists.txt +37 -0
  176. besa-0.1.0/share/besa/cpp/vorlage/test/smoke/cpp/asan.t.cpp +12 -0
  177. besa-0.1.0/share/besa/cpp/vorlage/test/smoke/cpp/lsan.t.cpp +19 -0
  178. besa-0.1.0/share/besa/cpp/vorlage/test/smoke/cpp/thread.t.cpp +44 -0
  179. besa-0.1.0/share/besa/cpp/vorlage/test/smoke/cpp/ubsan.t.cpp +13 -0
  180. besa-0.1.0/share/besa/cpp/vorlage/test/unit/CMakeLists.txt +8 -0
  181. besa-0.1.0/share/besa/cpp/vorlage/test/unit/cpp/vorlage/false.disabled.t.cpp +2 -0
  182. besa-0.1.0/share/besa/cpp/vorlage/test/unit/cpp/vorlage/hello.t.cpp +10 -0
  183. besa-0.1.0/share/besa/python/test/.gitkeep +0 -0
  184. besa-0.1.0/share/besa/python/vorlage/.gitignore +6 -0
  185. besa-0.1.0/share/besa/python/vorlage/pyproject.toml.in +43 -0
  186. besa-0.1.0/share/besa/python/vorlage/readme.md +3 -0
  187. besa-0.1.0/share/besa/python/vorlage/src/vorlage/__init__.py +4 -0
  188. besa-0.1.0/share/besa/python/vorlage/src/vorlage/__main__.py +3 -0
  189. besa-0.1.0/share/besa/python/vorlage/src/vorlage/cli.py +6 -0
  190. besa-0.1.0/share/besa/python/vorlage/src/vorlage/library.py +2 -0
  191. besa-0.1.0/share/besa/python/vorlage/src/vorlage/metadata.py +1 -0
  192. besa-0.1.0/share/besa/python/vorlage/test/test_hello.py +5 -0
  193. besa-0.1.0/spack.yaml +27 -0
  194. besa-0.1.0/src/besa/__init__.py +7 -0
  195. besa-0.1.0/src/besa/__main__.py +3 -0
  196. besa-0.1.0/src/besa/cli.py +314 -0
  197. besa-0.1.0/src/besa/metadata.py +5 -0
  198. besa-0.1.0/test/test_cli.py +153 -0
  199. besa-0.1.0/test/test_cpp_template.py +1286 -0
  200. besa-0.1.0/test/test_python_template.py +23 -0
  201. besa-0.1.0/uv.lock +743 -0
@@ -0,0 +1,76 @@
1
+ #-------------------------------------------------------------------------------
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ #-------------------------------------------------------------------------------
4
+ ---
5
+ Language: Cpp
6
+ # BasedOnStyle: LLVM
7
+ AccessModifierOffset: -2
8
+ AlignAfterOpenBracket: AlwaysBreak
9
+ AlignEscapedNewlinesLeft: false
10
+ AlignOperands: true
11
+ AlignTrailingComments: true
12
+ AllowAllParametersOfDeclarationOnNextLine: true
13
+ AllowShortBlocksOnASingleLine: false
14
+ AllowShortCaseLabelsOnASingleLine: false
15
+ AllowShortIfStatementsOnASingleLine: false
16
+ AllowShortLoopsOnASingleLine: false
17
+ AllowShortFunctionsOnASingleLine: InlineOnly
18
+ AlwaysBreakAfterDefinitionReturnType: false
19
+ AlwaysBreakTemplateDeclarations: true
20
+ AlwaysBreakBeforeMultilineStrings: true
21
+ BreakBeforeBinaryOperators: true
22
+ BreakBeforeTernaryOperators: true
23
+ BreakConstructorInitializersBeforeComma: false
24
+ BinPackParameters: false
25
+ BinPackArguments: false
26
+ ColumnLimit: 100
27
+ ConstructorInitializerAllOnOneLineOrOnePerLine: true
28
+ ConstructorInitializerIndentWidth: 0
29
+ DerivePointerAlignment: false
30
+ ExperimentalAutoDetectBinPacking: false
31
+ IndentCaseLabels: false
32
+ IndentWrappedFunctionNames: false
33
+ IndentFunctionDeclarationAfterType: false
34
+ MaxEmptyLinesToKeep: 1
35
+ KeepEmptyLinesAtTheStartOfBlocks: true
36
+ NamespaceIndentation: None
37
+ ObjCBlockIndentWidth: 2
38
+ ObjCSpaceAfterProperty: false
39
+ ObjCSpaceBeforeProtocolList: true
40
+ PenaltyBreakBeforeFirstCallParameter: 19
41
+ PenaltyBreakComment: 300
42
+ PenaltyBreakString: 1000
43
+ PenaltyBreakFirstLessLess: 120
44
+ PenaltyExcessCharacter: 1000000
45
+ PenaltyReturnTypeOnItsOwnLine: 1000000
46
+ PointerAlignment: Left
47
+ SpacesBeforeTrailingComments: 1
48
+ Cpp11BracedListStyle: true
49
+ Standard: Cpp11
50
+ IndentWidth: 2
51
+ TabWidth: 2
52
+ UseTab: Never
53
+ BreakBeforeBraces: Stroustrup
54
+ SpacesInParentheses: false
55
+ SpacesInSquareBrackets: false
56
+ SpacesInAngles: false
57
+ SpaceInEmptyParentheses: false
58
+ SpacesInCStyleCastParentheses: false
59
+ SpaceAfterCStyleCast: false
60
+ SpacesInContainerLiterals: true
61
+ SpaceBeforeAssignmentOperators: true
62
+ ContinuationIndentWidth: 2
63
+ CommentPragmas: '^ IWYU pragma:'
64
+ SortIncludes: 'CaseSensitive'
65
+ SpaceBeforeParens: ControlStatements
66
+ DisableFormat: false
67
+ StatementMacros: [
68
+ 'NOLA_GLOBAL',
69
+ 'NOLA_HOST',
70
+ 'NOLA_DEVICE',
71
+ 'NOLA_HOST_DEVICE'
72
+ ]
73
+ ---
74
+ Language: Json
75
+ DisableFormat: true
76
+ ---
@@ -0,0 +1,52 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ concurrency:
9
+ group: pages
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+ steps:
18
+ - name: Check out repository
19
+ uses: actions/checkout@v6
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v9.0.0
23
+ with:
24
+ enable-cache: true
25
+
26
+ - name: Install Python
27
+ run: uv python install
28
+
29
+ - name: Build ProperDocs site
30
+ run: uv run --group docs properdocs build --strict
31
+
32
+ - name: Configure GitHub Pages
33
+ uses: actions/configure-pages@v5
34
+
35
+ - name: Upload GitHub Pages artifact
36
+ uses: actions/upload-pages-artifact@v4
37
+ with:
38
+ path: site
39
+
40
+ deploy:
41
+ needs: build
42
+ runs-on: ubuntu-latest
43
+ permissions:
44
+ pages: write
45
+ id-token: write
46
+ environment:
47
+ name: github-pages
48
+ url: ${{ steps.deployment.outputs.page_url }}
49
+ steps:
50
+ - name: Deploy GitHub Pages
51
+ id: deployment
52
+ uses: actions/deploy-pages@v4
besa-0.1.0/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ .pytest_cache/
3
+ .venv/
4
+ build/
5
+ dist/
6
+ *.egg-info/
7
+ .spack-env/
8
+ spack.lock
besa-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.5
2
+ Name: besa
3
+ Version: 0.1.0
4
+ Summary: Declarative project development tooling for CMake and Python projects
5
+ Project-URL: Documentation, https://ambhora.github.io/besa/
6
+ Project-URL: Source, https://github.com/ambhora/besa
7
+ Author-email: Jayesh Badwaik <j.badwaik@fz-juelich.de>
8
+ License-Expression: Apache-2.0
9
+ Requires-Python: >=3.11
10
+ Description-Content-Type: text/markdown
11
+
12
+ # BESA
13
+
14
+ BESA is project-development tooling for declarative, self-contained build descriptions. Its current
15
+ focus is C++/CMake plus a minimal Python project generator.
16
+
17
+ ```console
18
+ uv run besa cpp generate --path /tmp --name example
19
+ cd /tmp/example
20
+ cmake --workflow --preset gcc --fresh
21
+ ```
22
+
23
+ A generated C++ project vendors the BESA CMake implementation under `cmake/besa`; it does not require
24
+ BESA to remain installed in order to build.
25
+
26
+ Run the BESA regression suite with:
27
+
28
+ ```console
29
+ uv run --group test pytest --basetemp=build/test
30
+ ```
31
+
32
+ Build the ProperDocs site with:
33
+
34
+ ```console
35
+ uv run --group docs properdocs build
36
+ ```
37
+
38
+ See the full documentation under `docs/` or the GitHub Pages site.
@@ -0,0 +1,28 @@
1
+ # Configuration lifecycle
2
+
3
+ BESA deliberately separates configuration selection from project construction.
4
+
5
+ Before `besa_configure_complete()`, the project declares the configuration sets which it owns:
6
+ features, default features, test modes, and default test modes. It may also register feature,
7
+ devtool, and test-mode constraints. Devtool and warning capability names themselves are supplied by
8
+ BESA, so projects select them but do not redeclare their allow-lists.
9
+
10
+ `besa_configure_complete()` then resolves four independent families:
11
+
12
+ 1. `PROJECT_FEATURES` over the project's feature defaults;
13
+ 2. `PROJECT_DEVTOOLS` over BESA's supported devtools;
14
+ 3. `TEST_MODES` over the project's test-mode defaults;
15
+ 4. `PROJECT_WARNINGS` over BESA's supported warning policies.
16
+
17
+ Duplicate or unknown selections are rejected first. Project constraints run against the fully
18
+ resolved feature/devtool/test-mode sets next. Only after every constraint succeeds does BESA publish
19
+ the resolved booleans, enable compiler languages implied by `toolchain-*`, and create any
20
+ compiler-dependent instrumentation policy.
21
+
22
+ After this phase boundary, dependencies, directories, targets, and tests are processed against a
23
+ frozen configuration. This prevents a dependency or subdirectory from implicitly changing the
24
+ meaning of configuration selection halfway through a configure run.
25
+
26
+ Project-wide packaging and instrumentation reporting need the final target/dependency graph. BESA
27
+ therefore schedules those operations with CMake's deferred-call mechanism and executes them after the
28
+ project tree has been processed.
@@ -0,0 +1,17 @@
1
+ # Dependency model
2
+
3
+ BESA separates **why** a dependency exists from **how** CMake discovers it.
4
+
5
+ `KIND` is one of `NORMAL`, `BUILD`, or `DEV`. Normal dependencies belong to the product and are
6
+ written into generated consumer package metadata. Build dependencies are needed to construct the
7
+ software but not to consume it. Dev dependencies belong to testing, documentation, analysis, or
8
+ other development workflows and are never propagated to consumers.
9
+
10
+ `PROVIDER` currently distinguishes `CMAKE` from `PKGCONFIG`. The CMake provider deliberately relies on
11
+ `find_package()` rather than requiring a particular metadata format. Consequently a dependency can
12
+ move from a traditional CMake package config toward CPS when the active CMake/dependency supports it
13
+ without changing the BESA project declaration.
14
+
15
+ This information is intentionally richer than a raw `find_package()` call because it is also the
16
+ foundation for a future package/build model in which normal, build, and dev dependency graphs can be
17
+ handled differently.
@@ -0,0 +1,25 @@
1
+ # Configuration families are intentionally orthogonal
2
+
3
+ BESA keeps several configuration concepts separate because they answer different questions.
4
+
5
+ A **feature** changes project capability or topology: examples are `build-source`, `toolchain-cuda`, `toolchain-hip`, `toolchain-asm`,
6
+ `project-kosha25`, and `user-docs`. Feature names and defaults are defined by the project. Feature
7
+ selectors decide whether directories and dependencies participate in the project graph.
8
+
9
+ A **devtool** changes how existing targets are instrumented or checked: examples are ASan, coverage,
10
+ clang-tidy, formatting, and surrogate-header validation. Devtool names are capabilities defined by
11
+ BESA; the project only selects which ones to use. Project-specific constraints may still reject
12
+ particular combinations.
13
+
14
+ A **warning policy** modifies compiler diagnostics. Warning policies are also defined by BESA and are
15
+ composable: `essential;error` means “enable the essential warning set and promote warnings to
16
+ errors.” They do not alter project topology.
17
+
18
+ A **test mode** is a project-defined workflow selector. Tests state which modes they support, and are
19
+ built/registered only when at least one supported mode is enabled. BESA gives the names no intrinsic
20
+ meaning.
21
+
22
+ This separation keeps source build descriptions stable as project workflows and developer tooling
23
+ evolve. A future BESA version can change coverage implementation, add another warning policy, or add
24
+ a new devtool without forcing projects to rewrite target construction code. Conversely, projects can
25
+ add new feature or test-mode names without requiring changes to BESA.
@@ -0,0 +1,14 @@
1
+ # Why generated C++ projects vendor BESA
2
+
3
+ The Python package is a development tool, not a runtime requirement of generated C++ software.
4
+ `besa cpp generate` copies the current CMake implementation into `cmake/besa`, and the generated
5
+ project finds that local package explicitly.
6
+
7
+ This has two useful consequences. First, a source checkout remains buildable on a machine which has
8
+ CMake and the project's actual dependencies but no Python BESA installation. Second, upgrading the
9
+ build abstraction is explicit: `besa cpp update` replaces only the BESA-managed module directory and
10
+ never rewrites project-owned CMake.
11
+
12
+ The generated project's installed CMake package also does not depend on BESA. Target instrumentation
13
+ is build-interface-only and BESA emits normal consumer dependency discovery directly into the
14
+ project's own `<project>Config.cmake`.
@@ -0,0 +1,180 @@
1
+ # Build C++ user documentation
2
+
3
+ Generated C++ projects publish one documentation site with two rendering layers:
4
+
5
+ ```text
6
+ ProperDocs -> site root and prose/information architecture
7
+ Doxygen XML -> Breathe -> Sphinx -> versioned C/C++ API reference
8
+ ```
9
+
10
+ ProperDocs is always canonical. The Sphinx/Breathe output is mounted below
11
+ `reference/api/<version>/` and every API page contains links back to the main ProperDocs site and the
12
+ API-version landing page.
13
+
14
+ ## Enable the documentation feature
15
+
16
+ ```bash
17
+ cmake -S . -B build -DPROJECT_FEATURES=user-docs
18
+ ```
19
+
20
+ The documentation toolchain requires `properdocs`, `doxygen`, `dot`, `sphinx-build`, Breathe, and
21
+ `sphinx-multiversion`.
22
+
23
+ ## Author the main site
24
+
25
+ The generated project keeps the two source trees separate:
26
+
27
+ ```text
28
+ properdocs.yml
29
+
30
+ docs/ # ProperDocs Markdown
31
+ ├── index.md
32
+ └── reference/
33
+ ├── index.md
34
+ └── api.md
35
+
36
+ api-docs/ # API renderer only
37
+ ├── conf.py
38
+ ├── Doxyfile
39
+ ├── index.rst
40
+ ├── api.rst
41
+ └── _templates/
42
+ └── versioning.html
43
+ ```
44
+
45
+ Because `properdocs.yml` is checked in at the project root, normal ProperDocs authoring works without
46
+ CMake:
47
+
48
+ ```bash
49
+ properdocs serve
50
+ ```
51
+
52
+ The API landing page contains a static `main` fallback for this mode. The complete CMake publication
53
+ build loads the full version list from the generated `versions.json`.
54
+
55
+ ## Build the complete publication site
56
+
57
+ Commit the API documentation files before a multiversion build, then run:
58
+
59
+ ```bash
60
+ cmake --build build --target user.docs
61
+ ```
62
+
63
+ `user.docs` performs three steps:
64
+
65
+ 1. ProperDocs builds the main site.
66
+ 2. sphinx-multiversion builds the API reference for selected local branch heads and tags; each Sphinx
67
+ build runs Doxygen at `builder-inited`, and Breathe consumes that checkout's Doxygen XML.
68
+ 3. BESA assembles the API tree below the ProperDocs API landing page.
69
+
70
+ The final deployable directory is:
71
+
72
+ ```text
73
+ build/doc/site/
74
+ ├── index.html
75
+ ├── reference/
76
+ │ └── api/
77
+ │ ├── index.html # ProperDocs landing page
78
+ │ ├── versions.json # generated by BESA
79
+ │ ├── main/
80
+ │ ├── v0.1.0/
81
+ │ └── v0.2.0/
82
+ └── .nojekyll
83
+ ```
84
+
85
+ Upload the contents of `build/doc/site/` as the GitHub Pages artifact. ProperDocs' own `index.html`
86
+ remains the site root; no redirect wrapper is required.
87
+
88
+ ## Build only the API renderer
89
+
90
+ The current checkout can be rendered independently with:
91
+
92
+ ```bash
93
+ cmake --build build --target user.docs.api
94
+ ```
95
+
96
+ Build all selected refs without assembling the ProperDocs site with:
97
+
98
+ ```bash
99
+ cmake --build build --target user.docs.multiversion
100
+ ```
101
+
102
+ The raw multiversion API output is:
103
+
104
+ ```text
105
+ build/doc/api/multiversion/
106
+ ├── versions.json
107
+ ├── main/
108
+ ├── v0.1.0/
109
+ └── v0.2.0/
110
+ ```
111
+
112
+ This directory is an API component, not the final website.
113
+
114
+ ## Navigation back to ProperDocs
115
+
116
+ `api-docs/_templates/versioning.html` adds two persistent entries to the Sphinx sidebar:
117
+
118
+ - **Main documentation** returns to the ProperDocs site root.
119
+ - **API versions** returns to the ProperDocs `reference/api/` landing page.
120
+
121
+ BESA computes the number of path levels from the configured API mount point and passes it to Sphinx.
122
+ The links are therefore relative and do not depend on a GitHub Pages repository prefix, hostname, or
123
+ custom domain.
124
+
125
+ ## CI and remote branch heads
126
+
127
+ sphinx-multiversion builds local branch heads and tags by default. In CI, make sure the refs you want
128
+ to publish are fetched. If you explicitly want remote refs instead, configure sphinx-multiversion in
129
+ `api-docs/conf.py`.
130
+
131
+ ## Install built documentation
132
+
133
+ After building `user.docs`, a normal CMake install includes the complete assembled site:
134
+
135
+ ```bash
136
+ cmake --install build --prefix <prefix>
137
+ ```
138
+
139
+ The site is installed below `share/doc/<project>/`. The install source is optional, so installing a
140
+ library/binary build that never built documentation still succeeds.
141
+
142
+ ## Develop documentation from the Spack environment
143
+
144
+ Generated C++ projects include an independent Spack environment whose root package is
145
+ `<project>-dev-env`. Its variants select development dependencies; they are intentionally independent
146
+ of BESA/CMake feature selection for now.
147
+
148
+ The generated manifest starts with documentation and test tooling enabled:
149
+
150
+ ```bash
151
+ spack env activate .
152
+ spack concretize
153
+ spack install
154
+ ```
155
+
156
+ After installation and activation, `properdocs`, `sphinx-build`, `sphinx-multiversion`, Doxygen, and
157
+ the other documentation tools are available from the Spack environment view. No project-local Python
158
+ `pyproject.toml` or virtual environment is required.
159
+
160
+ Change the dependency selection with ordinary Spack variants, for example:
161
+
162
+ ```bash
163
+ spack change <project>-dev-env~docs+coverage+cuda
164
+ spack concretize -f
165
+ spack install
166
+ ```
167
+
168
+ Select the corresponding BESA/CMake features and devtools separately. BESA does not synchronize the
169
+ Spack and CMake selections automatically.
170
+
171
+ With the `+docs` Spack variant installed, run from the project root:
172
+
173
+ ```bash
174
+ properdocs serve
175
+ ```
176
+
177
+ The generated ProperDocs hook is active only for `serve`. It watches `src/` and `api-docs/`, builds
178
+ `user.docs.api` in `build/properdocs` when those inputs change, and mounts the current API beneath
179
+ `reference/api/main/`. A normal `properdocs build` remains a plain ProperDocs build; the CMake
180
+ `user.docs` target continues to own the full multiversion publication assembly.
@@ -0,0 +1,39 @@
1
+ # Add dependencies
2
+
3
+ Declare a CMake-resolved normal dependency with:
4
+
5
+ ```cmake
6
+ besa_dependency_add(
7
+ NAME fmt
8
+ KIND NORMAL
9
+ PROVIDER CMAKE
10
+ VISIBILITY PRIVATE
11
+ )
12
+ ```
13
+
14
+ Declare a development-only dependency with:
15
+
16
+ ```cmake
17
+ besa_dependency_add(
18
+ NAME Catch2
19
+ VERSION 3
20
+ KIND DEV
21
+ PROVIDER CMAKE
22
+ )
23
+ ```
24
+
25
+ Conditional dependencies use the same selector grammar as directories:
26
+
27
+ ```cmake
28
+ besa_dependency_add(
29
+ NAME Doxygen
30
+ KIND DEV
31
+ PROVIDER CMAKE
32
+ WHEN ALL_OF user-docs
33
+ )
34
+ ```
35
+
36
+ For pkg-config metadata use `PROVIDER PKGCONFIG`.
37
+
38
+ `NORMAL` dependencies are recorded in the generated `<project>Config.cmake`. `BUILD` and `DEV`
39
+ dependencies are intentionally absent from consumer package metadata.
@@ -0,0 +1,129 @@
1
+ # Add configuration constraints
2
+
3
+ BESA lets a project reject otherwise valid combinations in three independently resolved
4
+ configuration families:
5
+
6
+ - project features;
7
+ - BESA devtools;
8
+ - project test modes.
9
+
10
+ Constraints run inside `besa_configure_complete()` after defaults/overrides have been resolved, but
11
+ before toolchain languages or compiler-dependent instrumentation are activated. Each callback uses
12
+ named arguments and returns a boolean plus an optional error message.
13
+
14
+ ## Feature constraints
15
+
16
+ Define a callback:
17
+
18
+ ```cmake
19
+ function(no_cuda_and_hip)
20
+ besa_feature_constraint_arguments_parse(
21
+ PREFIX ARG
22
+ ARGUMENTS ${ARGN}
23
+ )
24
+
25
+ if("toolchain-cuda" IN_LIST ARG_FEATURES
26
+ AND "toolchain-hip" IN_LIST ARG_FEATURES)
27
+ set("${ARG_OUTPUT_VARIABLE}" FALSE PARENT_SCOPE)
28
+ set(
29
+ "${ARG_ERROR_VARIABLE}"
30
+ "CUDA and HIP cannot be enabled together in this project."
31
+ PARENT_SCOPE
32
+ )
33
+ return()
34
+ endif()
35
+
36
+ set("${ARG_OUTPUT_VARIABLE}" TRUE PARENT_SCOPE)
37
+ set("${ARG_ERROR_VARIABLE}" "" PARENT_SCOPE)
38
+ endfunction()
39
+
40
+ besa_register_feature_constraint(
41
+ FUNCTION no_cuda_and_hip
42
+ )
43
+ ```
44
+
45
+ BESA invokes the function with `OUTPUT_VARIABLE`, `ERROR_VARIABLE`, and `FEATURES`.
46
+
47
+ ## Devtool constraints
48
+
49
+ A project can impose policy on BESA-defined devtools without redefining which devtools BESA
50
+ supports:
51
+
52
+ ```cmake
53
+ function(no_asan_with_coverage)
54
+ besa_devtool_constraint_arguments_parse(
55
+ PREFIX ARG
56
+ ARGUMENTS ${ARGN}
57
+ )
58
+
59
+ if("asan" IN_LIST ARG_DEVTOOLS
60
+ AND "coverage" IN_LIST ARG_DEVTOOLS)
61
+ set("${ARG_OUTPUT_VARIABLE}" FALSE PARENT_SCOPE)
62
+ set(
63
+ "${ARG_ERROR_VARIABLE}"
64
+ "This project does not support ASan and coverage in the same build."
65
+ PARENT_SCOPE
66
+ )
67
+ return()
68
+ endif()
69
+
70
+ set("${ARG_OUTPUT_VARIABLE}" TRUE PARENT_SCOPE)
71
+ set("${ARG_ERROR_VARIABLE}" "" PARENT_SCOPE)
72
+ endfunction()
73
+
74
+ besa_register_devtool_constraint(
75
+ FUNCTION no_asan_with_coverage
76
+ )
77
+ ```
78
+
79
+ The callback receives `OUTPUT_VARIABLE`, `ERROR_VARIABLE`, and `DEVTOOLS`.
80
+
81
+ ## Test-mode constraints
82
+
83
+ Test-mode constraints are available for projects whose test workflows have incompatible
84
+ combinations:
85
+
86
+ ```cmake
87
+ function(no_commit_with_nightly)
88
+ besa_test_mode_constraint_arguments_parse(
89
+ PREFIX ARG
90
+ ARGUMENTS ${ARGN}
91
+ )
92
+
93
+ if("ci-commit" IN_LIST ARG_MODES
94
+ AND "nightly" IN_LIST ARG_MODES)
95
+ set("${ARG_OUTPUT_VARIABLE}" FALSE PARENT_SCOPE)
96
+ set(
97
+ "${ARG_ERROR_VARIABLE}"
98
+ "ci-commit and nightly are separate test workflows."
99
+ PARENT_SCOPE
100
+ )
101
+ return()
102
+ endif()
103
+
104
+ set("${ARG_OUTPUT_VARIABLE}" TRUE PARENT_SCOPE)
105
+ set("${ARG_ERROR_VARIABLE}" "" PARENT_SCOPE)
106
+ endfunction()
107
+
108
+ besa_register_test_mode_constraint(
109
+ FUNCTION no_commit_with_nightly
110
+ )
111
+ ```
112
+
113
+ The callback receives `OUTPUT_VARIABLE`, `ERROR_VARIABLE`, and `MODES`.
114
+
115
+ ## Complete configuration after registration
116
+
117
+ Register every constraint before the configuration phase is closed:
118
+
119
+ ```cmake
120
+ besa_register_feature_constraint(FUNCTION no_cuda_and_hip)
121
+ besa_register_devtool_constraint(FUNCTION no_asan_with_coverage)
122
+ besa_register_test_mode_constraint(FUNCTION no_commit_with_nightly)
123
+
124
+ besa_configure_complete()
125
+ ```
126
+
127
+ If a callback sets its output variable to false, BESA reports the callback-provided error with
128
+ `message(FATAL_ERROR)`. A false result with no error text still rejects the configuration with a
129
+ generic constraint diagnostic.
@@ -0,0 +1,49 @@
1
+ # Configure features
2
+
3
+ Declare every supported feature before the configuration phase closes:
4
+
5
+ ```cmake
6
+ besa_features_add(
7
+ FEATURES
8
+ build-source
9
+ toolchain-cpp
10
+ toolchain-cuda
11
+ toolchain-hip
12
+ toolchain-asm
13
+ user-docs
14
+ )
15
+
16
+ besa_features_default(
17
+ FEATURES
18
+ build-source
19
+ toolchain-cpp
20
+ )
21
+
22
+ besa_configure_complete()
23
+ ```
24
+
25
+ `PROJECT_FEATURES` is an override set applied to the defaults:
26
+
27
+ ```console
28
+ cmake -S . -B build/cuda \
29
+ -DPROJECT_FEATURES='toolchain-cuda;~toolchain-cpp'
30
+ ```
31
+
32
+ Positive entries enable a feature. `~feature` disables a default feature. Each underlying feature may
33
+ appear at most once in `PROJECT_FEATURES`; contradictory or repeated entries are rejected.
34
+
35
+ Features beginning with `toolchain-` are special. BESA currently maps:
36
+
37
+ - `toolchain-c` to CMake language `C`;
38
+ - `toolchain-cpp` to `CXX`;
39
+ - `toolchain-cuda` to `CUDA`;
40
+ - `toolchain-hip` to `HIP`;
41
+ - `toolchain-fortran` to `Fortran`;
42
+ - `toolchain-asm` to `ASM`.
43
+
44
+ BESA enables `ASM` after all other selected toolchain languages. This follows CMake's recommendation
45
+ that assembly support be enabled last so an enabled C or C++ compiler can be considered for assembly
46
+ sources.
47
+
48
+ A project may declare another `toolchain-*` name, but enabling it is an error until the installed BESA
49
+ version knows how to map it to a CMake language.