Skip to content

Conversation

@andrewGhazi
Copy link

As first brought up here #159 , this PR makes a small change to the pattern used in the .path_validity() function to allows additional image file extensions and their capitalized variants. It increases the "long lines" note from BiocCheck::BiocCheck() from 25 to 26 but doesn't affect the check or test results otherwise.

    * NOTE: Consider shorter lines; 26 lines (1%) are > 80 characters
      long.

I tried to follow the contributor guidelines here as best as I could, please let me know if you'd like something changed.

Copy link
Contributor

Choose a reason for hiding this comment

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

please allow the maintainer to perform the version bumps at their discretion

Copy link
Author

Choose a reason for hiding this comment

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

I have "Allow edits by maintainers" checked on the PR menu, is there something else that I need to change to allow maintainers to version bump?

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant to say that I usually leave the version bumping up to the maintainer so to avoid conflicts with the main branch. That means that I wouldn't commit any changes to the version in the DESCRIPTION file. You may also consider reverting the change to the DESCRIPTION and using git commit --amend and then force pushing to your branch git push -f aghazi addl_img_exts where aghazi is the name of the remote for your fork.

Copy link
Author

Choose a reason for hiding this comment

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

Ah okay. I saw a version bump in a different PR that I was imitating so I thought that was required. I'll try the fix you suggest.

Copy link
Author

Choose a reason for hiding this comment

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

I made the change you suggested 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

Choose a reason for hiding this comment

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

It may be better to use tools::file_ext() and tolower() to check the extension with vector of allowed extensions.

Copy link
Contributor

@LiNk-NY LiNk-NY May 13, 2025

Choose a reason for hiding this comment

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

Consider doing something like:

## [... outside the function]
.ALLOWED_FORMATS <- c("png", "jpg", "jpeg", "tif", "tiff")
## [... inside the function]
ext <- tools::file_ext(x) |> tolower()
ext %in% .ALLOWED_FORMATS

Copy link
Author

Choose a reason for hiding this comment

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

Okay, I also made this change as well 👍

…zed variants. Amended earlier changes that directly bumped the version number. Also changed the pattern detection to use tolower() as suggested.
Copy link
Contributor

@LiNk-NY LiNk-NY left a comment

Choose a reason for hiding this comment

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

Great, thanks!

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.

2 participants