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

Tests for io_utils and removal of duplicate code #1199

Merged
merged 41 commits into from Jan 12, 2023

Conversation

strickvl
Copy link
Contributor

Tests for the methods inside io_utils and a couple of places where I thought the original source needed small changes.

Found some duplicate code which existed inside fileio as well as in io_utils so I removed it, leaving fileio.py as the canonical place for most of those kinds of functions.

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • If I have added an integration, I have updated the integrations table and the corresponding website section.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@strickvl strickvl added internal To filter out internal PRs and issues tests Test suite additions or updates labels Dec 22, 2022
Copy link
Contributor

@fa9r fa9r left a comment

Choose a reason for hiding this comment

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

Awesome, always happy to get rid of unused/duplicate code 😊

New tests all look good. Only question: what happened to the is_remote tests?

tests/unit/io/test_fileio.py Show resolved Hide resolved
tests/unit/utils/test_io_utils.py Outdated Show resolved Hide resolved
tests/unit/utils/test_io_utils.py Show resolved Hide resolved
@strickvl strickvl requested a review from fa9r December 22, 2022 12:31
Copy link
Contributor

@fa9r fa9r left a comment

Choose a reason for hiding this comment

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

🚀

tests/unit/utils/test_io_utils.py Show resolved Hide resolved
tests/unit/utils/test_io_utils.py Outdated Show resolved Hide resolved
@strickvl strickvl requested review from bcdurak and removed request for stefannica and schustmi January 5, 2023 13:44
@strickvl
Copy link
Contributor Author

@bcdurak As discussed, I moved things back such that fileio is the core selection of filesystem functions, and io_utils is where everything else lives. I left convert_to_str in fileio on account of circular import issues.

Copy link
Contributor

@bcdurak bcdurak left a comment

Choose a reason for hiding this comment

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

@strickvl Looks great! Amazing job with the tests as well!

@strickvl strickvl merged commit 612f252 into develop Jan 12, 2023
@strickvl strickvl deleted the test/ENG-1588-io-util-tests branch January 12, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal To filter out internal PRs and issues tests Test suite additions or updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants