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

Load Channels with . in their name #38

Merged
merged 7 commits into from
Oct 13, 2023
Merged

Load Channels with . in their name #38

merged 7 commits into from
Oct 13, 2023

Conversation

srivarra
Copy link
Contributor

@srivarra srivarra commented Oct 11, 2023

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR?

Allows loading of channels with a period in their name (other than for the file extension)

How did you implement your changes

Used os.path.splitext instead of .split for the path.
Updated dependencies for Python 3.12 support.

Remaining issues

N/A.

@srivarra srivarra linked an issue Oct 11, 2023 that may be closed by this pull request
@srivarra srivarra self-assigned this Oct 11, 2023
@srivarra srivarra added the bug Something isn't working label Oct 11, 2023
@srivarra srivarra marked this pull request as ready for review October 12, 2023 18:00
Copy link
Contributor

@camisowers camisowers left a comment

Choose a reason for hiding this comment

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

Can you add a test? Also would we ever need this for load_imgs_from_dir as well?

@srivarra
Copy link
Contributor Author

@camisowers Yeah I'll add a test. load_imgs_from_dir does not have this issue. It uses io_utils.remove_file_extensions to remove file extensions, instead of directly splitting the string itself.

Copy link
Contributor

@camisowers camisowers left a comment

Choose a reason for hiding this comment

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

Looks good! Just one minor fix.

src/alpineer/load_utils.py Outdated Show resolved Hide resolved
Copy link
Contributor

@alex-l-kong alex-l-kong left a comment

Choose a reason for hiding this comment

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

Good stuff

@srivarra srivarra merged commit 9a88bc9 into main Oct 13, 2023
4 checks passed
@srivarra srivarra deleted the load_imgs_with_period branch October 13, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

load_imgs_from_tree Errors when the file has a .
3 participants