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 Cloudspades #51456

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

Update Cloudspades #51456

wants to merge 33 commits into from

Conversation

pdimens
Copy link
Contributor

@pdimens pdimens commented Oct 17, 2024

While cloudspades builds to completion, there is an error when using the version from the conda recipe:

===== K21 started.


== Running: 
/home/pdimens/Documents/harpy/.snakemake/conda/f09094cb9c3ca647a3fd0548e0f7c996_/bin/sp
ades-core /home/pdimens/Documents/harpy/Assembly/spades/K21/configs/config.info 
/home/pdimens/Documents/harpy/Assembly/spades/K21/configs/isolate_mode.info

/home/pdimens/Documents/harpy/Assembly/spades/input_dataset.yaml:7:11: error: unknown 
enumerated scalar
  "type": "clouds10x"
          ^~~~~~~~~~~
Failed to load file 
"/home/pdimens/Documents/harpy/Assembly/spades/input_dataset.yaml"terminate called 
without an active exception


== Error ==  system call for: 
"['/home/pdimens/Documents/harpy/.snakemake/conda/f09094cb9c3ca647a3fd0548e0f7c996_/bin
/spades-core', '/home/pdimens/Documents/harpy/Assembly/spades/K21/configs/config.info',
'/home/pdimens/Documents/harpy/Assembly/spades/K21/configs/isolate_mode.info']" 
finished abnormally, OS return value: -6
None

However, this error does not appear if I create a new (and empty) conda environment, download the same tarball onto my system and run the compile script manually from within this conda env, without flags, and simply move the bin and share folders to the proper ${PREFIX} locations. This PR is an attempt to replicate that with the conda recipe.


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 Oct 17, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces modifications to the build.sh script and the meta.yaml file for the cloudspades package. In build.sh, the export statements for environment variables such as LIBRARY_PATH, INCLUDE_PATH, CFLAGS, and CXXFLAGS have been commented out, indicating that these variables will not be set during the script's execution. A new conditional block sets the THREADS variable based on the operating system detected by uname, specifically for Linux and macOS. The compilation command has been updated to call ./spades_compile.sh with the THREADS variable directly, and commands have been added to create necessary directories under ${PREFIX} and to move compiled binaries and shared resources.

In meta.yaml, a new test command has been added to the test section, which executes spades.py with the --isolate option and specific input files, enhancing the testing capabilities of the package. Overall, these changes streamline the build process and improve testing for the cloudspades package.

Possibly related PRs

  • cloudspades: add linux-aarch64 build #51446: The changes in the main PR regarding the build.sh script and the meta.yaml file for cloudspades are directly related to this PR, which also modifies the meta.yaml to add support for the linux-aarch64 architecture and updates the build number.
  • Add Cloudspades #51399: This PR introduces the cloudspades package, which is the main subject of the changes in the main PR, as it includes modifications to the build.sh and meta.yaml files for the same package.

Suggested labels

please review & merge, help wanted

Suggested reviewers

  • mencian

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2a74765 and 7b011b2.

📒 Files selected for processing (1)
  • recipes/cloudspades/meta.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • recipes/cloudspades/meta.yaml

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: 1

🧹 Outside diff range and nitpick comments (2)
recipes/cloudspades/build.sh (1)

Line range hint 10-17: LGTM! Consider optimizing for macOS.

The addition of the case statement to set the THREADS variable based on the operating system is a good improvement. It allows for better control over the compilation process on different platforms.

However, you might want to consider setting a default thread count for macOS as well, to potentially improve build performance. For example:

 case $(uname) in
 	Linux)
 		THREADS="-rj${CPU_COUNT}"
 		;;
 	Darwin)
-		THREADS=""
+		THREADS="-rj$(sysctl -n hw.ncpu)"
 		;;
 esac

This change would use the number of available CPU cores on macOS, similar to the Linux setting.

recipes/cloudspades/meta.yaml (1)

42-42: Excellent addition of a test command for 10x format datasets.

The new test command is a valuable addition that directly addresses the issue mentioned in the PR objectives. It tests the functionality of spades.py with 10x format datasets, which is crucial for ensuring the package works correctly with linked read technologies.

Consider enhancing the test to explicitly check for the "unknown enumerated scalar" error related to the "clouds10x" type mentioned in the PR objectives. This could involve parsing the output or return code of the command to ensure the error doesn't occur. For example:

- |
  spades.py --isolate --gemcode1-1 assembler/test_dataset_cloudspades/10x_format/test_1.fastq.gz --gemcode1-2 assembler/test_dataset_cloudspades/10x_format/test_2.fastq.gz -o cloudspades_test
  if [ $? -ne 0 ]; then
    echo "spades.py failed" && exit 1
  fi
  if grep -q "unknown enumerated scalar.*clouds10x" cloudspades_test/spades.log; then
    echo "Found 'unknown enumerated scalar' error related to clouds10x" && exit 1
  fi

This enhancement would provide more robust testing specifically for the issue addressed in this PR.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between b072084 and 3dcbd08.

📒 Files selected for processing (2)
  • recipes/cloudspades/build.sh (2 hunks)
  • recipes/cloudspades/meta.yaml (1 hunks)
🧰 Additional context used
🔇 Additional comments (4)
recipes/cloudspades/build.sh (3)

21-21: LGTM! Improved compilation command.

The modification to use ./spades_compile.sh "${THREADS}" is a good improvement. It simplifies the compilation command and ensures consistent usage of the THREADS variable across different platforms.


Line range hint 1-23: Overall good improvements, with minor adjustments needed.

The changes to this build script generally improve the build process for the cloudspades package. The main improvements include:

  1. Potentially resolving conflicts by commenting out environment variable exports.
  2. Adding OS-specific thread settings.
  3. Simplifying the compilation command.
  4. Ensuring correct package structure by creating directories and moving files.

However, there are a few minor issues and potential improvements:

  1. Verify that commenting out the environment variables doesn't negatively impact the build.
  2. Consider optimizing thread usage for macOS.
  3. Fix the incorrect mv -r command.

After addressing these points, the build script should be more robust and efficient across different platforms.


5-8: Verify the impact of commenting out environment variable exports.

The export statements for LIBRARY_PATH, INCLUDE_PATH, CFLAGS, and CXXFLAGS have been commented out. While this might resolve conflicts with the conda environment, it's important to ensure that the build process still works correctly without these explicit settings.

Please confirm that the package builds and functions correctly without these environment variables. You may want to run the following script to check for any hardcoded paths that might be affected:

recipes/cloudspades/meta.yaml (1)

Line range hint 1-67: Version mismatch between package and source URL

I noticed that while the package version is set to 3.16.0, the source URL points to a cloudspades-0.1 tag. This mismatch could potentially lead to confusion or issues in the future.

Could you please clarify if this version mismatch is intentional? If not, consider aligning the versions to ensure consistency.

On a positive note, I'd like to acknowledge the good practices in place:

  1. The use of run_exports section, which aligns with the PR objectives' mention of avoiding API, ABI, or CLI breakage issues.
  2. The intentional skip for OSX builds, which aligns with the focus on Linux mentioned in the PR objectives.

recipes/cloudspades/build.sh Outdated Show resolved Hide resolved
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