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

Add wsidicomizer recipe #52006

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add wsidicomizer recipe #52006

wants to merge 4 commits into from

Conversation

hexylena
Copy link
Contributor

@hexylena hexylena commented Nov 8, 2024

This package enables converting a range of formats, losslessly into DICOM files. The optional dependencies enable converting an even large range of formats lossily.


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @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:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|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 Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
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>.

Copy link
Contributor

coderabbitai bot commented Nov 8, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces a new file, meta.yaml, for the wsidicomizer package at version 0.15.0. This file outlines the package's configuration, including its name, version, source URL from PyPI, and SHA256 checksum for integrity verification. It details the build specifications, including entry points for the command-line interface, and indicates that the package is architecture-independent. The requirements section specifies dependencies for both host and runtime environments, detailing compatible versions for Python, poetry-core, pip, and several libraries such as wsidicom, numpy, and pydicom. Additionally, it includes commands for testing the installation and provides metadata about the package, including its homepage, functionality summary, license type, and recipe maintainers. The structure of the meta.yaml file aligns with standard practices for package configuration in Python. Furthermore, the pull request adds an LICENCE file containing the Apache License, Version 2.0, which outlines the terms and conditions for use, reproduction, and distribution of the licensed work.

Possibly related PRs

  • Update Hsdecipher #51093: This PR updates the HSDecipher package, which is relevant as it involves changes to the meta.yaml file, similar to the main PR's updates to the wsidicomizer package's meta.yaml. Both involve versioning and metadata adjustments.
  • update Hsdecipher des #51023: This PR also updates the HSDecipher package's meta.yaml, indicating changes in versioning and checksum, which aligns with the main PR's focus on package configuration and metadata updates.

Suggested labels

please review & merge

Suggested reviewers

  • mencian

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
recipes/wsidicomizer/meta.yaml (1)

48-48: Fix typo in package summary.

There's a duplicate word "to" in the summary.

-  summary: Tool for reading WSI files from proprietary formats and optionally convert them to to DICOM
+  summary: Tool for reading WSI files from proprietary formats and optionally convert them to DICOM
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 41713ae and 0625c3f.

📒 Files selected for processing (1)
  • recipes/wsidicomizer/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/wsidicomizer/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (5)
recipes/wsidicomizer/meta.yaml (5)

1-8: LGTM! Package metadata is well-structured.

The package name, version, and source URL follow conda packaging best practices.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


9-17: LGTM! Build configuration follows best practices.

The build configuration is well-structured with proper noarch Python package declaration and run_exports for ABI compatibility.


37-45: LGTM! Test section is comprehensive.

Good coverage of package imports and CLI functionality testing.


51-53: LGTM! Maintainer section is properly configured.


11-12: Verify bioformats CLI availability.

The recipe includes an entry point for bioformats functionality, but this appears to be optional based on the constrained dependencies. Let's verify the CLI's availability.

✅ Verification successful

Let me gather more information about the package structure and dependencies to verify if bioformats is properly handled.


Let me check for any conditional imports or optional dependencies in the package configuration.


Let me check for any package metadata that might indicate optional dependencies.


Based on the analysis of the package metadata and dependencies, I can now provide a final response:

The bioformats CLI entry point is properly configured and available

The package correctly includes the bioformats CLI entry point and tests its availability in the test section. The required dependencies (scyjava and ome-types) are listed under run_constrained requirements, which is the appropriate way to handle optional dependencies in conda recipes. The package structure with extras.bioformats indicates this is an optional feature that will work when the constrained dependencies are present.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the bioformats CLI is conditionally imported
rg -A 5 "bioformats_cli" || echo "No direct references found"

# Check for any conditional imports of bioformats
rg -A 5 "extras.bioformats" || echo "No conditional imports found"

Length of output: 944


Script:

#!/bin/bash
# Check package dependencies and requirements
cat recipes/wsidicomizer/meta.yaml

# Check if bioformats is listed in optional dependencies
fd setup.py --exec cat {} \;

# Look for any conditional imports or optional dependencies related to bioformats
rg -l "bioformats" --type py

Length of output: 43294


Script:

#!/bin/bash
# Check for any pyproject.toml or setup.cfg that might define optional dependencies
fd "pyproject.toml|setup.cfg" --exec cat {} \;

# Look for any import statements or try-except blocks around bioformats
rg -A 5 "import.*bioformats|try:.*bioformats" --type py

Length of output: 559


Script:

#!/bin/bash
# Check for any package metadata files that might contain dependency information
cat recipes/wsidicomizer/meta.yaml

# Look for any extras or optional dependencies in the package
rg -A 5 "extras_require|optional-dependencies" || echo "No optional dependencies found"

Length of output: 4048

recipes/wsidicomizer/meta.yaml Show resolved Hide resolved
recipes/wsidicomizer/meta.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
recipes/wsidicomizer/meta.yaml (3)

19-35: Consider Python version compatibility.

The recipe requires Python >=3.10, which is relatively recent. Consider if supporting Python 3.9 is feasible to increase compatibility with older systems.

Also, some dependencies have very strict version pins (e.g., wsidicom, opentile). While this is good for stability, it might need frequent updates. Consider documenting the rationale for these strict pins.


36-44: Consider enhancing test coverage.

While the basic import and help command tests are good, consider adding functional tests that verify the core conversion capabilities, perhaps with a small test file.


50-52: Consider adding co-maintainers.

For better long-term maintenance, consider adding co-maintainers from the project team or bioconda community. This helps ensure timely updates and support.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0625c3f and a211fad.

📒 Files selected for processing (2)
  • recipes/wsidicomizer/LICENCE (1 hunks)
  • recipes/wsidicomizer/meta.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • recipes/wsidicomizer/LICENCE
🧰 Additional context used
🪛 yamllint
recipes/wsidicomizer/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (2)
recipes/wsidicomizer/meta.yaml (2)

1-8: LGTM: Package metadata is well-structured.

The package name, version, and source URL are correctly specified following conda packaging best practices.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


10-12: Verify bioformats entry point dependencies.

The recipe includes a bioformats CLI entry point, but its dependencies might be optional. Consider documenting the additional dependencies required for the bioformats functionality.

✅ Verification successful

Let me gather more information about the bioformats dependencies by checking the package's source code and requirements.


Bioformats dependencies are properly constrained

The recipe already handles bioformats dependencies correctly through the run_constrained section, which includes scyjava and ome-types packages that are typically required for bioformats functionality. These optional dependencies are appropriately specified as constrained requirements, allowing users to install them only when needed for the bioformats CLI.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if bioformats dependencies are documented
rg -l "bioformats" "$(fd -t f "README.*")"

Length of output: 568


Script:

#!/bin/bash
# Check meta.yaml for bioformats dependencies
cat recipes/wsidicomizer/meta.yaml

# Check if there's a setup.py or pyproject.toml with optional dependencies
fd "setup.py|pyproject.toml" recipes/wsidicomizer/ --exec cat {}

# Look for bioformats imports and dependencies in the source
rg -l "bioformats" recipes/wsidicomizer/

Length of output: 1666

@hexylena
Copy link
Contributor Author

hexylena commented Nov 26, 2024

Not sure how to resolve the dependency issues, this was built from greyskull, it resolves acceptably in pip.

(.venv) $ pip install wsidicomizer Collecting wsidicomizer ... Successfully installed Pillow-10.4.0 PyTurboJPEG-1.7.7 annotated-types-0.7.0 asciitree-0.3.3 certifi-2024.8.30 charset-normalizer-3.4.0 czifile-2019.7.2 defusedxml-0.7.1 dicomweb-client-0.59.3 fasteners-0.19 fsspec-2024.10.0 idna-3.10 imagecodecs-2024.6.1 marshmallow-3.23.1 numcodecs-0.14.1 numpy-2.1.3 ome-types-0.5.3 opentile-0.13.4 packaging-24.2 pydantic-2.10.1 pydantic-compat-0.1.2 pydantic-core-2.27.1 pydicom-3.0.1 requests-2.32.3 retrying-1.3.4 six-1.16.0 tifffile-2024.9.20 tiffslide-2.4.0 typing-extensions-4.12.2 universal-pathlib-0.2.5 urllib3-2.2.3 wsidicom-0.21.4 wsidicomizer-0.15.0 xsdata-24.3.1 zarr-2.18.3

but it uses a pillow version that's higher than wsidicom-0.21.3 would allow in conda.

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.

3 participants