Ejemplo n.º 1
0
    def update_yaml(self, path: str) -> None:
        """Update metadata with static metadata from YAML file

        Args:
            path (str): Path to YAML dataset metadata

        Returns:
            None
        """
        self.data = load_yaml_into_existing_dict(self.data, path)
Ejemplo n.º 2
0
    def update_from_yaml(self, path: str) -> None:
        """Update metadata with static metadata from YAML file

        Args:
            path (str): Path to YAML dataset metadata

        Returns:
            None
        """
        self.data = load_yaml_into_existing_dict(self.data, path)
Ejemplo n.º 3
0
 def test_load_yaml_into_existing_dict(self, configfolder):
     existing_dict = load_yaml(join(configfolder, "hdx_config.yml"))
     result = load_yaml_into_existing_dict(
         existing_dict, join(configfolder, "project_configuration.yml")
     )
     assert list(result.items()) == list(TestLoader.expected_yaml.items())
Ejemplo n.º 4
0
 def test_load_yaml_into_existing_dict(self, configfolder):
     existing_dict = load_yaml(join(configfolder, 'hdx_config.yml'))
     result = load_yaml_into_existing_dict(
         existing_dict, join(configfolder, 'project_configuration.yml'))
     assert result == TestLoader.expected_yaml