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

Allow run functions to accept pathlib.Path objects #386

Closed
wants to merge 4 commits into from

Conversation

aloukina
Copy link
Collaborator

This PR addresses #384.

  • I refactored the code since the input processing part was shared by all components: this is now done via Configuration Parser method.
  • The path to the config file can be passed as either string or pathlib.Path object. Previously the latter functionality was available as undocumented option.
  • I didn't add new tests for that method since the functionality is already tested in tests we wrote for individual components

@pep8speaks
Copy link

pep8speaks commented Feb 26, 2020

Hello @aloukina! Thanks for updating this PR.

Line 1416:101: E501 line too long (103 > 100 characters)
Line 1422:101: E501 line too long (105 > 100 characters)

Comment last updated at 2020-02-26 20:10:10 UTC

@aloukina aloukina added this to In progress in RSMTool 7.X via automation Feb 26, 2020
@coveralls
Copy link

coveralls commented Feb 26, 2020

Coverage Status

Coverage increased (+0.05%) to 90.233% when pulling d8bf8f0 on 384-allow-run-functions-to-accept-Path into 0eb9a96 on master.

Copy link
Member

@desilinguist desilinguist left a comment

Choose a reason for hiding this comment

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

I haven't reviewed the details but had a more overarching comment that'd be good to think about now.

@@ -764,15 +766,15 @@ def _check_config_is_loaded(self):


@classmethod
def get_configparser(cls, filepath, *args, **kwargs):
def get_configparser(cls, config_file_or_obj_or_dict, *args, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, might it make more sense to just move this logic to the ConfigurationParser() initializer instead of having this classmethod since all we are doing is getting the args and then calling the initializer anyway?

RSMTool 7.X automation moved this from In progress to Review in progress Feb 27, 2020
@aloukina aloukina closed this Mar 4, 2020
RSMTool 7.X automation moved this from Review in progress to Done Mar 4, 2020
@desilinguist desilinguist removed this from Done in RSMTool 7.X Mar 5, 2020
@aloukina aloukina deleted the 384-allow-run-functions-to-accept-Path branch April 16, 2020 20:14
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.

None yet

4 participants