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 hictk to v2.0.0 #50881

Merged
merged 48 commits into from
Oct 20, 2024
Merged

Update hictk to v2.0.0 #50881

merged 48 commits into from
Oct 20, 2024

Conversation

robomics
Copy link
Contributor

Describe your pull request here


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

@robomics robomics marked this pull request as draft September 23, 2024 22:07
@robomics robomics closed this Sep 26, 2024
@robomics robomics reopened this Sep 26, 2024
@robomics robomics marked this pull request as ready for review October 19, 2024 21:47
@robomics
Copy link
Contributor Author

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built are ready for inspection:

Arch Package Zip File / Repodata CI Instructions
linux-64 hictk-2.0.0-hc239f70_0.tar.bz2 LinuxArtifacts.zip Azure
showYou may also use conda to install after downloading and extracting the zip file. From the LinuxArtifacts directory: conda install -c ./packages <package name>
osx-64 hictk-2.0.0-h29f9390_0.tar.bz2 OSXArtifacts.zip Azure
showYou may also use conda to install after downloading and extracting the zip file. From the OSXArtifacts directory: conda install -c ./packages <package name>
osx-arm64 hictk-2.0.0-h6b3851f_0.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/8cb386a9-813b-4d21-851c-677d92cb3250/artifacts/0/tmp/artifacts/packages <package name>
linux-aarch64 hictk-2.0.0-h9befe9b_0.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/900e7135-9e06-4dfb-be03-a036840d2349/artifacts/0/tmp/artifacts/packages <package name>

Docker image(s) built:

Package Tag CI Install with docker
hictk 2.0.0--hc239f70_0 Azure
showImages for Azure are in the LinuxArtifacts zip file above.gzip -dc LinuxArtifacts/images/hictk:2.0.0--hc239f70_0.tar.gz | docker load

@robomics
Copy link
Contributor Author

robomics commented Oct 19, 2024

@BiocondaBot please add label

Supersedes #51500.

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 19, 2024
Copy link
Contributor

coderabbitai bot commented Oct 19, 2024

📝 Walkthrough

Walkthrough

The pull request introduces several modifications to enhance the functionality of the build.sh script and related files in the hictk recipe. Key changes include updating the CMAKE_BUILD_PARALLEL_LEVEL to utilize the ${CPU_COUNT} variable for parallel builds, adding macOS-specific CXXFLAGS, and replacing certain tools with symbolic links. The conan_profile variable is set to 'clang' for non-Darwin hosts, and a patch is now applied to conanfile.Dockerfile.py instead of conanfile.py. The conan install command has been updated accordingly. Additionally, a new CMake option for fuzzy testing is introduced, and the timeout for ctest is increased. A new Conan profile configuration file for Clang is added, specifying settings such as architecture and C++ standard. The conanfile.py has been removed, streamlining dependency management, while the meta.yaml file reflects a major version update and numerous dependency changes. Finally, the run_test.sh script has been modified to enhance testing functionality and streamline processes.

Possibly related PRs

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 (6)
recipes/hictk/conan_profiles/clang (1)

1-8: LGTM with suggestions for improved compatibility and portability.

The Conan profile configuration for Clang looks good overall and is well-structured. It sets up a modern C++17 build environment for x86_64 Linux systems using Clang. However, there are a couple of points to consider:

  1. Compiler version: The specified Clang version (18) is very recent. This might cause compatibility issues on systems with older Clang versions. Consider using a more widely available version or providing fallback options.

  2. Portability: The configuration is specific to Linux and x86_64 architecture. If cross-platform compatibility is a goal, you might want to create additional profiles for other operating systems and architectures.

To improve compatibility and portability, consider the following suggestions:

  1. Use a more conservative Clang version or make it configurable:
-compiler.version=18
+compiler.version=${CLANG_VERSION:-10}
  1. Create separate profiles for different operating systems and architectures, or use variables:
-arch=x86_64
-os=Linux
+arch=${CONAN_ARCH:-x86_64}
+os=${CONAN_OS:-Linux}

These changes would make the profile more flexible and easier to adapt to different environments.

recipes/hictk/run_test.sh (5)

8-15: Excellent addition of command checks and dependency display!

The new code segment effectively verifies the existence of the hictk command and displays its shared library dependencies. This is crucial for debugging and ensuring proper installation.

A minor suggestion for improvement:

Consider adding error handling for the which hictk command. If hictk is not found, the script will continue, potentially causing issues later. You could add:

if ! which hictk &>/dev/null; then
    echo "Error: hictk command not found"
    exit 1
fi

This will ensure the script exits early if hictk is not available.


22-26: Good update to use .zst format and appropriate extraction method!

The change to use a .zst file format and the corresponding update to the extraction method using zstdcat is a good improvement. It maintains data integrity checks while potentially improving decompression speed.

A suggestion for improvement:

Consider adding error handling for the curl download and zstdcat extraction. For example:

if ! curl -L "$url" -o hictk_test_dataset.tar.zst; then
    echo "Error: Failed to download test dataset"
    exit 1
fi

if ! zstdcat hictk_test_dataset.tar.zst | tar -xf -; then
    echo "Error: Failed to extract test dataset"
    exit 1
fi

This will help catch and report any issues during the download or extraction process.


28-29: Good practice to use pip for installing the test suite!

Using pip to install the test suite from a local directory is a clean and standard approach. This ensures that the correct version of the test suite is always used.

A suggestion for improvement:

Consider pinning the version of the test suite or using a requirements file to ensure reproducibility. For example:

pip install test/integration==1.0.0  # Replace with actual version

Or create a requirements.txt file in the test/integration directory and install using:

pip install -r test/integration/requirements.txt

This will help maintain consistency across different environments and prevent potential issues from unexpected updates.


32-38: Excellent update to the integration test command!

The new hictk_integration_suite command is more comprehensive and flexible. The use of ${CPU_COUNT} for threading and the --do-not-copy-binary flag are particularly good optimizations.

A suggestion for improvement:

Consider adding error handling for the integration test command. For example:

if ! hictk_integration_suite \
  "$(which hictk)" \
  test/integration/config.toml \
  --data-dir test/data \
  --do-not-copy-binary \
  --threads "${CPU_COUNT}" \
  --result-file results.json; then
    echo "Error: Integration tests failed"
    exit 1
fi

This will help catch and report any issues during the integration test execution.


40-41: Good addition of result output!

The separator and the display of the results.json contents provide clear and immediate feedback on the test execution.

A suggestion for improvement:

Consider adding a simple analysis of the results. For example:

echo "Test Results Summary:"
jq '.summary' results.json
echo "Failed Tests (if any):"
jq '.failed_tests[]?' results.json

This assumes that results.json has a structure with 'summary' and 'failed_tests' fields. Adjust according to the actual structure of your results file. This will provide a quick overview of the test results, making it easier to spot any issues at a glance.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 7f0cbe6 and a99416d.

📒 Files selected for processing (7)
  • recipes/hictk/build.sh (4 hunks)
  • recipes/hictk/conan_profiles/clang (1 hunks)
  • recipes/hictk/conanfile.Dockerfile.py.patch (1 hunks)
  • recipes/hictk/conanfile.py.patch (0 hunks)
  • recipes/hictk/conda_build_config.yaml (1 hunks)
  • recipes/hictk/meta.yaml (3 hunks)
  • recipes/hictk/run_test.sh (1 hunks)
💤 Files with no reviewable changes (1)
  • recipes/hictk/conanfile.py.patch
🧰 Additional context used
🔇 Additional comments (18)
recipes/hictk/conda_build_config.yaml (1)

1-8: LGTM! Compiler configuration looks good.

The compiler configuration for Linux is well-defined and uses up-to-date versions of clang/clangxx (version 18). This is consistent with modern C/C++ development practices and should provide good support for recent language features and optimizations.

To ensure this change aligns with the project's overall configuration and doesn't introduce conflicts, please run the following verification:

This script will help identify any potential conflicts or inconsistencies with other parts of the project.

recipes/hictk/run_test.sh (1)

Line range hint 1-41: Overall excellent improvements to the test script!

The changes to this script significantly enhance its functionality, robustness, and output clarity. Key improvements include:

  1. Better verification of the hictk command and its dependencies.
  2. Updated file format (.zst) for potentially faster decompression.
  3. More comprehensive integration testing with optimized resource usage.
  4. Clearer output of test results.

These changes align well with the update to hictk v2.0.0 mentioned in the PR title and contribute to a more reliable testing process.

The script is approved for merging, subject to addressing the minor suggestions provided in the previous comments.

recipes/hictk/meta.yaml (7)

10-10: Build number reset is correct.

Resetting the build number to 0 for a new version release is the proper practice.


44-46: Run dependencies correctly updated to match host dependencies.

The run dependencies have been properly updated to match the host dependencies, ensuring correct runtime behavior.


59-60: Test requirements update looks good. Verify the test suite.

The addition of Python, pip, and zstd as test requirements suggests new Python-based tests and compression functionality testing. This is a positive change that likely improves the test coverage.

Please confirm that the test suite has been updated to use these new requirements:

#!/bin/bash
# Check for Python usage in the test scripts
grep -R 'python' recipes/hictk/test*
# Check for zstd usage in the test scripts
grep -R 'zstd' recipes/hictk/test*

Also applies to: 63-63


66-66: Test source files update simplifies the recipe. Verify directory contents.

Updating the test source files to include the entire test/integration/ directory simplifies the recipe and makes it easier to maintain as new test files are added.

Please confirm that all necessary test files are included in the test/integration/ directory:

#!/bin/bash
# List contents of the test/integration directory
ls -R test/integration/

55-55: Documentation URL update looks good. Verify the link.

The change to a ReadTheDocs URL suggests improved and more comprehensive documentation, which is beneficial for users.

Please confirm that the new documentation URL is active and contains up-to-date information:


37-39: Host dependency updates look good. Verify impact on build process.

The addition of libarchive >=3 and the update to libdeflate >=1 suggest changes in the package's compression or archiving capabilities. These changes may affect the build process.

Please confirm that these new host dependencies are correctly linked during the build process:


2-3: Version update looks good. Verify the SHA256 checksum.

The version bump from 1.0.0 to 2.0.0 indicates a major release. Ensure that all breaking changes are documented and that downstream dependencies are updated accordingly.

Please confirm that the SHA256 checksum is correct for the new version:

recipes/hictk/build.sh (7)

5-5: Set parallel build levels using CPU_COUNT variable

The build now utilizes the available CPU cores by setting CMAKE_BUILD_PARALLEL_LEVEL and CTEST_PARALLEL_LEVEL to ${CPU_COUNT}, improving build efficiency.


22-23: Add CXXFLAGS to support newer C++ features on macOS

Adding -D_LIBCPP_DISABLE_AVAILABILITY to CXXFLAGS enables the use of newer C++ features with older SDKs on macOS, which is appropriate in this context.


35-35: Confirm compatibility with Clang compiler on Linux

Setting conan_profile='clang' for non-Darwin hosts changes the default compiler from GCC to Clang on Linux. Since GCC is typically the default compiler on Linux in conda environments, please verify that using Clang is intentional and ensure that Clang is available and compatible in the build environment.


42-43: Update patch target to conanfile.Dockerfile.py

The script now patches conanfile.Dockerfile.py instead of conanfile.py, aligning with the changes in the dependency management approach. Please confirm that the patch file conanfile.Dockerfile.py.patch corresponds to the new target.


46-46: Update conan install to use conanfile.Dockerfile.py

The conan install command correctly references conanfile.Dockerfile.py, consistent with the updated patch target and new dependency management.


63-63: Disable fuzzy testing in CMake configuration

Adding -DHICTK_ENABLE_FUZZY_TESTING=OFF disables fuzzy testing during the build, which may reduce build time or resolve compatibility issues. Ensure that disabling fuzzy testing does not omit important tests necessary for verifying the software's correctness.


80-80: Increase ctest timeout to 180 seconds

Extending the test timeout from 100 to 180 seconds allows longer tests to complete without timing out, improving test reliability on slower systems or with more extensive test suites.

recipes/hictk/conanfile.Dockerfile.py.patch (2)

8-29: Verify that removed dependencies are no longer required

The removal of multiple dependencies from the requirements method simplifies the dependency list. Please ensure that these dependencies are not used elsewhere in the codebase to prevent potential build or runtime errors.

You can run the following script to search for references to the removed dependencies:

#!/bin/bash
# Description: Search the codebase for references to the removed dependencies.

dependencies=(
  "bzip2"
  "cli11"
  "fast_float"
  "fmt"
  "hdf5"
  "highfive"
  "libarchive"
  "libdeflate"
  "lz4"
  "lzo"
  "nlohmann_json"
  "spdlog"
  "tomlplusplus"
  "xz_utils"
  "zstd"
  "zlib"
)

for dep in "${dependencies[@]}"; do
  echo "Searching for references to $dep..."
  rg "$dep" || true
done

33-66: Ensure default configurations meet project requirements

By removing custom configuration options in the configure method, the project now relies on the default settings of the dependencies. Verify that the default configurations align with the project's requirements and that no necessary functionality is lost.

You can inspect the default options of the affected dependencies using the following script:

recipes/hictk/meta.yaml Show resolved Hide resolved
recipes/hictk/build.sh Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants