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 python to >=3.8 in k8 recipe #51054

Merged
merged 13 commits into from
Oct 3, 2024
Merged

Conversation

lynnjo
Copy link
Contributor

@lynnjo lynnjo commented Sep 30, 2024

Describe your pull request here
Update k8/meta.yaml to allow python of 3.8 or later versions

Fixes #50888


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>.

Summary by CodeRabbit

  • New Features

    • Enhanced compatibility with Python by updating the version requirement to a minimum of 3.8.
    • Added support for additional platforms: linux-aarch64 and osx-arm64.
  • Improvements

    • Improved clarity in the requirements section with better formatting and alignment.
    • Updated the Node.js version for macOS to 18.20.4, enhancing build robustness.
    • Incremented the build number for the k8 package, reflecting updates and improvements.
    • Added a cleanup command to remove backup files during the build process.
    • Upgraded resource class for linux-aarch64 jobs to improve performance.
    • Standardized commands for fetching bioconda installation scripts across jobs.
    • Enhanced the build script's reliability with improved conditional logic.

Copy link
Contributor

coderabbitai bot commented Sep 30, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request includes updates to the recipes/k8/build.sh script and the meta.yaml file for the k8 package version 1.2. Changes to the script enhance conditional logic for Node.js version selection, modify the THREADS variable based on architecture, and clean up backup files. The meta.yaml file updates the Python version requirement to a minimum, increments the build number, adds setuptools as a requirement, and expands additional platforms.

Changes

File Change Summary
recipes/k8/build.sh - Changed shebang from #!/usr/bin/env bash to #!/bin/bash.
- Exported LDFLAGS with an additional library path.
- Updated Node.js version logic using double brackets for reliability.
- Set macOS Node.js version to 18.20.4 and others to 18.19.1.
- Introduced a case statement to set THREADS based on architecture.
- Used THREADS variable in the make command instead of a hardcoded value.
- Added cleanup command for backup files from Makefile.
- Changed permissions of k8 binary to 0755 before copying.
recipes/k8/meta.yaml - Updated Python requirement from ==3.8 to >=3.8 in requirements.host.
- Added setuptools as a new requirement.
- Incremented build number from 2 to 3.
- Updated summary in about section to include a period.
- Added doc_url entry linking to the README file.
- Expanded extra.additional-platforms to include linux-aarch64 and osx-arm64.

Assessment against linked issues

Objective Addressed Explanation
Compatibility setup for minimap2 and tiledbvcf (Issue #50888) The changes do not address the specific compatibility issue.

Possibly related PRs

Suggested labels

please review & merge, osx-arm64


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.

@mencian mencian changed the title updated python to be >=3.8 Update python to >=3.8 in k8 recipe Sep 30, 2024
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/k8/build.sh (2)

Line range hint 38-42: Compilation and installation process looks good, with a minor suggestion

The k8 compilation and installation process is well-structured:

  1. It uses the NODE_SRC variable set earlier, ensuring consistency.
  2. The CXXFLAGS include necessary compiler options, including C++17 support.
  3. The LIBS variable incorporates LDFLAGS, which is good for maintaining any system-specific linker flags.

However, there's a minor improvement that could be made for better error handling:

Consider adding error checking after the make and cp commands. This will help catch and report any issues during compilation or installation. Here's a suggested modification:

-NODE_SRC="node-v${NODE_VERSION}" CXXFLAGS="${CXXFLAGS} -std=c++17 -g -O3 -Wall" LIBS="${LDFLAGS} -pthread" make
+NODE_SRC="node-v${NODE_VERSION}" CXXFLAGS="${CXXFLAGS} -std=c++17 -g -O3 -Wall" LIBS="${LDFLAGS} -pthread" make || { echo "k8 compilation failed"; exit 1; }

 mkdir -p $PREFIX/bin
-cp -f k8 $PREFIX/bin/k8
+cp -f k8 $PREFIX/bin/k8 || { echo "Failed to install k8 binary"; exit 1; }

This change will cause the script to exit with an error message if either the compilation or installation step fails.

🧰 Tools
🪛 Shellcheck

[warning] 29-29: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.

(SC2164)


29-29: Improve error handling for 'popd' command

The static analysis tool Shellcheck has identified a potential issue with the popd command. While it's unlikely to fail in this context, it's good practice to handle potential errors.

Consider modifying the popd command to handle potential failures:

-popd
+popd || { echo "popd failed, the directory stack might be empty"; exit 1; }

This change will cause the script to exit with an error message if popd fails, which could happen if the directory stack is empty due to an unexpected error earlier in the script.

🧰 Tools
🪛 Shellcheck

[warning] 29-29: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.

(SC2164)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between fbe6fa8 and 5892dce.

📒 Files selected for processing (1)
  • recipes/k8/build.sh (2 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/k8/build.sh

[warning] 29-29: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.

(SC2164)

🔇 Additional comments (2)
recipes/k8/build.sh (2)

Line range hint 10-14: Improved OS detection and Node.js version selection

The changes in this segment enhance the script's robustness and compatibility:

  1. The use of double brackets [[ ]] for the OS check is a more modern and reliable approach in bash scripting. It prevents word splitting and provides more consistent behavior across different shells.

  2. The Node.js version update for macOS (18.20.4) aligns with the comment explaining version compatibility issues. This change addresses the compilation challenges on macOS while maintaining compatibility with the k8 tool.

These modifications improve the script's reliability and cross-platform compatibility.


30-35: Improved build flexibility with Makefile modifications

The changes to the Makefile enhance the build process flexibility:

  1. Allowing CXXFLAGS, NODE_SRC, and LIBS to be set through environment variables provides greater control over the build process. This is particularly useful for cross-compilation or when specific optimizations are needed.

  2. The use of ?= instead of = in the Makefile allows these variables to be overridden from the command line or environment, while still providing default values.

  3. Removing the backup files (.bak) keeps the build directory clean, which is a good practice.

These modifications make the build process more adaptable to different environments and requirements.

@@ -25,13 +25,14 @@ patch -p0 < ${RECIPE_DIR}/nodejs-x86_64.patch

# The provided configure script is a sh/python hybrid which boils down to one line of Python
python -c "import configure" --without-node-snapshot --without-etw --without-npm --without-inspector --without-dtrace
make -j3
make -j2
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Missing Azure build workaround patch found

  • The patch file /nodejs-x86_64.patch does not exist, preventing the Azure build workaround from being applied.
  • The expected patched file node-v/src/debug_utils.cc is also missing, indicating the patch was not integrated.
🔗 Analysis chain

Verify the impact of the Azure build workaround patch

The patch applied here addresses a specific error occurring during the Azure build for Linux x86_64. While this workaround is likely necessary for successful builds in that environment, it's important to ensure it doesn't introduce unintended side effects.

To verify the patch's impact and necessity:

This script will help verify the existence and content of the patch file, as well as confirm if it's being applied correctly during the build process.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the patch file exists and if it's being applied correctly

# Test 1: Check if the patch file exists
if [ -f "${RECIPE_DIR}/nodejs-x86_64.patch" ]; then
    echo "Patch file exists."
else
    echo "Patch file not found. Please verify its location."
fi

# Test 2: Check the content of the patch file
echo "Patch file content:"
cat "${RECIPE_DIR}/nodejs-x86_64.patch"

# Test 3: Verify if the patched file exists after build
if [ -f "node-v${NODE_VERSION}/src/debug_utils.cc" ]; then
    echo "Patched file exists. Checking for changes:"
    grep -n "fwrite" "node-v${NODE_VERSION}/src/debug_utils.cc"
else
    echo "Patched file not found. Build process might have failed or file location is incorrect."
fi

Length of output: 493

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 (2)
.circleci/config.yml (2)

12-12: Approved: Increased resource allocation for linux-aarch64 jobs

The change from arm.medium to arm.large for the linux-aarch64 executor is a good improvement. This increase in resources can potentially:

  1. Speed up build times for ARM64 packages.
  2. Allow for more complex or resource-intensive builds.
  3. Help resolve dependency issues by providing more computational power and memory.

However, keep in mind that this change might also increase the cost of running these jobs. Ensure that the benefits outweigh the potential increase in CircleCI usage costs.

Consider monitoring the performance impact of this change to evaluate if it significantly improves build times or resolves any existing issues.


Line range hint 1-359: Overall impact on CircleCI configuration

The change to increase the resource class for linux-aarch64 jobs is well-integrated into the existing configuration. It doesn't introduce any conflicts or inconsistencies with other parts of the file. This isolated change has the potential to improve the build process for ARM64 packages without affecting other architectures or workflows.

The modification aligns well with the PR objectives, particularly in addressing potential dependency resolution issues mentioned in the linked issue #50888. By providing more resources for linux-aarch64 builds, it may help in resolving complex dependency trees or building more resource-intensive packages.

To fully leverage this change:

  1. Monitor the performance of linux-aarch64 jobs to quantify the improvement in build times and success rates.
  2. Consider updating the documentation to reflect the increased resource allocation for linux-aarch64 jobs.
  3. If this change proves beneficial, evaluate if similar resource increases could benefit other architectures in the future.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5892dce and 7f4638b.

📒 Files selected for processing (1)
  • .circleci/config.yml (1 hunks)

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/k8/build.sh (2)

16-23: Optimized thread count for different architectures

The addition of this case statement to set the THREADS variable is a good optimization:

  1. It allows for different thread counts on x86_64 (-j2) and other architectures (-j3).
  2. This can help in optimizing the build process for different system capabilities.

However, consider using the number of available CPU cores to set the thread count dynamically:

THREADS="-j$(nproc)"

This would allow for better scalability across different systems.


44-44: Cleanup of backup files

The addition of rm -rf *.bak is a good housekeeping step:

  1. It removes backup files created during the Makefile modifications.
  2. This helps keep the build directory clean and reduces unnecessary files.

To make this step more robust and verbose, consider the following modification:

find . -name "*.bak" -type f -delete -print || echo "No .bak files found to remove"

This change will:

  • Use find to locate .bak files, which is more precise than a glob pattern.
  • Print the names of removed files for better logging.
  • Provide feedback if no .bak files are found.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e604d97 and ad519f5.

📒 Files selected for processing (3)
  • .circleci/config.yml (1 hunks)
  • recipes/k8/build.sh (2 hunks)
  • recipes/k8/meta.yaml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .circleci/config.yml
  • recipes/k8/meta.yaml
🧰 Additional context used
🪛 Shellcheck
recipes/k8/build.sh

[warning] 38-38: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.

(SC2164)

🔇 Additional comments (4)
recipes/k8/build.sh (4)

10-14: Improved OS detection and Node.js version selection

The changes in this segment enhance the script's robustness and compatibility:

  1. The use of double brackets [[]] for the conditional check is a bash-specific feature that provides more robust string comparison and eliminates word splitting and pathname expansion issues.
  2. The Node.js version selection (18.20.4 for macOS, 18.19.1 for others) aligns with the PR objectives and addresses the compatibility issues mentioned in the linked issue minimap2 with tiledbvcf #50888.

These changes should help resolve the dependency conflicts between minimap2 and tiledbvcf-py on different systems.


Line range hint 32-32: Verify patch file existence and add error handling

The application of the patch file is crucial for the Azure build workaround. However, a previous review comment indicated that the patch file might be missing. To ensure robustness:

  1. Verify that the patch file ${RECIPE_DIR}/nodejs-x86_64.patch exists.
  2. Add error handling to the patch command:
if [ -f "${RECIPE_DIR}/nodejs-x86_64.patch" ]; then
    patch -p0 < "${RECIPE_DIR}/nodejs-x86_64.patch" || { echo "Patch application failed"; exit 1; }
else
    echo "Patch file not found: ${RECIPE_DIR}/nodejs-x86_64.patch"
    exit 1
fi

This will prevent silent failures if the patch file is missing or cannot be applied.

🧰 Tools
🪛 Shellcheck

[warning] 26-26: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.

(SC2164)


37-37: Dynamic thread count for make command

The modification to use "${THREADS}" in the make command is a good improvement:

  1. It utilizes the dynamically set THREADS variable based on the system architecture.
  2. This change allows for more efficient use of system resources during the build process.
  3. The use of double quotes ensures proper expansion of the variable, which is a good practice.

This change is consistent with the earlier optimization and should lead to improved build performance across different systems.


Line range hint 1-52: Overall assessment of changes

The modifications to this build script significantly improve its functionality and robustness:

  1. Enhanced OS and architecture-specific handling for Node.js versions and build processes.
  2. Improved error handling and cleanup procedures.
  3. More flexible and optimized build configurations.

These changes align well with the PR objectives, addressing the compatibility issues mentioned in the linked issue #50888. The script now better handles different environments, which should help resolve conflicts between packages like minimap2 and tiledbvcf-py.

The suggested improvements, if implemented, will further enhance the script's reliability and maintainability. Overall, these changes represent a significant step forward in resolving the reported issues and improving the build process for k8.

🧰 Tools
🪛 Shellcheck

[warning] 26-26: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.

(SC2164)

@@ -25,13 +34,14 @@ patch -p0 < ${RECIPE_DIR}/nodejs-x86_64.patch

# The provided configure script is a sh/python hybrid which boils down to one line of Python
python -c "import configure" --without-node-snapshot --without-etw --without-npm --without-inspector --without-dtrace
make -j3
make "${THREADS}"
popd
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add error handling for popd command

To address the Shellcheck warning and improve script robustness, consider adding error handling to the popd command:

popd || { echo "popd failed, the script may not be in the expected directory"; exit 1; }

This change will:

  1. Catch any failures of the popd command.
  2. Provide a meaningful error message.
  3. Exit the script if popd fails, preventing any unexpected behavior due to being in the wrong directory.

This improvement aligns with best practices for bash scripting and enhances the overall reliability of the build process.

🧰 Tools
🪛 Shellcheck

[warning] 38-38: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.

(SC2164)

@mencian
Copy link
Contributor

mencian commented Oct 1, 2024

Good news is the build passed on linux x86_64, which we couldn't before. The Abort trap: 6 build error on osx is usually temporary, so fingers crossed 🤞 the build goes all the way through this time!

@mencian
Copy link
Contributor

mencian commented Oct 2, 2024

So close, but yet so far... the build completes on osx but fails the test: bin/k8: cannot execute binary file

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 (2)
recipes/k8/build.sh (2)

1-1: LGTM, but consider portability.

The change from #!/usr/bin/env bash to #!/bin/bash is acceptable for a Conda recipe. However, for maximum portability, you might want to consider keeping the original shebang line.


12-16: LGTM: Improved conditional and version selection.

The use of double brackets [[ is a good bash practice. The different Node.js versions for macOS and other systems align with the compatibility notes in the comments above.

Consider adding a brief comment explaining why different versions are used for macOS and other systems, for better maintainability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between ad519f5 and dbe223a.

📒 Files selected for processing (2)
  • recipes/k8/build.sh (2 hunks)
  • recipes/k8/meta.yaml (3 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/k8/build.sh

[warning] 7-7: DEFAULT_LINUX_VERSION appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 41-41: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.

(SC2164)

🔇 Additional comments (11)
recipes/k8/meta.yaml (5)

43-43: LGTM! Improved documentation and metadata.

The addition of a period at the end of the summary and the inclusion of a doc_url improve the package metadata and provide better documentation for users.

Also applies to: 45-45


Line range hint 1-50: Overall, changes align well with PR objectives and improve package metadata.

The modifications in this PR successfully update the Python compatibility to >=3.8 as intended. Additionally, the changes improve platform support, enhance documentation, and refine package metadata. These updates align well with the PR objectives and contribute to the overall quality of the package.


Line range hint 48-50: LGTM! Verify compatibility with new platforms.

The addition of linux-aarch64 and osx-arm64 to additional-platforms is a positive improvement in terms of platform support.

Please verify that the package is indeed compatible with these ARM-based systems. You can check this by running:

#!/bin/bash
# Description: Check for any platform-specific code or build instructions

# Test: Search for any platform-specific code or build instructions
rg --type yaml 'aarch64|arm64' recipes/k8/
rg --type make 'aarch64|arm64' $(fd -t f 'Makefile')

13-14: LGTM! Verify the updated skip condition.

The build number increment and the updated skip condition look good. The change to skip: True # [osx and x86_64] potentially allows builds on more platforms.

Please verify that this change aligns with the package's compatibility across different platforms. Run the following script to check the package's build history:

✅ Verification successful

: The updated skip: True # [osx and x86_64] in recipes/k8/meta.yaml correctly restricts builds to OS X and x86_64 platforms while allowing successful builds on additional platforms like linux-aarch64 and osx-arm64. No further actions are required.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the build history of the k8 package across different platforms

# Test: Search for previous build configurations
rg --type yaml 'skip:.*\[.*\]' recipes/k8/

Length of output: 3641


24-25: LGTM! Verify the necessity of setuptools.

The change to python >=3.8 aligns with the PR objectives and allows compatibility with newer Python versions. The addition of setuptools is generally good practice.

Please verify if setuptools is explicitly required for building or running the package. You can check this by running:

✅ Verification successful

[/run_scripts]


[/run_scripts]


LGTM! The addition of setuptools is necessary as it is used extensively across the codebase for package building and management.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if setuptools is used in the build process

# Test: Search for setup.py or any setuptools usage in the package source
rg --type python 'setuptools' $(fd -t f 'setup\.py')

Length of output: 3641


Script:

#!/bin/bash
# Description: Verify if 'setuptools' is explicitly required in the project

# Search for 'setuptools' in setup.py, setup.cfg, pyproject.toml, and requirements files
rg --type python 'import setuptools' .
rg --type toml 'setuptools' pyproject.toml
rg --type yaml 'setuptools' requirements*.yaml
rg --type txt 'setuptools' requirements*.txt

# Additionally, check for setuptools usage in any Python files
rg --type python 'setuptools' .

Length of output: 445


Script:

#!/bin/bash
# Description: Verify if 'setuptools' is explicitly required in the project

# Find Python files and search for 'setuptools' imports or usage
fd -e py . | xargs rg 'import setuptools|from setuptools'

# Additionally, search all files for 'setuptools' keyword in case it's used in non-Python files
rg 'setuptools' .

Length of output: 57483

recipes/k8/build.sh (6)

5-5: LGTM: Proper LDFLAGS export.

The addition of export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" is correct and ensures proper linking with libraries in the Conda prefix.


19-26: LGTM, but clarification needed on thread counts.

The addition of a case statement to set the THREADS variable based on architecture is a good optimization. However, the choice of -j2 for x86_64 and -j3 for other architectures seems arbitrary.

Could you provide a brief comment explaining the reasoning behind these specific thread counts? This would help with future maintenance and understanding of the build process.


40-40: LGTM: Flexible thread count in make command.

The use of "${THREADS}" in the make command is a good improvement. It allows for flexible thread counts based on the architecture, as defined earlier in the script.


47-47: LGTM: Good cleanup practice.

The addition of rm -rf *.bak is a good cleanup step. It ensures that backup files created during Makefile modifications are removed, keeping the build directory clean.


53-53: LGTM: Proper permissions set for k8 binary.

Setting the permissions of the k8 binary to 0755 with chmod 0755 k8 is correct. This ensures that the binary has the appropriate read, write, and execute permissions for the owner, and read and execute permissions for others.


7-7: Verify usage of DEFAULT_LINUX_VERSION variable.

The DEFAULT_LINUX_VERSION variable appears to be unused in this script. If it's not used elsewhere in the build process or in external scripts, consider removing it to improve code clarity.

To check for usage of this variable in other files:

✅ Verification successful

DEFAULT_LINUX_VERSION is unused and can be removed from recipes/k8/build.sh.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for usage of DEFAULT_LINUX_VERSION in other files

# Search for DEFAULT_LINUX_VERSION in all files
rg --type-add 'recipe:*.{yaml,sh}' --type recipe 'DEFAULT_LINUX_VERSION'

Length of output: 121


Script:

#!/bin/bash
# Description: Comprehensive search for DEFAULT_LINUX_VERSION across all files

# Search for DEFAULT_LINUX_VERSION in the entire repository
rg 'DEFAULT_LINUX_VERSION'

Length of output: 75

🧰 Tools
🪛 Shellcheck

[warning] 7-7: DEFAULT_LINUX_VERSION appears unused. Verify use (or export if used externally).

(SC2034)

Copy link
Contributor

@mencian mencian left a comment

Choose a reason for hiding this comment

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

Will revisit this recipe sometime in the near future to address the bin/k8: cannot execute binary file on osx.

@mencian mencian merged commit 0b873e3 into bioconda:master Oct 3, 2024
7 checks passed
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.

minimap2 with tiledbvcf
2 participants