Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ini file processor #329

Merged
merged 12 commits into from
Oct 20, 2023
Merged

Conversation

maronuu
Copy link
Contributor

@maronuu maronuu commented Oct 19, 2023

Add .ini file support for file_processor.

We use TextFileProcessor for .ini file.

In most cases with gokart, .ini files are used as config files, and there are some cases that requires you to just dump .ini config files, like kannon library development.
configparser or LuigiConfigParser are seemingly suitable choices, but their functionality are sometimes overwhelming and there should be options on how to parse the loaded config files.
So, in order to achieve these kind of requirements, we use TextFileProcessor for .ini format. The loaded files are text, so users can choose how to parse them.

@maronuu maronuu changed the title Support ini file in target Add ini file processor Oct 19, 2023
@maronuu maronuu marked this pull request as ready for review October 19, 2023 02:40
gokart/file_processor.py Outdated Show resolved Hide resolved
gokart/file_processor.py Outdated Show resolved Hide resolved
@maronuu maronuu requested a review from Hi-king October 19, 2023 06:08
gokart/file_processor.py Outdated Show resolved Hide resolved
@@ -127,6 +128,19 @@ 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):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maronuu will you remove this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, Thank you for the comment.

@yokomotod
Copy link
Collaborator

@maronuu lgtm!

@kitagry
Copy link
Member

kitagry commented Oct 19, 2023

I think you should the reason why you use TextFileProcessor in the PR description.

@kitagry kitagry merged commit 29cb4e0 into m3dev:master Oct 20, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants