spl-core 7.3.0rc1__py3-none-any.whl → 7.3.2__py3-none-any.whl

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.
@@ -6,71 +6,42 @@
6
6
  param(
7
7
  [Parameter(Mandatory = $false, HelpMessage = 'Install all dependencies required to build. (Switch, default: false)')]
8
8
  [switch]$install = $false,
9
+ [Parameter(Mandatory = $false, HelpMessage = 'Install optional dependencies. (Switch, default: false)')]
10
+ [switch]$installOptional = $false,
9
11
  [Parameter(Mandatory = $false, HelpMessage = 'Install Visual Studio Code. (Switch, default: false)')]
10
12
  [switch]$installVSCode = $false,
13
+ [Parameter(Mandatory = $false, HelpMessage = 'Run all CI tests (python tests with pytest) (Switch, default: false)')]
14
+ [switch]$selftests = $false,
11
15
  [Parameter(Mandatory = $false, HelpMessage = 'Build the target.')]
12
16
  [switch]$build = $false,
17
+ [Parameter(Mandatory = $false, HelpMessage = 'Start Visual Studio Code. (Switch, default: false)')]
18
+ [switch]$startVSCode = $false,
13
19
  [Parameter(Mandatory = $false, HelpMessage = 'Command to be executed (String)')]
14
20
  [string]$command = "",
15
21
  [Parameter(Mandatory = $false, HelpMessage = 'Clean build, wipe out all build artifacts. (Switch, default: false)')]
16
22
  [switch]$clean = $false,
17
23
  [Parameter(Mandatory = $false, HelpMessage = 'Build kit to be used. (String: "prod" or "test", default: "prod")')]
18
24
  [string]$buildKit = "prod",
25
+ [Parameter(Mandatory = $false, HelpMessage = 'Type of build. (String, default: "Debug")')]
26
+ [string]$buildType = "Debug",
19
27
  [Parameter(Mandatory = $false, HelpMessage = 'Target to be built. (String, default: "all")')]
20
28
  [string]$target = "all",
21
29
  [Parameter(Mandatory = $false, HelpMessage = 'Variants (of the product) to be built. (List of strings, leave empty to be asked or "all" for automatic build of all variants)')]
22
30
  [string[]]$variants = $null,
23
31
  [Parameter(Mandatory = $false, HelpMessage = 'filter for self tests, e.g. "Disco or test_Disco.py" (see https://docs.pytest.org/en/stable/usage.html).')]
24
32
  [string]$filter = "",
33
+ [Parameter(Mandatory = $false, HelpMessage = 'Marker for self tests, e.g. "static_analysis" (see https://docs.pytest.org/en/stable/how-to/mark.html).')]
34
+ [string]$marker = "",
25
35
  [Parameter(Mandatory = $false, HelpMessage = 'Additional build arguments for Ninja (e.g., "-d explain -d keepdepfile" for debugging purposes)')]
26
36
  [string]$ninjaArgs = "",
27
37
  [Parameter(Mandatory = $false, HelpMessage = 'Delete CMake cache and reconfigure. (Switch, default: false)')]
28
- [switch]$reconfigure = $false
38
+ [switch]$reconfigure = $false,
39
+ [Parameter(Mandatory = $false, HelpMessage = 'Just configure the build and fetch all dependencies. (Switch, default: false)')]
40
+ [switch]$configureOnly = $false,
41
+ [Parameter(Mandatory = $false, HelpMessage = 'Wait for a key press before exiting. (Switch, default: false)')]
42
+ [switch]$waitForKey = $false
29
43
  )
30
44
 
31
- # Call a command and handle its exit code
32
- Function Invoke-CommandLine {
33
- [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingInvokeExpression', '', Justification = 'Usually this statement must be avoided (https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/avoid-using-invoke-expression?view=powershell-7.3), here it is OK as it does not execute unknown code.')]
34
- param (
35
- [Parameter(Mandatory = $true, Position = 0)]
36
- [string]$CommandLine,
37
- [Parameter(Mandatory = $false, Position = 1)]
38
- [bool]$StopAtError = $true,
39
- [Parameter(Mandatory = $false, Position = 2)]
40
- [bool]$Silent = $false
41
- )
42
- if (-Not $Silent) {
43
- Write-Output "Executing: $CommandLine"
44
- }
45
- $global:LASTEXITCODE = 0
46
- Invoke-Expression $CommandLine
47
- if ($global:LASTEXITCODE -ne 0) {
48
- if ($StopAtError) {
49
- Write-Error "Command line call '$CommandLine' failed with exit code $global:LASTEXITCODE"
50
- }
51
- else {
52
- if (-Not $Silent) {
53
- Write-Output "Command line call '$CommandLine' failed with exit code $global:LASTEXITCODE, continuing ..."
54
- }
55
- }
56
- }
57
- }
58
-
59
- # Update/Reload current environment variable PATH with settings from registry
60
- Function Initialize-EnvPath {
61
- # workaround for system-wide installations
62
- if ($Env:USER_PATH_FIRST) {
63
- $Env:Path = [System.Environment]::GetEnvironmentVariable("Path", "User") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "Machine")
64
- }
65
- else {
66
- $Env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
67
- }
68
- }
69
-
70
- function Test-RunningInCIorTestEnvironment {
71
- return [Boolean]($Env:JENKINS_URL -or $Env:PYTEST_CURRENT_TEST -or $Env:GITHUB_ACTIONS)
72
- }
73
-
74
45
  # Consider CI environment variables (e.g. on Jenkins BRANCH_NAME and CHANGE_TARGET) to filter tests in release branch builds
75
46
  function Get-ReleaseBranchPytestFilter {
76
47
  $ChangeId = $env:CHANGE_ID
@@ -95,138 +66,204 @@ function Get-ReleaseBranchPytestFilter {
95
66
  return $filter
96
67
  }
97
68
 
98
- # Build with given parameters
99
- Function Invoke-Build {
69
+ # Call build system with given parameters
70
+ function Invoke-Build-System {
100
71
  param (
101
72
  [Parameter(Mandatory = $false)]
102
73
  [bool]$clean = $false,
103
74
  [Parameter(Mandatory = $false)]
75
+ [bool]$build = $false,
76
+ [Parameter(Mandatory = $false)]
104
77
  [string]$buildKit = "prod",
78
+ [Parameter(Mandatory = $false)]
79
+ [string]$buildType = "Debug",
105
80
  [Parameter(Mandatory = $true)]
106
81
  [string]$target = "all",
107
82
  [Parameter(Mandatory = $false)]
108
83
  [string[]]$variants = $null,
109
84
  [Parameter(Mandatory = $false)]
110
- [string]$filter = "",
111
- [Parameter(Mandatory = $false)]
112
85
  [string]$ninjaArgs = "",
113
86
  [Parameter(Mandatory = $false)]
114
- [bool]$reconfigure = $false
87
+ [bool]$reconfigure = $false,
88
+ [Parameter(Mandatory = $false)]
89
+ [bool]$configureOnly = $false
115
90
  )
116
- if ("selftests" -eq $target) {
117
- # Run python tests to test all relevant variants and platforms (build kits)
118
- # (normally run in CI environment/Jenkins)
119
- Write-Output "Running all selfstests ..."
120
-
121
- # Build folder for CMake builds
122
- $buildFolder = "build"
123
-
124
- # fresh and clean CMake builds
125
- if ($clean) {
126
- if (Test-Path -Path $buildFolder) {
127
- Write-Output "Removing build folder '$buildFolder' ..."
128
- Remove-Item $buildFolder -Force -Recurse
129
- }
130
- }
131
-
132
- # Filter pytest test cases
133
- $filterCmd = ''
134
- $releaseBranchFilter = Get-ReleaseBranchPytestFilter
135
- if ($releaseBranchFilter) {
136
- $filterCmd = "-k '$releaseBranchFilter'"
91
+ # Determine variants to be built
92
+ $defaultVariantsFolder = ".\variants\"
93
+ if ((-Not $variants) -or ($variants -eq 'all')) {
94
+ $variantConfigs = Get-Childitem -Include config.cmake -Path $defaultVariantsFolder -Recurse | Resolve-Path -Relative
95
+ $variantsList = @()
96
+ Foreach ($variantConfig in $variantConfigs) {
97
+ $variant = ((Get-Item $variantConfig).Directory | Resolve-Path -Relative).Replace($defaultVariantsFolder, "").Replace("\", "/")
98
+ $variantsList += $variant
137
99
  }
138
- # otherwise consider command line option '-filter' if given
139
- elseif ($filter) {
140
- $filterCmd = "-k '$filter'"
141
- }
142
-
143
- # Test result of pytest
144
- $pytestJunitXml = "test/output/test-report.xml"
145
-
146
- # Delete any old pytest result
147
- if (Test-Path -Path $pytestJunitXml) {
148
- Remove-Item $pytestJunitXml -Force
149
- }
150
-
151
- # Finally run pytest
152
- Invoke-CommandLine -CommandLine ".venv\Scripts\pipenv run python -m pytest test --junitxml=$pytestJunitXml $filterCmd"
153
- }
154
- else {
155
- if ((-Not $variants) -or ($variants -eq 'all')) {
156
- $dirs = Get-Childitem -Include config.cmake -Path variants -Recurse | Resolve-Path -Relative
157
- $variantsList = @()
158
- Foreach ($dir in $dirs) {
159
- $variant = (get-item $dir).Directory.BaseName
160
- $variantsList += $variant
100
+ $variantsSelected = @()
101
+ if (-Not $variants) {
102
+ # variant selection by user if not specified
103
+ Write-Information -Tags "Info:" -MessageData "no '--variant <variant>' was given, please select from list:"
104
+ Write-Information -Tags "Info:" -MessageData ("(0) all variants")
105
+ Foreach ($variant in $variantsList) {
106
+ Write-Information -Tags "Info:" -MessageData ("(" + ([array]::IndexOf($variantsList, $variant) + 1) + ") " + $variant)
161
107
  }
162
- $variantsSelected = @()
163
- if (-Not $variants) {
164
- # variant selection by user if not specified
165
- Write-Information -Tags "Info:" -MessageData "no '--variant <variant>' was given, please select from list:"
166
- Foreach ($variant in $variantsList) {
167
- Write-Information -Tags "Info:" -MessageData ("(" + [array]::IndexOf($variantsList, $variant) + ") " + $variant)
168
- }
169
- $variantsSelected += $variantsList[[int](Read-Host "Please enter selected variant number")]
170
- Write-Information -Tags "Info:" -MessageData "Selected variant is: $variantsSelected"
108
+ $selection = [int](Read-Host "Please enter selected variant number")
109
+ if ($selection -eq 0) {
110
+ # build all variants
111
+ $variantsSelected = $variantsList
171
112
  }
172
113
  else {
173
- # otherwise build all variants
174
- $variantsSelected = $variantsList
114
+ # build selected variant
115
+ $variantsSelected += $variantsList[$selection - 1]
175
116
  }
117
+ Write-Information -Tags "Info:" -MessageData "Selected variants: $variantsSelected"
176
118
  }
177
119
  else {
178
- $variantsSelected = $Variants.Replace('\', '/').Replace('./variant/', '').Replace('./variants/', '').Split(',')
120
+ # otherwise build all variants
121
+ $variantsSelected = $variantsList
179
122
  }
123
+ }
124
+ else {
125
+ $variantsSelected = $Variants.Replace($defaultVariantsFolder, "").Replace("\", "/").Split(',') | ForEach-Object { $_.TrimEnd('/') }
126
+ }
180
127
 
181
- # Select 'test' build kit based on target
182
- if ($target.Contains("unittests") -or $target.Contains("reports") -or $target.Contains("docs")) {
183
- $buildKit = "test"
184
- }
128
+ # Select 'test' build kit based on target
129
+ if ($target.Contains("unittests") -or $target.Contains("reports")) {
130
+ $buildKit = "test"
131
+ }
132
+ # If buildKit is 'test' then buildType is 'Debug'
133
+ if ($buildKit -eq "test") {
134
+ $buildType = "Debug"
135
+ }
185
136
 
186
- Foreach ($variant in $variantsSelected) {
187
- Write-Output "Building target '$target' with build kit '$buildKit' for variant '$variant' ..."
137
+ Foreach ($variant in $variantsSelected) {
138
+ $buildFolder = "build\$variant\$buildKit\$buildType".Replace("/", "\")
139
+ # fresh and clean build
140
+ if ($clean) {
141
+ Remove-Path $buildFolder
142
+ }
143
+ New-Directory $buildFolder
188
144
 
189
- $buildFolder = "build/$variant/$buildKit"
190
- # fresh and clean build
191
- if ($clean) {
192
- if (Test-Path -Path $buildFolder) {
193
- Write-Output "Removing build folder '$buildFolder' ..."
194
- Remove-Item $buildFolder -Force -Recurse
195
- }
196
- }
145
+ # delete CMake cache and reconfigure
146
+ if ($reconfigure -or $configureOnly) {
147
+ Remove-Path "$buildFolder\CMakeCache.txt"
148
+ Remove-Path "$buildFolder\CMakeFiles"
149
+ }
197
150
 
198
- # delete CMake cache and reconfigure
199
- if ($reconfigure) {
200
- if (Test-Path -Path "$buildFolder/CMakeCache.txt") {
201
- Remove-Item "$buildFolder/CMakeCache.txt" -Force
202
- }
203
- if (Test-Path -Path "$buildFolder/CMakeFiles") {
204
- Remove-Item "$buildFolder/CMakeFiles" -Force -Recurse
205
- }
206
- }
151
+ if ($build) {
152
+ Write-Output "Building target '$target' with build kit '$buildKit' and build type '$buildType' for variant '$variant' ..."
207
153
 
208
154
  # CMake configure
209
155
  $additionalConfig = "-DBUILD_KIT='$buildKit'"
156
+ $additionalConfig += " -DBUILD_TYPE='$buildType'"
210
157
  if ($buildKit -eq "test") {
211
158
  $additionalConfig += " -DCMAKE_TOOLCHAIN_FILE='tools/toolchains/gcc/toolchain.cmake'"
212
159
  }
213
- Invoke-CommandLine -CommandLine ".venv\Scripts\pipenv run cmake -B '$buildFolder' -G Ninja -DVARIANT='$variant' $additionalConfig"
214
160
 
215
- # CMake clean all dead artifacts. Required when running incremented builds to delete obsolete artifacts.
216
- Invoke-CommandLine -CommandLine ".venv\Scripts\pipenv run cmake --build '$buildFolder' --target $target -- -t cleandead"
217
- # CMake build
218
- Invoke-CommandLine -CommandLine ".venv\Scripts\pipenv run cmake --build '$buildFolder' --target $target -- $ninjaArgs"
161
+ Invoke-CommandLine -CommandLine "cmake -B '$buildFolder' -G Ninja -DVARIANT='$variant' $additionalConfig"
162
+
163
+ if (-Not $configureOnly) {
164
+ $cmd = "cmake --build '$buildFolder' --config '$buildType' --target $target"
165
+
166
+ # CMake clean all dead artifacts. Required when running incremented builds to delete obsolete artifacts.
167
+ Invoke-CommandLine -CommandLine "$cmd -- -t cleandead"
168
+ # CMake build
169
+ Invoke-CommandLine -CommandLine "$cmd -- $ninjaArgs"
170
+ }
219
171
  }
220
172
  }
221
173
  }
222
174
 
175
+ function Invoke-Self-Tests {
176
+ param (
177
+ [Parameter(Mandatory = $false)]
178
+ [bool]$clean = $false,
179
+ [Parameter(Mandatory = $false)]
180
+ [string]$filter = "",
181
+ [Parameter(Mandatory = $false)]
182
+ [string]$marker = ""
183
+ )
184
+
185
+ # Run python tests to test all relevant variants and platforms (build kits)
186
+ # (normally run in CI environment/Jenkins)
187
+ Write-Output "Running all self tests ..."
188
+
189
+ if ($clean) {
190
+ # Remove all build outputs in one step, this will remove obsolete variants, too.
191
+ Remove-Path "build"
192
+ }
193
+
194
+ # Test result of pytest
195
+ $pytestJunitXml = "test/output/test-report.xml"
196
+
197
+ # Delete any old pytest result
198
+ Remove-Path $pytestJunitXml
199
+
200
+ $pytestArgs = @(
201
+ "--junitxml=$pytestJunitXml"
202
+ )
203
+
204
+ # Filter pytest test cases
205
+ $releaseBranchFilter = Get-ReleaseBranchPytestFilter
206
+ if ($releaseBranchFilter) {
207
+ $pytestArgs += "-k '$releaseBranchFilter'"
208
+ }
209
+ # otherwise consider command line option '-filter' if given
210
+ elseif ($filter) {
211
+ $pytestArgs += "-k '$filter'"
212
+ }
213
+
214
+ # Execute marker tests
215
+ if ($marker) {
216
+ $pytestArgs += "-m '$marker'"
217
+ }
218
+
219
+ # Finally run pytest and ignore return value. Content of test-report.xml will be evaluated by CI system.
220
+ $commandLine = "pytest " + ($pytestArgs -join " ")
221
+ Invoke-CommandLine -CommandLine $commandLine -StopAtError $false
222
+ }
223
+
224
+ function Remove-Path {
225
+ param (
226
+ [Parameter(Mandatory = $true, Position = 0)]
227
+ [string]$path
228
+ )
229
+ if (Test-Path -Path $path -PathType Container) {
230
+ Write-Output "Deleting directory '$path' ..."
231
+ Remove-Item $path -Force -Recurse
232
+ }
233
+ elseif (Test-Path -Path $path -PathType Leaf) {
234
+ Write-Output "Deleting file '$path' ..."
235
+ Remove-Item $path -Force
236
+ }
237
+ }
238
+
239
+ function New-Directory {
240
+ param (
241
+ [Parameter(Mandatory = $true, Position = 0)]
242
+ [string]$dir
243
+ )
244
+ if (-Not (Test-Path -Path $dir)) {
245
+ Write-Output "Creating directory '$dir' ..."
246
+ New-Item -ItemType Directory $dir
247
+ }
248
+ }
249
+
250
+ function Get-User-Menu-Selection {
251
+ Clear-Host
252
+ Write-Information -Tags "Info:" -MessageData "None of the following command line options was given:"
253
+ Write-Information -Tags "Info:" -MessageData ("(1) -install: installation of mandatory dependencies")
254
+ Write-Information -Tags "Info:" -MessageData ("(2) -installOptional: installation of optional dependencies")
255
+ Write-Information -Tags "Info:" -MessageData ("(3) -installVSCode: installation of Visual Studio Code")
256
+ Write-Information -Tags "Info:" -MessageData ("(4) -build: execute CMake build")
257
+ Write-Information -Tags "Info:" -MessageData ("(5) -startVSCode: start Visual Studio Code")
258
+ Write-Information -Tags "Info:" -MessageData ("(6) quit: exit script")
259
+ return(Read-Host "Please make a selection")
260
+ }
261
+
223
262
  function Invoke-Bootstrap {
224
263
  # Download bootstrap scripts from external repository
225
264
  Invoke-RestMethod -Uri https://raw.githubusercontent.com/avengineers/bootstrap-installer/v1.17.0/install.ps1 | Invoke-Expression
226
265
  # Execute bootstrap script
227
266
  . .\.bootstrap\bootstrap.ps1
228
- # For incremental build: clean up virtual environment from old dependencies
229
- Invoke-CommandLine ".venv\Scripts\pipenv clean"
230
267
  }
231
268
 
232
269
  ## start of script
@@ -241,30 +278,96 @@ Push-Location $PSScriptRoot
241
278
  Write-Output "Running in ${pwd}"
242
279
 
243
280
  try {
244
- if (Test-RunningInCIorTestEnvironment -or $Env:USER_PATH_FIRST) {
245
- Initialize-EnvPath
281
+ if ((-Not $install) -and (-Not $installOptional) -and (-Not $installVSCode) -and (-Not $build) -and (-Not $startVSCode) -and (-Not $command) -and (-Not $selftests)) {
282
+ $selectedOption = Get-User-Menu-Selection
283
+
284
+ switch ($selectedOption) {
285
+ '1' {
286
+ Write-Information -Tags "Info:" -MessageData "Installing mandatory dependencies ..."
287
+ $install = $true
288
+ }
289
+ '2' {
290
+ Write-Information -Tags "Info:" -MessageData "Installing optional dependencies ..."
291
+ $installOptional = $true
292
+ }
293
+ '3' {
294
+ Write-Information -Tags "Info:" -MessageData "Installing Visual Studio Code ..."
295
+ $installVSCode = $true
296
+ }
297
+ '4' {
298
+ Write-Information -Tags "Info:" -MessageData "Building ..."
299
+ $build = $true
300
+ }
301
+ '5' {
302
+ Write-Information -Tags "Info:" -MessageData "Starting VS Code ..."
303
+ $startVSCode = $true
304
+ }
305
+ default {
306
+ Write-Information -Tags "Info:" -MessageData "Nothing selected."
307
+ exit
308
+ }
309
+ }
246
310
  }
247
311
 
248
312
  if ($install) {
313
+ if ($clean) {
314
+ Remove-Path ".venv"
315
+ }
316
+
249
317
  # bootstrap environment
250
318
  Invoke-Bootstrap
319
+
320
+ Write-Host -ForegroundColor Black -BackgroundColor Blue "For installation changes to take effect, please close and re-open your current terminal."
321
+ }
322
+
323
+ # Load bootstrap's utility functions
324
+ . .\.bootstrap\utils.ps1
325
+
326
+ Invoke-CommandLine ".venv\Scripts\pypeline run --step GenerateEnvSetupScript"
327
+
328
+ # Load environment setup script
329
+ . .\build\env_setup.ps1
330
+
331
+ if ($installOptional) {
332
+ Import-ScoopFile "scoopfile-optional.json"
333
+ }
334
+
335
+ if ($installVSCode) {
336
+ Invoke-CommandLine "scoop bucket add extras" -StopAtError $false
337
+ Invoke-CommandLine "scoop install vscode"
338
+ Invoke-CommandLine "scoop update vscode" -StopAtError $false
339
+ }
340
+
341
+ if ($startVSCode) {
342
+ Write-Output "Starting Visual Studio Code..."
343
+ Invoke-CommandLine "code ." -StopAtError $false
251
344
  }
252
345
 
253
346
  if ($build) {
254
- # Call build system
255
- Invoke-Build `
347
+ # Call build system to build variant(s)
348
+ Invoke-Build-System `
349
+ -clean $clean `
350
+ -build $build `
256
351
  -target $target `
257
352
  -buildKit $buildKit `
353
+ -buildType $buildType `
258
354
  -variants $variants `
259
- -clean $clean `
260
355
  -reconfigure $reconfigure `
261
- -ninjaArgs $ninjaArgs `
262
- -filter $filter
356
+ -configureOnly $configureOnly `
357
+ -ninjaArgs $ninjaArgs
358
+ }
359
+
360
+ if ($selftests) {
361
+ Invoke-Self-Tests -clean $clean -filter $filter -marker $marker
362
+ }
363
+
364
+ if ($command -ne '') {
365
+ Invoke-Expression "$command"
263
366
  }
264
367
  }
265
368
  finally {
266
369
  Pop-Location
267
- if (-Not (Test-RunningInCIorTestEnvironment)) {
370
+ if (-Not (Test-RunningInCIorTestEnvironment) -and $waitForKey) {
268
371
  Read-Host -Prompt "Press Enter to continue ..."
269
372
  }
270
373
  }
@@ -1,8 +1,9 @@
1
- """ Configuration """
1
+ # -*- coding: utf-8 -*-
2
+ """Configuration"""
2
3
 
3
- import datetime
4
4
  import json
5
5
  import os
6
+ import datetime
6
7
  import re
7
8
 
8
9
  day = datetime.date.today()
@@ -43,12 +44,12 @@ html_title = f"{project} {release}"
43
44
 
44
45
  html_theme = "sphinx_rtd_theme"
45
46
 
46
- # Hide hyper link which leeds to the source of page displayed
47
+ # Show hyper link which leeds to the source of page displayed
47
48
  html_show_sourcelink = True
48
49
 
49
50
  html_theme_options = {
50
51
  "canonical_url": "",
51
- "analytics_id": "", # Provided by Google in your dashboard
52
+ "analytics_id": "", # Provided by Google in your dashboard
52
53
  "display_version": True,
53
54
  "prev_next_buttons_location": "bottom",
54
55
  "style_external_links": True,
@@ -70,13 +71,10 @@ extensions = []
70
71
  extensions.append("sphinx_rtd_size")
71
72
  sphinx_rtd_size_width = "90%"
72
73
 
73
- # mermaid config - @see https://pypi.org/project/sphinxcontrib-mermaid/ #####
74
74
  extensions.append("sphinxcontrib.mermaid")
75
75
 
76
- # sphinx_needs ###############################################################
77
76
  extensions.append("sphinx_needs")
78
77
 
79
- # test_reports ###############################################################
80
78
  extensions.append("sphinxcontrib.test_reports")
81
79
  tr_report_template = "doc/test_report_template.txt"
82
80
 
@@ -143,14 +141,14 @@ needs_types = [
143
141
  ),
144
142
  ]
145
143
 
146
-
147
144
  # Define own options
148
- needs_extra_options = ["integrity", "assignee", "version"]
149
-
145
+ needs_extra_options = ["integrity"]
150
146
 
151
147
  # Define own link types
152
148
  needs_extra_links = [
153
149
  # SWE.3 BP.5: link from Implementation (Software unit) to Specification (Software detailed design)
150
+ # AND
151
+ # SWE.2 BP.7: link from Requirements (Software Requirement) to Architecture (Software Architecture)
154
152
  {"option": "implements", "incoming": "is implemented by", "outgoing": "implements"},
155
153
  # SWE.4 BP.5: link from Test Case (Unit test specification) to Specification (Software detailed design)
156
154
  {"option": "tests", "incoming": "is tested by", "outgoing": "tests"},
@@ -169,19 +167,20 @@ html_context = {
169
167
  "config": {},
170
168
  }
171
169
 
172
- # Check if the SPHINX_BUILD_CONFIGURATION_FILE environment variable exists
173
- # and if so, load the JSON file and set the 'html_context' variable
170
+ # pass build configuration to jinja
174
171
  if "SPHINX_BUILD_CONFIGURATION_FILE" in os.environ:
175
- with open(os.environ["SPHINX_BUILD_CONFIGURATION_FILE"]) as file:
172
+ with open(os.environ["SPHINX_BUILD_CONFIGURATION_FILE"], "r") as file:
176
173
  html_context["build_config"] = json.load(file)
177
- include_patterns.extend(html_context["build_config"].get("include_patterns", []))
174
+ include_patterns.extend(
175
+ html_context["build_config"].get("include_patterns", [])
176
+ )
178
177
 
179
- # Check if the SPHINX_BUILD_CONFIGURATION_FILE environment variable exists
180
- # and if so, load the JSON file and set the 'html_context' variable
178
+ # pass feature configuration to jinja
181
179
  if "AUTOCONF_JSON_FILE" in os.environ:
182
- with open(os.environ["AUTOCONF_JSON_FILE"]) as file:
180
+ with open(os.environ["AUTOCONF_JSON_FILE"], "r") as file:
183
181
  html_context["config"] = json.load(file)["features"]
184
182
 
183
+ # we almost forgot the variant :o)
185
184
  if "VARIANT" in os.environ:
186
185
  html_context["build_config"]["variant"] = os.environ["VARIANT"]
187
186
 
@@ -0,0 +1,9 @@
1
+ pipeline:
2
+ - step: CreateVEnv
3
+ module: pypeline.steps.create_venv
4
+ config:
5
+ bootstrap_script: .bootstrap/bootstrap.py
6
+ - step: ScoopInstall
7
+ module: pypeline.steps.scoop_install
8
+ - step: GenerateEnvSetupScript
9
+ module: pypeline.steps.env_setup_script
@@ -0,0 +1,18 @@
1
+ [project]
2
+ name = "spled"
3
+ version = "0.0.1"
4
+ description = "SPL demo project"
5
+ authors = [
6
+ {name = "Avengineers"},
7
+ ]
8
+ requires-python = "<3.12,>=3.10"
9
+
10
+ dependencies = [
11
+ "spl-core>=7,<8",
12
+ "pypeline-runner>=1,<2",
13
+ "pytest>=8,<9",
14
+ "pip_system_certs>=4.0,<5",
15
+ ]
16
+
17
+ [tool.poetry]
18
+ package-mode = false
@@ -1,10 +1,15 @@
1
1
  [pytest]
2
2
  pythonpath =
3
- test
3
+ "test"
4
4
  testpaths =
5
- test
5
+ "test"
6
6
  junit_logging = all
7
7
  addopts =
8
- -vv
9
8
  --capture=tee-sys
10
- --junitxml=build/test-report.xml
9
+ --verbose
10
+ markers =
11
+ just_a_try: mark a test as a try
12
+ unittests: tests of individual units of code
13
+ reports: tests of the report generation
14
+ build: tests of the target builds
15
+ static_analysis: tests of static code analysis
@@ -1,14 +1,23 @@
1
1
  {
2
- "buckets": [
3
- {
4
- "Name": "versions",
5
- "Source": "https://github.com/ScoopInstaller/Versions"
6
- }
7
- ],
8
- "apps": [
9
- {
10
- "Source": "versions",
11
- "Name": "mingw-winlibs-llvm-ucrt"
12
- }
13
- ]
2
+ "buckets": [
3
+ {
4
+ "Name": "spl",
5
+ "Source": "https://github.com/avengineers/spl-bucket"
6
+ },
7
+ {
8
+ "Name": "main",
9
+ "Source": "https://github.com/ScoopInstaller/Main"
10
+ }
11
+ ],
12
+ "apps": [
13
+ {
14
+ "Source": "main",
15
+ "Name": "graphviz"
16
+ },
17
+ {
18
+ "Source": "spl",
19
+ "Name": "mingw-winlibs-llvm-ucrt",
20
+ "Version": "14.2.0-19.1.1-12.0.0-r2"
21
+ }
22
+ ]
14
23
  }
@@ -1,8 +1,3 @@
1
- # TODO: caching required due to cmake tools extension issue: https://github.com/microsoft/vscode-cmake-tools/issues/1188
2
- # TODO: get debugging running (lldb-mi not found in any current package, switching back to gcc)
3
1
  set(CMAKE_C_COMPILER clang CACHE STRING "C Compiler")
4
- # TODO: clarify why llvm-cov produces invalid gcov files (contain blank lines), related GCOVR issue: https://github.com/gcovr/gcovr/issues/331
5
- set(GCOVR_ADDITIONAL_OPTIONS --gcov-executable \"llvm-cov gcov\" --gcov-ignore-parse-errors --html-title \"Code Coverage Report \(tool suite: LLVM Clang\)\")
6
-
7
2
  set(CMAKE_CXX_COMPILER clang++ CACHE STRING "CXX Compiler")
8
3
  set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} CACHE STRING "ASM Compiler")