Skip to content

Commit

Permalink
Add ini file processor (#329)
Browse files Browse the repository at this point in the history
* Support ini file in target

* Add int and boolean value in test case

* Add ini in supported format

* Fix test case

* Reorder case

* Add assert error message

* fix

* Support ini, cfg, conf with ConfigFileProcessor

* Change section name in test

* Change file processor

* Remove unused import

* Remove unnecessary test

---------

Co-authored-by: yutaro-oguri <yutaro-oguri@m3.com>
  • Loading branch information
maronuu and yutaro-oguri authored Oct 20, 2023
1 parent d255cd3 commit 29cb4e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/task_on_kart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ It is also possible to specify a file format other than pkl. The supported file
- .feather
- .png
- .jpg
- .ini


If dump something other than the above, can use :func:`~gokart.TaskOnKart.make_model_target`.
Expand Down
1 change: 1 addition & 0 deletions gokart/file_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 29cb4e0

Please sign in to comment.