diff --git a/gokart/file_processor.py b/gokart/file_processor.py index 72c9fb1b..218d0dfa 100644 --- a/gokart/file_processor.py +++ b/gokart/file_processor.py @@ -269,6 +269,7 @@ def dump(self, obj, file): def make_file_processor(file_path: str, store_index_in_feather: bool) -> FileProcessor: extension2processor = { '.txt': TextFileProcessor(), + '.ini': TextFileProcessor(), '.csv': CsvFileProcessor(sep=','), '.tsv': CsvFileProcessor(sep='\t'), '.pkl': PickleFileProcessor(), @@ -280,7 +281,6 @@ def make_file_processor(file_path: str, store_index_in_feather: bool) -> FilePro '.feather': FeatherFileProcessor(store_index_in_feather=store_index_in_feather), '.png': BinaryFileProcessor(), '.jpg': BinaryFileProcessor(), - '.ini': TextFileProcessor(), } extension = os.path.splitext(file_path)[1] diff --git a/test/test_target.py b/test/test_target.py index 6dca4731..781eb0cf 100644 --- a/test/test_target.py +++ b/test/test_target.py @@ -8,7 +8,6 @@ import boto3 import numpy as np import pandas as pd -from luigi.configuration.cfg_parser import LuigiConfigParser from matplotlib import pyplot from moto import mock_s3 @@ -128,19 +127,6 @@ def test_save_and_load_feather_without_store_index_in_feather(self): pd.testing.assert_frame_equal(loaded, obj) - def test_save_and_load_config_ini_file(self): - obj = LuigiConfigParser() - obj['common'] = {'a': '1', 'b': 'yes', 'c': 2} - obj['example'] = {} - obj['example']['d'] = 'foo' - obj['example']['e'] = 'true' - file_path = os.path.join(_get_temporary_directory(), 'test.ini') - - target = make_target(file_path=file_path, unique_id=None) - target.dump(obj) - loaded = target.load() - self.assertEqual(loaded, [str(obj)], msg='should save an object as List[str].') - def test_last_modified_time(self): obj = pd.DataFrame(dict(a=[1, 2], b=[3, 4])) file_path = os.path.join(_get_temporary_directory(), 'test.csv')