Skip to content
This repository was archived by the owner on Jun 22, 2026. It is now read-only.

Commit 0fad644

Browse files
authored
Merge pull request #3 from masonlet/bug-fix/config-defaults
Bug fix/config defaults
2 parents af5f653 + 47792a4 commit 0fad644

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "starlet-setup"
7-
version = "1.1.0"
7+
version = "1.1.1"
88
description = "Quick setup for CMake projects"
99
readme = "README.md"
1010
requires-python = ">=3.6"

src/starlet_setup/cli.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ def _add_common_args(
1313
parser.add_argument(
1414
'--ssh',
1515
action='store_true',
16-
default=get_config_value(config, 'defaults.ssh', False),
16+
default=get_config_value(config, 'configs.default.ssh', False),
1717
help='Use SSH instead of HTTPS for cloning'
1818
)
1919
parser.add_argument(
2020
'-v', '--verbose',
2121
action='store_true',
22-
default=get_config_value(config, 'defaults.verbose', False),
22+
default=get_config_value(config, 'configs.default.verbose', False),
2323
help='Show detailed command output'
2424
)
2525
parser.add_argument(
@@ -76,18 +76,18 @@ def _add_build_args(parser, config: dict[str, Any]) -> None:
7676
parser.add_argument(
7777
'-b', '--build-type',
7878
choices=['Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'],
79-
default=get_config_value(config, 'defaults.build_type', 'Debug'),
79+
default=get_config_value(config, 'configs.default.build_type', 'Debug'),
8080
help='CMake build type (default: %(default)s)'
8181
)
8282
parser.add_argument(
8383
'-d', '--build-dir',
84-
default=get_config_value(config, 'defaults.build_dir', 'build'),
84+
default=get_config_value(config, 'configs.default.build_dir', 'build'),
8585
help='Build directory name (default: %(default)s)'
8686
)
8787
parser.add_argument(
8888
'-n', '--no-build',
8989
action='store_true',
90-
default=get_config_value(config, 'defaults.no_build', False),
90+
default=get_config_value(config, 'configs.default.no_build', False),
9191
help='Skip building, only configure'
9292
)
9393
parser.add_argument(
@@ -105,7 +105,7 @@ def _add_mono_repo_args(parser, config: dict[str, Any]) -> None:
105105
)
106106
parser.add_argument(
107107
'--mono-dir',
108-
default=get_config_value(config, 'defaults.mono_dir', 'build-mono'),
108+
default=get_config_value(config, 'configs.default.mono_dir', 'build-mono'),
109109
help='Directory name for mono-repo cloning (default: %(default)s)'
110110
)
111111
parser.add_argument(

src/starlet_setup/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def single_repo_mode(args: Namespace) -> None:
9393

9494
print("Configuring with CMake\n")
9595
cmake_cmd = ['cmake', '..', f'-DCMAKE_BUILD_TYPE={args.build_type}']
96-
cmake_arg = args.cmake_arg if args.cmake_arg is not None else get_config_value(args.config, 'defaults.cmake_arg', [])
96+
cmake_arg = args.cmake_arg if args.cmake_arg is not None else get_config_value(args.config, 'configs.default.cmake_arg', [])
9797
if cmake_arg:
9898
cmake_cmd.extend(cmake_arg)
9999
run_command(cmake_cmd, cwd=build_path, verbose=args.verbose)
@@ -250,7 +250,7 @@ def mono_repo_mode(args: Namespace):
250250

251251
print(f"Configuring with CMake in {build_path}\n")
252252
cmake_cmd = ['cmake', '-DBUILD_LOCAL=ON', '..']
253-
cmake_arg = args.cmake_arg if args.cmake_arg is not None else get_config_value(args.config, 'defaults.cmake_arg', [])
253+
cmake_arg = args.cmake_arg if args.cmake_arg is not None else get_config_value(args.config, 'configs.default.cmake_arg', [])
254254
if cmake_arg:
255255
cmake_cmd.extend(cmake_arg)
256256
run_command(cmake_cmd, cwd=build_path, verbose=args.verbose)

src/starlet_setup/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def get_config_value(
8383
8484
Args:
8585
config: Configuration dictionary
86-
key: Dot-separated key path (e.g, 'defaults.ssh')
86+
key: Dot-separated key path (e.g, 'configs.default.ssh')
8787
default: Default value if key not found
8888
"""
8989
parts = key.split('.')

0 commit comments

Comments
 (0)