diff --git a/scripts/metadata_parser.py b/scripts/metadata_parser.py index 31078b64..b07fa47a 100755 --- a/scripts/metadata_parser.py +++ b/scripts/metadata_parser.py @@ -137,8 +137,8 @@ def read_new_metadata(filename, module_name, table_name, scheme_name = None, sub container = encode_container(module_name, metadata_section.title) # Add to dependencies - if new_metadata_header.relative_path: - dependencies += [ os.path.join(new_metadata_header.relative_path, x) for x in new_metadata_header.dependencies] + if new_metadata_header.dependencies_path: + dependencies += [ os.path.join(new_metadata_header.dependencies_path, x) for x in new_metadata_header.dependencies] else: dependencies += new_metadata_header.dependencies else: @@ -150,8 +150,8 @@ def read_new_metadata(filename, module_name, table_name, scheme_name = None, sub container = encode_container(module_name, scheme_name, table_name) # Add to dependencies - if new_metadata_header.relative_path: - dependencies += [ os.path.join(new_metadata_header.relative_path, x) for x in new_metadata_header.dependencies] + if new_metadata_header.dependencies_path: + dependencies += [ os.path.join(new_metadata_header.dependencies_path, x) for x in new_metadata_header.dependencies] else: dependencies += new_metadata_header.dependencies diff --git a/scripts/metadata_table.py b/scripts/metadata_table.py index 3de515ef..0c4d228d 100755 --- a/scripts/metadata_table.py +++ b/scripts/metadata_table.py @@ -61,7 +61,7 @@ [ccpp-table-properties] name = type = scheme - relative_path = + dependencies_path = dependencies = module = # only needed if module name differs from filename source_path = @@ -358,12 +358,12 @@ class MetadataTable(): __table_start = re.compile(r"(?i)\s*\[\s*ccpp-table-properties\s*\]") def __init__(self, run_env, table_name_in=None, table_type_in=None, - dependencies=None, relative_path=None, source_path=None, + dependencies=None, dependencies_path=None, source_path=None, known_ddts=None, var_dict=None, module=None, parse_object=None, skip_ddt_check=False): """Initialize a MetadataTable, either with a name, , and type, , or with information from a file (). - if is None, , , and + if is None, , , and are are also stored. If and / or module are passed (not allowed with type = scheme - relative_path = path + dependencies_path = path dependencies = a.f,b.f [ccpp-arg-table] @@ -44,8 +44,8 @@ def test_MetadataTable_parse_table(tmpdir): metadata_header = metadata_headers[0] assert metadata_header.table_name == "" assert metadata_header.table_type == "scheme" - assert metadata_header.relative_path == "path" - assert metadata_header.dependencies == [os.path.join(tmpdir, metadata_header.relative_path,"a.f"), os.path.join(tmpdir, metadata_header.relative_path,"b.f")] + assert metadata_header.dependencies_path == "path" + assert metadata_header.dependencies == [os.path.join(tmpdir, metadata_header.dependencies_path,"a.f"), os.path.join(tmpdir, metadata_header.dependencies_path,"b.f")] # check metadata section assert len(metadata_header.sections()) == 1