-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add patchify #51268
Add patchify #51268
Conversation
📝 WalkthroughWalkthroughThe pull request introduces a new metadata file, Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (4)
recipes/patchify/meta.yaml (4)
8-10
: LGTM: Source section is well-defined.The source URL is correctly constructed using Jinja2 templating, and the SHA256 checksum is provided for package integrity verification.
Consider adding a comment with the command used to generate the SHA256 checksum. This can be helpful for future updates. For example:
# sha256 generated with `curl -sL https://pypi.io/packages/source/p/patchify/patchify-0.2.3.tar.gz | openssl sha256` sha256: 6cc409124f34ceee672f1931d818923f88f5116f323ac7bb9be7e6c5d0845502
12-17
: LGTM: Build section is well-configured.The build section is correctly set up for a pure Python package with
noarch: python
. The installation script uses--no-deps
and--no-build-isolation
, which aligns with Conda best practices. Therun_exports
section is included as suggested in the PR objectives to prevent ABI breakage, and thepin_subpackage
macro is used correctly.Consider adding a comment explaining the purpose of the
run_exports
section for future maintainers. For example:run_exports: # This ensures that packages depending on patchify will use a compatible version - {{ pin_subpackage('patchify', max_pin="x.x") }}
29-35
: LGTM: Test section is well-defined. Consider adding a simple functionality test.The test section includes an import test for the patchify module and a pip check command, which are good basic checks. Including pip as a test requirement is appropriate.
To enhance the test coverage, consider adding a simple functionality test. For example:
test: imports: - patchify commands: - pip check - python -c "import numpy as np; from patchify import patchify, unpatchify; assert patchify(np.zeros((10, 10)), (2, 2), step=1).shape == (9, 9, 2, 2)" requires: - pipThis additional test would verify that the core functionality of the package works as expected.
43-45
: LGTM: Maintainer information is provided. Consider adding more maintainers.The extra section correctly lists the recipe maintainer. However, for better long-term maintenance of the package, it's often beneficial to have multiple maintainers.
Consider reaching out to the Bioconda community or the upstream project maintainers to see if anyone else would be interested in being listed as a co-maintainer for this recipe. This can help ensure continued maintenance and updates for the package in the future.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- recipes/patchify/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/patchify/meta.yaml
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
🔇 Additional comments (2)
recipes/patchify/meta.yaml (2)
1-6
: LGTM: Package and version section looks good.The package name and version are correctly defined using Jinja2 templating. The package name is appropriately lowercased, and the version matches the information provided in the summary.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
37-41
: LGTM: About section is comprehensive and well-defined.The about section provides all necessary metadata, including the home page, a concise summary of the package's functionality, the license type (MIT), and a reference to the license file. This follows Conda packaging best practices and provides clear information about the package.
requirements: | ||
host: | ||
- python >=3.7,<4.0 | ||
- poetry >=0.12 | ||
- poetry-core | ||
- pip | ||
run: | ||
- python >=3.7.0,<4.0.0 | ||
- numpy >=1.0.0,<2.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review host requirements and consider tightening numpy version constraint.
The Python version constraint is appropriate and consistent between host and run environments. However, there are a couple of points to consider:
-
The inclusion of
poetry
andpoetry-core
in host requirements is unusual for a Conda recipe. Typically, these are build-time dependencies and should not be necessary if the package is being installed from PyPI. Consider removing these if they're not explicitly required for the installation process. -
The numpy version constraint in run requirements (
>=1.0.0,<2.0.0
) is very broad. It's generally a good practice to use a more specific version range to ensure compatibility. Consider tightening this constraint based on the actual requirements of the package.
Suggested changes:
requirements:
host:
- python >=3.7,<4.0
- pip
run:
- python >=3.7,<4.0
- numpy >=1.18.0,<2.0.0 # Adjust this range based on the package's actual requirements
Please verify the actual numpy version requirements for the package and adjust the constraint accordingly.
This is a relatively old package but still useful for our pipelines.
Please read the guidelines for Bioconda recipes before opening a pull request (PR).
General instructions
@BiocondaBot please add label
command.@bioconda/core
in a comment.Instructions for avoiding API, ABI, and CLI breakage issues
Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify
run_exports
(see here for the rationale and comprehensive explanation).Add a
run_exports
section like this:with
...
being one of:{{ pin_subpackage("myrecipe", max_pin="x") }}
{{ pin_subpackage("myrecipe", max_pin="x.x") }}
{{ pin_subpackage("myrecipe", max_pin="x.x") }}
(in such a case, please add a note that shortly mentions your evidence for that){{ pin_subpackage("myrecipe", max_pin="x.x.x") }}
(in such a case, please add a note that shortly mentions your evidence for that){{ pin_subpackage("myrecipe", max_pin=None) }}
while replacing
"myrecipe"
with eithername
if aname|lower
variable is defined in your recipe or with the lowercase name of the package in quotes.Bot commands for PR management
Please use the following BiocondaBot commands:
Everyone has access to the following BiocondaBot commands, which can be given in a comment:
@BiocondaBot please update
@BiocondaBot please add label
please review & merge
label.@BiocondaBot please fetch artifacts
You can use this to test packages locally.
Note that the
@BiocondaBot please merge
command is now depreciated. Please just squash and merge instead.Also, the bot watches for comments from non-members that include
@bioconda/<team>
and will automatically re-post them to notify the addressed<team>
.