Skip to content

Commit 42ad537

Browse files
committed
refactor: Move schema constants to module level
- Move REGDEF_V1_SCHEMA and REGDEF_V2_SCHEMA to module-level constants - Add APPDEF_SCHEMA constant for consistency - Matches existing pattern for schema constants (lines 18-21) This ensures consistent code style throughout the file.
1 parent 6fb64be commit 42ad537

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/build_env/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
CLOUD_SCHEMA = "schemas/cloud.schema.json"
2020
NAMESPACE_SCHEMA = "schemas/namespace.schema.json"
2121
ENV_SPECIFIC_RESOURCE_PROFILE_SCHEMA = "schemas/resource-profile.schema.json"
22+
APPDEF_SCHEMA = "schemas/appdef.schema.json"
23+
REGDEF_V1_SCHEMA = "schemas/regdef.schema.json"
24+
REGDEF_V2_SCHEMA = "schemas/regdef-v2.schema.json"
2225

2326

2427
def prepare_folders_for_rendering(env_name, cluster_name, source_env_dir, templates_dir, render_dir,
@@ -275,11 +278,8 @@ def validate_appregdefs(render_dir, env_name):
275278
logger.info(f"No AppDef YAMLs found in {appdef_dir}")
276279
for file in appdef_files:
277280
logger.info(f"AppDef file: {file}")
278-
validate_yaml_by_scheme_or_fail(file, "schemas/appdef.schema.json")
281+
validate_yaml_by_scheme_or_fail(file, APPDEF_SCHEMA)
279282

280-
REGDEF_V1_SCHEMA = "schemas/regdef.schema.json"
281-
REGDEF_V2_SCHEMA = "schemas/regdef-v2.schema.json"
282-
283283
if os.path.exists(regdef_dir):
284284
regdef_files = findAllYamlsInDir(regdef_dir)
285285
if not regdef_files:

0 commit comments

Comments
 (0)