spadix-cli 0.7.5__tar.gz → 0.7.6__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.
- {spadix_cli-0.7.5/spadix_cli.egg-info → spadix_cli-0.7.6}/PKG-INFO +7 -4
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/README.md +6 -3
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/setup.py +1 -1
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/spadix_cli/__init__.py +19 -8
- {spadix_cli-0.7.5 → spadix_cli-0.7.6/spadix_cli.egg-info}/PKG-INFO +7 -4
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/test/test_units.py +35 -18
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/LICENSE +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/pyproject.toml +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/setup.cfg +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/spadix_cli/__main__.py +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/spadix_cli.egg-info/SOURCES.txt +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/spadix_cli.egg-info/dependency_links.txt +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/spadix_cli.egg-info/entry_points.txt +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/spadix_cli.egg-info/requires.txt +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/spadix_cli.egg-info/top_level.txt +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/test/test_copyright.py +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/test/test_flake8.py +0 -0
- {spadix_cli-0.7.5 → spadix_cli-0.7.6}/test/test_pep257.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spadix-cli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.6
|
|
4
4
|
Summary: A friendly wrapper for colcon
|
|
5
5
|
Home-page: https://pronto.ai
|
|
6
6
|
Author: Serge Nikulin
|
|
@@ -34,6 +34,7 @@ Dynamic: summary
|
|
|
34
34
|
# Spadix, a friendly wrapper for `colcon`
|
|
35
35
|
|
|
36
36
|
Copyright (C) 2021-2024 SafeAI
|
|
37
|
+
|
|
37
38
|
Copyright (C) 2025 Pronto.AI
|
|
38
39
|
|
|
39
40
|
## Why?
|
|
@@ -64,9 +65,11 @@ Usage:
|
|
|
64
65
|
spadix [Global options] [command] [command options] ...
|
|
65
66
|
|
|
66
67
|
[Global options]
|
|
67
|
-
--no-merge :
|
|
68
|
-
--no-console :
|
|
69
|
-
--no-root-check :
|
|
68
|
+
--no-merge : Do not use --merge-install option for colcon
|
|
69
|
+
--no-console : Do not use the default console mode: `--event-handlers console_cohesion+`
|
|
70
|
+
--no-root-check : Do not check that spadix being started from the root of a git project
|
|
71
|
+
--ninja : Use Ninja for building when available
|
|
72
|
+
--non-ninja : Do not use Ninja for building, even if it is available
|
|
70
73
|
|
|
71
74
|
Commands:
|
|
72
75
|
clean :Clean all projects (essentially executes `rm -rf log install build`)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Spadix, a friendly wrapper for `colcon`
|
|
2
2
|
|
|
3
3
|
Copyright (C) 2021-2024 SafeAI
|
|
4
|
+
|
|
4
5
|
Copyright (C) 2025 Pronto.AI
|
|
5
6
|
|
|
6
7
|
## Why?
|
|
@@ -31,9 +32,11 @@ Usage:
|
|
|
31
32
|
spadix [Global options] [command] [command options] ...
|
|
32
33
|
|
|
33
34
|
[Global options]
|
|
34
|
-
--no-merge :
|
|
35
|
-
--no-console :
|
|
36
|
-
--no-root-check :
|
|
35
|
+
--no-merge : Do not use --merge-install option for colcon
|
|
36
|
+
--no-console : Do not use the default console mode: `--event-handlers console_cohesion+`
|
|
37
|
+
--no-root-check : Do not check that spadix being started from the root of a git project
|
|
38
|
+
--ninja : Use Ninja for building when available
|
|
39
|
+
--non-ninja : Do not use Ninja for building, even if it is available
|
|
37
40
|
|
|
38
41
|
Commands:
|
|
39
42
|
clean :Clean all projects (essentially executes `rm -rf log install build`)
|
|
@@ -27,7 +27,7 @@ from sys import stderr
|
|
|
27
27
|
|
|
28
28
|
from lark import Lark, Transformer, v_args
|
|
29
29
|
|
|
30
|
-
__version__ = '0.7.
|
|
30
|
+
__version__ = '0.7.6'
|
|
31
31
|
|
|
32
32
|
###############################################################################
|
|
33
33
|
USAGE = """
|
|
@@ -40,10 +40,11 @@ spadix [Global options] [command] [command options] ...
|
|
|
40
40
|
|
|
41
41
|
[Global options]
|
|
42
42
|
--version : Print spadix\' version and exit`
|
|
43
|
-
--no-console : Don't use the default console mode: `--event-handlers
|
|
43
|
+
--no-console : Don't use the default console mode: `--event-handlers console_cohesion+`
|
|
44
44
|
--no-root-check : Don't check that spadix being started from the root of a git project
|
|
45
45
|
--dry-run : Don't run `colcon` command, instead print the command line and exit
|
|
46
46
|
--ninja : Use Ninja during the build. Ignored if it's not a build
|
|
47
|
+
--non-ninja : Do not use Ninja (overrides default on non-Windows)
|
|
47
48
|
|
|
48
49
|
Commands:
|
|
49
50
|
clean :Clean all packages (`rm -rf log install build`)
|
|
@@ -248,7 +249,7 @@ class command_line_parser:
|
|
|
248
249
|
self.dry_run = False
|
|
249
250
|
self.is_test = False
|
|
250
251
|
self.is_parallel_overridden = False
|
|
251
|
-
self.use_ninja =
|
|
252
|
+
self.use_ninja = not is_windows()
|
|
252
253
|
|
|
253
254
|
###########################################################################
|
|
254
255
|
# Extract global options form the provided arguments
|
|
@@ -268,6 +269,8 @@ class command_line_parser:
|
|
|
268
269
|
self.dry_run = True
|
|
269
270
|
elif arg == '--ninja':
|
|
270
271
|
self.use_ninja = True
|
|
272
|
+
elif arg == '--non-ninja':
|
|
273
|
+
self.use_ninja = False
|
|
271
274
|
else:
|
|
272
275
|
self.cmd_line.append(arg)
|
|
273
276
|
else:
|
|
@@ -279,7 +282,7 @@ class command_line_parser:
|
|
|
279
282
|
self.cmd_line.append('--merge-install')
|
|
280
283
|
if not self.no_console:
|
|
281
284
|
self.cmd_line.append('--event-handlers')
|
|
282
|
-
self.cmd_line.append('
|
|
285
|
+
self.cmd_line.append('console_cohesion+')
|
|
283
286
|
|
|
284
287
|
###########################################################################
|
|
285
288
|
def parse_package_list(self, list_string):
|
|
@@ -315,6 +318,7 @@ class command_line_parser:
|
|
|
315
318
|
if self.use_ninja:
|
|
316
319
|
cmake_args.append(" -GNinja")
|
|
317
320
|
|
|
321
|
+
user_set_cmake_build_type = False
|
|
318
322
|
is_debug = False
|
|
319
323
|
if is_windows():
|
|
320
324
|
is_debug = True
|
|
@@ -333,6 +337,11 @@ class command_line_parser:
|
|
|
333
337
|
elif arg == '--cmake-args':
|
|
334
338
|
expect_cmake_args = True
|
|
335
339
|
continue
|
|
340
|
+
elif arg.startswith('-D'):
|
|
341
|
+
cmake_args.append(' ' + arg)
|
|
342
|
+
if 'CMAKE_BUILD_TYPE' in arg:
|
|
343
|
+
user_set_cmake_build_type = True
|
|
344
|
+
continue
|
|
336
345
|
elif arg == '--build-base':
|
|
337
346
|
self.cmd_line.append(arg)
|
|
338
347
|
expect_BUILD_BASE = True
|
|
@@ -530,10 +539,12 @@ class command_line_parser:
|
|
|
530
539
|
self.cmd_line.append(arg)
|
|
531
540
|
|
|
532
541
|
if self.is_build:
|
|
533
|
-
if
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
542
|
+
if not user_set_cmake_build_type and not any(
|
|
543
|
+
'CMAKE_BUILD_TYPE' in a for a in cmake_args):
|
|
544
|
+
if is_debug:
|
|
545
|
+
cmake_args.append(' -DCMAKE_BUILD_TYPE=Debug')
|
|
546
|
+
else:
|
|
547
|
+
cmake_args.append(' -DCMAKE_BUILD_TYPE=RelWithDebInfo')
|
|
537
548
|
|
|
538
549
|
if len(cmake_args) > 1:
|
|
539
550
|
self.cmd_line.extend(cmake_args)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spadix-cli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.6
|
|
4
4
|
Summary: A friendly wrapper for colcon
|
|
5
5
|
Home-page: https://pronto.ai
|
|
6
6
|
Author: Serge Nikulin
|
|
@@ -34,6 +34,7 @@ Dynamic: summary
|
|
|
34
34
|
# Spadix, a friendly wrapper for `colcon`
|
|
35
35
|
|
|
36
36
|
Copyright (C) 2021-2024 SafeAI
|
|
37
|
+
|
|
37
38
|
Copyright (C) 2025 Pronto.AI
|
|
38
39
|
|
|
39
40
|
## Why?
|
|
@@ -64,9 +65,11 @@ Usage:
|
|
|
64
65
|
spadix [Global options] [command] [command options] ...
|
|
65
66
|
|
|
66
67
|
[Global options]
|
|
67
|
-
--no-merge :
|
|
68
|
-
--no-console :
|
|
69
|
-
--no-root-check :
|
|
68
|
+
--no-merge : Do not use --merge-install option for colcon
|
|
69
|
+
--no-console : Do not use the default console mode: `--event-handlers console_cohesion+`
|
|
70
|
+
--no-root-check : Do not check that spadix being started from the root of a git project
|
|
71
|
+
--ninja : Use Ninja for building when available
|
|
72
|
+
--non-ninja : Do not use Ninja for building, even if it is available
|
|
70
73
|
|
|
71
74
|
Commands:
|
|
72
75
|
clean :Clean all projects (essentially executes `rm -rf log install build`)
|
|
@@ -93,9 +93,18 @@ def test_get_global_options():
|
|
|
93
93
|
clp = spadix_cli.command_line_parser()
|
|
94
94
|
tst.expect_False(clp.no_console)
|
|
95
95
|
tst.expect_False(clp.no_root_check)
|
|
96
|
+
tst.expect_eq(clp.use_ninja, not spadix_cli.is_windows())
|
|
96
97
|
tst.expect_eq(clp.cmd_line, ['colcon'])
|
|
97
98
|
tst.expect_eq(clp.arg_idx, 0)
|
|
98
99
|
|
|
100
|
+
clp = spadix_cli.command_line_parser()
|
|
101
|
+
clp.parse_global_options(['--ninja'])
|
|
102
|
+
tst.expect_True(clp.use_ninja)
|
|
103
|
+
|
|
104
|
+
clp = spadix_cli.command_line_parser()
|
|
105
|
+
clp.parse_global_options(['--non-ninja'])
|
|
106
|
+
tst.expect_False(clp.use_ninja)
|
|
107
|
+
|
|
99
108
|
clp = spadix_cli.command_line_parser()
|
|
100
109
|
clp.parse_global_options(None)
|
|
101
110
|
tst.expect_False(clp.no_console)
|
|
@@ -246,13 +255,14 @@ def test_parse_command():
|
|
|
246
255
|
release_specifier = ' -DCMAKE_BUILD_TYPE=RelWithDebInfo'
|
|
247
256
|
if (platform.system() == 'Windows'):
|
|
248
257
|
release_specifier = ' -DCMAKE_BUILD_TYPE=Debug'
|
|
258
|
+
ninja_cmake_arg = [' -GNinja'] if not spadix_cli.is_windows() else []
|
|
249
259
|
|
|
250
260
|
clp = spadix_cli.command_line_parser()
|
|
251
261
|
clp.parse_command(['build'])
|
|
252
262
|
tst.expect_eq(clp.arg_idx, 1)
|
|
253
263
|
tst.expect_eq(clp.retval, 0)
|
|
254
|
-
test_cmd_line = ['colcon', 'build', '--event-handlers', '
|
|
255
|
-
'--cmake-args'
|
|
264
|
+
test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
|
|
265
|
+
'--cmake-args'] + ninja_cmake_arg + [release_specifier]
|
|
256
266
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
257
267
|
test_cmd_line.insert(2, '--merge-install')
|
|
258
268
|
tst.expect_eq(clp.cmd_line, test_cmd_line)
|
|
@@ -267,9 +277,9 @@ def test_parse_command():
|
|
|
267
277
|
clp.parse_command(['build:1'])
|
|
268
278
|
tst.expect_eq(clp.arg_idx, 1)
|
|
269
279
|
tst.expect_eq(clp.retval, 0)
|
|
270
|
-
test_cmd_line = ['colcon', 'build', '--event-handlers', '
|
|
280
|
+
test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
|
|
271
281
|
'--packages-select', '1',
|
|
272
|
-
'--cmake-args'
|
|
282
|
+
'--cmake-args'] + ninja_cmake_arg + [release_specifier]
|
|
273
283
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
274
284
|
test_cmd_line.insert(2, '--merge-install')
|
|
275
285
|
tst.expect_eq(clp.cmd_line, test_cmd_line)
|
|
@@ -278,12 +288,12 @@ def test_parse_command():
|
|
|
278
288
|
clp.parse_command(['build:1.ne.2.eq.3.lt.4.le.5.ge.6.gt.7'])
|
|
279
289
|
tst.expect_eq(clp.arg_idx, 1)
|
|
280
290
|
tst.expect_eq(clp.retval, 0)
|
|
281
|
-
test_cmd_line = ['colcon', 'build', '--event-handlers', '
|
|
291
|
+
test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
|
|
282
292
|
'--packages-select', '1', '3',
|
|
283
293
|
'--packages-skip', '2', '4', '7',
|
|
284
294
|
'--packages-up-to', '4', '5',
|
|
285
295
|
'--packages-above', '6', '7',
|
|
286
|
-
'--cmake-args'
|
|
296
|
+
'--cmake-args'] + ninja_cmake_arg + [release_specifier]
|
|
287
297
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
288
298
|
test_cmd_line.insert(2, '--merge-install')
|
|
289
299
|
tst.expect_eq(clp.cmd_line, test_cmd_line)
|
|
@@ -291,8 +301,8 @@ def test_parse_command():
|
|
|
291
301
|
clp = spadix_cli.command_line_parser()
|
|
292
302
|
clp.parse_command(['build', '--release'])
|
|
293
303
|
tst.expect_eq(clp.retval, 0)
|
|
294
|
-
test_cmd_line = ['colcon', 'build', '--event-handlers', '
|
|
295
|
-
'--cmake-args'
|
|
304
|
+
test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
|
|
305
|
+
'--cmake-args'] + ninja_cmake_arg + [' -DCMAKE_BUILD_TYPE=RelWithDebInfo']
|
|
296
306
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
297
307
|
test_cmd_line.insert(2, '--merge-install')
|
|
298
308
|
tst.expect_eq(clp.cmd_line, test_cmd_line)
|
|
@@ -300,12 +310,19 @@ def test_parse_command():
|
|
|
300
310
|
clp = spadix_cli.command_line_parser()
|
|
301
311
|
clp.parse_command(['build', '--debug'])
|
|
302
312
|
tst.expect_eq(clp.retval, 0)
|
|
303
|
-
test_cmd_line = ['colcon', 'build', '--event-handlers', '
|
|
304
|
-
'--cmake-args'
|
|
313
|
+
test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
|
|
314
|
+
'--cmake-args'] + ninja_cmake_arg + [' -DCMAKE_BUILD_TYPE=Debug']
|
|
305
315
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
306
316
|
test_cmd_line.insert(2, '--merge-install')
|
|
307
317
|
tst.expect_eq(clp.cmd_line, test_cmd_line)
|
|
308
318
|
|
|
319
|
+
# --non-ninja overrides default on non-Windows
|
|
320
|
+
clp = spadix_cli.command_line_parser()
|
|
321
|
+
clp.parse_global_options(['--non-ninja', 'build'])
|
|
322
|
+
clp.parse_command(['--non-ninja', 'build'])
|
|
323
|
+
tst.expect_eq(clp.retval, 0)
|
|
324
|
+
tst.expect_False(' -GNinja' in clp.cmd_line)
|
|
325
|
+
|
|
309
326
|
tst.expect_False('SAFEAI_FIF_DISABLED' in os.environ)
|
|
310
327
|
clp = spadix_cli.command_line_parser()
|
|
311
328
|
clp.parse_command(['build', '--no-fif'])
|
|
@@ -322,7 +339,7 @@ def test_parse_command():
|
|
|
322
339
|
test_cmd_line = ['colcon',
|
|
323
340
|
'test',
|
|
324
341
|
'--event-handlers',
|
|
325
|
-
'
|
|
342
|
+
'console_cohesion+',
|
|
326
343
|
'--parallel-workers',
|
|
327
344
|
'1']
|
|
328
345
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
@@ -336,7 +353,7 @@ def test_parse_command():
|
|
|
336
353
|
test_cmd_line = ['colcon',
|
|
337
354
|
'test',
|
|
338
355
|
'--event-handlers',
|
|
339
|
-
'
|
|
356
|
+
'console_cohesion+',
|
|
340
357
|
'--executor',
|
|
341
358
|
'parallel']
|
|
342
359
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
@@ -350,7 +367,7 @@ def test_parse_command():
|
|
|
350
367
|
test_cmd_line = ['colcon',
|
|
351
368
|
'test',
|
|
352
369
|
'--event-handlers',
|
|
353
|
-
'
|
|
370
|
+
'console_cohesion+',
|
|
354
371
|
'--parallel-workers',
|
|
355
372
|
'5']
|
|
356
373
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
@@ -370,7 +387,7 @@ def test_parse_command():
|
|
|
370
387
|
test_cmd_line = ['colcon',
|
|
371
388
|
'test',
|
|
372
389
|
'--event-handlers',
|
|
373
|
-
'
|
|
390
|
+
'console_cohesion+',
|
|
374
391
|
'--packages-select',
|
|
375
392
|
'1',
|
|
376
393
|
'--parallel-workers',
|
|
@@ -383,7 +400,7 @@ def test_parse_command():
|
|
|
383
400
|
clp.parse_command(['test:2,3,1'])
|
|
384
401
|
tst.expect_eq(clp.arg_idx, 1)
|
|
385
402
|
tst.expect_eq(clp.retval, 0)
|
|
386
|
-
test_cmd_line = ['colcon', 'test', '--event-handlers', '
|
|
403
|
+
test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_cohesion+',
|
|
387
404
|
'--packages-select', '2', '3', '1',
|
|
388
405
|
'--parallel-workers', '1']
|
|
389
406
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
@@ -394,7 +411,7 @@ def test_parse_command():
|
|
|
394
411
|
clp.parse_command(['test::test'])
|
|
395
412
|
tst.expect_eq(clp.arg_idx, 1)
|
|
396
413
|
tst.expect_eq(clp.retval, 0)
|
|
397
|
-
test_cmd_line = ['colcon', 'test', '--event-handlers', '
|
|
414
|
+
test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_cohesion+',
|
|
398
415
|
'--ctest-args', '-R', 'test',
|
|
399
416
|
'--parallel-workers', '1']
|
|
400
417
|
if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
|
|
@@ -405,7 +422,7 @@ def test_parse_command():
|
|
|
405
422
|
clp.parse_command(['test:1:test'])
|
|
406
423
|
tst.expect_eq(clp.arg_idx, 1)
|
|
407
424
|
tst.expect_eq(clp.retval, 0)
|
|
408
|
-
test_cmd_line = ['colcon', 'test', '--event-handlers', '
|
|
425
|
+
test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_cohesion+',
|
|
409
426
|
'--packages-select', '1',
|
|
410
427
|
'--ctest-args', '-R', 'test',
|
|
411
428
|
'--parallel-workers', '1']
|
|
@@ -417,7 +434,7 @@ def test_parse_command():
|
|
|
417
434
|
clp.parse_command(['test:1.ne.2.eq.3.lt.4.le.5.ge.6.gt.7:test'])
|
|
418
435
|
tst.expect_eq(clp.arg_idx, 1)
|
|
419
436
|
tst.expect_eq(clp.retval, 0)
|
|
420
|
-
test_cmd_line = ['colcon', 'test', '--event-handlers', '
|
|
437
|
+
test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_cohesion+',
|
|
421
438
|
'--packages-select', '1', '3',
|
|
422
439
|
'--packages-skip', '2', '4', '7',
|
|
423
440
|
'--packages-up-to', '4', '5',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|