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

498 Add list to dict utility to parse variables #904

Merged
merged 7 commits into from
Aug 17, 2020
Merged

498 Add list to dict utility to parse variables #904

merged 7 commits into from
Aug 17, 2020

Conversation

Nic-Ma
Copy link
Contributor

@Nic-Ma Nic-Ma commented Aug 17, 2020

part of #498

Description

This PR implemented list_to_dict utility to parse variables from string config file.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh --codeformat --coverage.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Aug 17, 2020

/black

monai/utils/misc.py Outdated Show resolved Hide resolved
monai/utils/misc.py Show resolved Hide resolved
monai/utils/misc.py Show resolved Hide resolved
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Aug 17, 2020

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Aug 17, 2020

Hi @wyli and @ericspod ,

Thanks for your review, I updated the PR according to your comments.
Do you think we can merge it now?

Thanks.

@wyli
Copy link
Contributor

wyli commented Aug 17, 2020

Hi @wyli and @ericspod ,

Thanks for your review, I updated the PR according to your comments.
Do you think we can merge it now?

Thanks.

thanks, would be helpful to include more tests for the corner cases?

['a=1', 'a=2']
['a = 01 ']
['a=None']
['a=']
['a: 0']
["a='test'"]
["'a'=0"]

I'm not 100% sure about the intended use cases, so please ignore these if I'm wrong

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Aug 17, 2020

Hi @wyli ,

Add more tests for core cases.
Thanks.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Aug 17, 2020

/black

@Nic-Ma Nic-Ma merged commit 475fa44 into Project-MONAI:master Aug 17, 2020
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