Update config files

This commit is contained in:
2025-11-21 15:00:26 +01:00
parent dfcb0a67fc
commit 35f2876e62
4 changed files with 119 additions and 123 deletions
+8 -12
View File
@@ -152,7 +152,7 @@ def get_canonical_schemas() -> dict[str, dict[str, str]]:
def generate_basic_config(
pbp_file: Path,
hk_file: Path,
schema_output: str = "config_schema.yaml",
schema_output: str = "new_data_schema.yaml",
ini_file: str = None,
instrument_output: str = None,
) -> None:
@@ -185,9 +185,7 @@ def generate_basic_config(
if instrument_output:
instrument_path = Path(instrument_output)
else:
instrument_path = (
schema_path.parent / f"{schema_path.stem}_instrument_settings.yaml"
)
instrument_path = schema_path.parent / "new_instrument_settings.yaml"
try:
from sp2xr.helpers import export_xr_ini_to_yaml_with_source
@@ -212,7 +210,7 @@ def generate_basic_config(
def generate_mapping_config(
pbp_file: Path,
hk_file: Path,
schema_output: str = "config_schema_with_mapping.yaml",
schema_output: str = "new_data_schema_with_mapping.yaml",
ini_file: str = None,
instrument_output: str = None,
) -> None:
@@ -291,9 +289,7 @@ def generate_mapping_config(
if instrument_output:
instrument_path = Path(instrument_output)
else:
instrument_path = (
schema_path.parent / f"{schema_path.stem}_instrument_settings.yaml"
)
instrument_path = schema_path.parent / "new_instrument_settings.yaml"
try:
from sp2xr.helpers import export_xr_ini_to_yaml_with_source
@@ -346,8 +342,8 @@ Examples:
parser.add_argument(
"--schema-output",
"-s",
default="config/config_schema.yaml",
help="Output filename for data schema config (default: config/config_schema.yaml)",
default="config/new_data_schema.yaml",
help="Output filename for data schema config (default: config/new_data_schema.yaml)",
)
parser.add_argument(
@@ -431,8 +427,8 @@ def main():
# Generate configuration
if args.mapping:
schema_file = (
"config/config_schema_with_mapping.yaml"
if args.schema_output == "config/config_schema.yaml"
"config/new_data_schema_with_mapping.yaml"
if args.schema_output == "config/new_data_schema.yaml"
else args.schema_output
)
generate_mapping_config(