예제 #1
0
    def update_json(self, path: str):
        """Update metadata with static metadata from JSON file

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

        Returns:
            None
        """
        self.data = load_json_into_existing_dict(self.data, path)
예제 #2
0
    def update_from_json(self, path: str):
        """Update metadata with static metadata from JSON file

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

        Returns:
            None
        """
        self.data = load_json_into_existing_dict(self.data, path)
예제 #3
0
 def test_load_json_into_existing_dict(self, configfolder):
     existing_dict = load_json(join(configfolder, "hdx_config.json"))
     result = load_json_into_existing_dict(
         existing_dict, join(configfolder, "project_configuration.json")
     )
     assert list(result.items()) == list(TestLoader.expected_json.items())
예제 #4
0
 def test_load_json_into_existing_dict(self, configfolder):
     existing_dict = load_json(join(configfolder, 'hdx_config.json'))
     result = load_json_into_existing_dict(
         existing_dict, join(configfolder, 'project_configuration.json'))
     assert result == TestLoader.expected_json