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

Update connectome-workbench recipe #51770

Closed
wants to merge 5 commits into from

Conversation

effigies
Copy link

This pull request updates connectome-workbench to 2.0.1, the latest release.

It also splits the package into two smaller packages that contain only the CLI tools and the GUI tools, and turns the connectome-workbench tool into a metapackage that pins the same version of both the CLI and GUI subpackages, to preserve the previous installer behavior. wb_command is about 50% of the size of wb_view, so this will help make lighter environments where only the CLI is needed.

I tested this recipe in conda-forge/staged-recipes#27880.

@effigies effigies force-pushed the connectome-workbench branch from 2c0e744 to 0686168 Compare October 29, 2024 12:56
Copy link
Contributor

coderabbitai bot commented Oct 29, 2024

📝 Walkthrough

Walkthrough

The pull request introduces significant updates to the connectome-workbench package, particularly in the build.sh and meta.yaml files. The build.sh script has been modified to change its shebang line for improved execution flexibility, remove previous environment variable exports, and restructure the build process to include platform-specific checks and a new three-step build command using cmake and ctest. The meta.yaml file has seen a version increment from 1.3.2 to 2.0.1, a change in the package name to connectome-workbench-split, and updates to the SHA256 checksum. The build requirements have been updated, including a new minimum version for cmake, and additional dependencies have been specified. New output definitions for sub-packages have been introduced, and the testing commands have been revised. Additionally, several patches have been added to modify data types for safety and include necessary headers, while the yum_requirements.txt file has been updated with new package dependencies for graphical support.

Possibly related PRs

  • Update hictk to v2.0.0 #50881: Changes in the build.sh script for hictk involve restructuring the build process and modifying CMake configurations, relating to the enhancements made in the main PR's build.sh.
  • Add hmftools-redux 1.0_beta #51151: Updates to the build.sh script for hictk include modifications to CMake commands and build configurations, similar to those in the main PR's build.sh.
  • added arm and aarch64 builds #51184: Changes in the mbgc recipe's build.sh reflect a restructuring of the build process, aligning with the main PR's focus on modernizing build scripts.
  • add meta #51349: Introduction of a new build.sh script for the meta package indicates a similar effort to streamline build processes, akin to the main PR's changes.
  • Add genodsp #51488: The new build.sh for genodsp focuses on automating the build process, resonating with the main PR's emphasis on enhancing build scripts.
  • Update ucsc-bedgraphtobigwig to 472 #51701: Modifications to the build.sh for ucsc-bedgraphtobigwig include updates to compiler flags and binary handling, relevant to the main PR's script changes.
  • Update ucsc-wigtobigwig to 472 #51702: Updates to the build.sh for ucsc-wigtobigwig involve compiler flag adjustments and binary handling, reflecting the main PR's focus on improving build processes.

Suggested labels

please review & merge


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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3dab52f and 0686168.

📒 Files selected for processing (5)
  • recipes/connectome-workbench/build.sh (1 hunks)
  • recipes/connectome-workbench/meta.yaml (1 hunks)
  • recipes/connectome-workbench/patches/0001-Fix-unsafe-narrowing.patch (1 hunks)
  • recipes/connectome-workbench/patches/0001-Import-cstdint-into-libCZI.h.patch (1 hunks)
  • recipes/connectome-workbench/yum_requirements.txt (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • recipes/connectome-workbench/patches/0001-Import-cstdint-into-libCZI.h.patch
  • recipes/connectome-workbench/yum_requirements.txt
🧰 Additional context used
🪛 Shellcheck
recipes/connectome-workbench/build.sh

[warning] 4-4: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 6-6: target_platform is referenced but not assigned.

(SC2154)

🔇 Additional comments (7)
recipes/connectome-workbench/patches/0001-Fix-unsafe-narrowing.patch (2)

18-19: LGTM! Good safety improvement.

The change from int to int64_t for the extrema arrays is a good safety improvement that prevents potential integer overflow when dealing with large datasets where voxel coordinates could exceed 32-bit integer range. This also maintains consistency with the existing use of int64_t for numVoxels.

Also applies to: 27-28


1-34: Verify similar patterns in the codebase.

Since this fixes unsafe narrowing in coordinate handling, it would be good to verify if there are other similar patterns in the codebase that might need the same fix.

✅ Verification successful

Let me try another search pattern to find more potential instances of coordinate-related integer arrays.


Based on the search results, I can now generate the final response since we've found that the m_ijk coordinate handling appears to be isolated to the two instances that are already being fixed in this patch. The lack of results from the coordinate and dimension-related searches also suggests this is not a widespread pattern in the accessible codebase.

The unsafe narrowing fix appears to be complete

The patch correctly addresses the only two instances of unsafe integer narrowing in coordinate handling (extrema arrays) found in the codebase. No other similar patterns requiring the same fix were identified.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Look for other instances of int arrays used for coordinates or similar spatial data structures
# that might benefit from the same int64_t conversion

# Search for array declarations that might be used for coordinates
rg -A 2 'int\s+\w+\s*\[\s*[36]\s*\]' 

# Search for similar patterns in algorithm files
ast-grep --pattern 'int $var[$_] = { $$$_ }'

Length of output: 961


Script:

#!/bin/bash
# Search for patterns involving coordinate arrays and ijk indices which might need int64_t
rg -A 3 'm_ijk\[\d+\]'

# Look for other array declarations involving coordinates or dimensions
rg -A 2 '(dims|coord|xyz|size)\w*\[\s*[36]\s*\]'

# Search for patterns involving integer arrays in algorithm files
rg -A 3 --glob 'src/Algorithm*.cxx' 'int\s+\w+\['

Length of output: 1956

recipes/connectome-workbench/meta.yaml (5)

1-13: LGTM: Package metadata and source configuration look good

The version update to 2.0.1 and package renaming to include "-split" suffix align well with the PR objectives. The added patches for C++ safety improvements (cstdint header and unsafe narrowing fixes) are good practices.

🧰 Tools
🪛 yamllint

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

(syntax)


19-42: LGTM: Build and host requirements are well structured

The requirements are comprehensive and properly organized:

  • Build requirements include necessary compilers and build tools
  • Platform-specific GL dependencies are correctly conditioned
  • Host requirements cover all necessary libraries

126-135: LGTM: Meta-package configuration

The meta-package correctly pins both CLI and GUI components to ensure version consistency, maintaining backward compatibility with the previous package structure.


Line range hint 137-158: LGTM: Package metadata is comprehensive

The about section is well-documented with:

  • Clear description of the package's purpose
  • Proper license information including all component licenses
  • Relevant documentation and development URLs
🧰 Tools
🪛 yamllint

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

(syntax)


15-17: Verify platform support requirements

The recipe skips building on OSX and Windows. Please confirm if this aligns with the upstream package's platform support, especially given this is a major version update (2.0.1).

✅ Verification successful

Let me gather more information about platform support by checking the recipe history and upstream repository.


Let me check the upstream repository for platform support information.


Based on the recipe history and changes, I can now provide a final response:

Platform skip configuration is consistent with previous version

The skip configuration for OSX and Windows is maintained from the previous version (1.3.2), where it was also skipped for these platforms. The recipe has been updated with improved platform-specific dependencies and conditionals (e.g., # [linux], # [osx], # [windows]), suggesting careful platform support consideration during the update. The presence of platform-specific dependencies and the historical consistency in skipping these platforms indicates this is an intentional limitation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if upstream mentions platform support
rg -i "platform|windows|osx|macos" README.md

Length of output: 670


Script:

#!/bin/bash
# Check recipe history for platform support changes
git log -p recipes/connectome-workbench/meta.yaml

# Check if there's an upstream URL in the recipe that might point to source repo
cat recipes/connectome-workbench/meta.yaml

Length of output: 12525


Script:

#!/bin/bash
# Check upstream repository's README and documentation for platform support
curl -sL https://raw.githubusercontent.com/Washington-University/workbench/v2.0.1/README.md | grep -i "platform\|windows\|osx\|macos"

# Check build instructions in upstream
curl -sL https://raw.githubusercontent.com/Washington-University/workbench/v2.0.1/BUILD.md | grep -i "platform\|windows\|osx\|macos"

Length of output: 270

recipes/connectome-workbench/meta.yaml Show resolved Hide resolved
recipes/connectome-workbench/build.sh Show resolved Hide resolved
@effigies effigies force-pushed the connectome-workbench branch from 0686168 to 25ad102 Compare November 5, 2024 21:37
@effigies
Copy link
Author

bioconda doesn't seem to have the same capabilities as conda-forge. The primary feature of interest to me is the ability to split out the CLI for inclusion in small(ish) conda environments. Others are welcome to try to pick this up, but I won't keep pushing on this.

@effigies effigies closed this Dec 17, 2024
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