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 atlas to 2.0.0-rc.6 #52030

Merged
merged 6 commits into from
Nov 12, 2024
Merged

Update atlas to 2.0.0-rc.6 #52030

merged 6 commits into from
Nov 12, 2024

Conversation

glis-glis
Copy link
Contributor

Update atlas to 2.0.0-rc.6:
https://atlaswiki.netlify.app/


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 10, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces significant modifications to the build.sh script and the meta.yaml file for the atlas package. The build.sh script has transitioned from a make-based build system to a CMake/Ninja-based approach, implementing a cmake command that configures the build environment with specific options, including Conda integration and compiler flags. The script now includes error handling to exit on ninja command failure and ensures the atlas binary is executable post-installation.

In the meta.yaml file, the package version has been updated from "0.9.9" to "2.0.0", and the source URL has been adjusted to a new release candidate. The build number has been reset, and a new run_exports section has been added. The build and host requirements have been extensively revised, replacing several old dependencies with new ones, including cmake, git, and ninja. The test commands have been expanded, and the package metadata such as homepage and license has been updated, reflecting a comprehensive overhaul of the package's configuration and dependencies.

Possibly related PRs

  • Update hictk to v2.0.0 #50881: The changes in the build.sh script for hictk involve modifications to the CMake build process, similar to the transition from make to ninja in the build.sh of the main PR.
  • mashmap: add aarch64 build #51161: The build.sh modifications in the mashmap package include setting CXXFLAGS for macOS, which aligns with the conditional handling for macOS in the main PR's build.sh.
  • add meta #51349: The introduction of a new build.sh in the meta package reflects a similar approach to building and installing software as seen in the main PR's build.sh, which also utilizes CMake for configuration.
  • Update meta-neuro version 1.0.0 #51826: The updates in the meta-neuro package's build.sh include enhancements for error handling and functionality, paralleling the improvements made in the main PR's build.sh for better configuration management.
  • Add amplici package in bioconda #51847: The build.sh for the amplici package includes CMake configurations that are similar to those in the main PR, particularly in how it sets up build parameters based on the operating system.

Suggested reviewers

  • bgruening

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 (3)
recipes/atlas/build.sh (1)

14-16: Consider using install command for better error handling.

While the current implementation works, using the install command would provide better error handling and permission setting in one step.

Consider this alternative:

 mkdir -p ${PREFIX}/bin
-cp atlas ${PREFIX}/bin || exit 1
-chmod +x ${PREFIX}/bin/atlas
+install -m 755 atlas ${PREFIX}/bin || exit 1
recipes/atlas/meta.yaml (2)

17-44: Consider using Jinja2 variable for repeated sysroot version.

The sysroot version "2.17" is repeated in multiple sections. Consider using a Jinja2 variable to improve maintainability:

+{% set sysroot_version = "2.17" %}
 requirements:
   build:
     - {{ compiler('cxx') }}
     - cmake
     - git
     - ninja
-    - sysroot_linux-64 =2.17 # [linux]
+    - sysroot_linux-64 ={{ sysroot_version }} # [linux]
   host:
     ...
-    - sysroot_linux-64 =2.17 # [linux]
+    - sysroot_linux-64 ={{ sysroot_version }} # [linux]
   run:
     ...
-    - sysroot_linux-64 =2.17 # [linux]
+    - sysroot_linux-64 ={{ sysroot_version }} # [linux]

47-54: Consider improving test command reliability.

A few suggestions for the test commands:

  1. The grep "successfully" test is fragile. Consider using atlas --version or a more specific check.
  2. The cleanup command's || exit 1 is redundant as any non-zero exit in the test section will fail the build.
 test:
   commands:
-    - atlas | grep "successfully"
+    - atlas --version
     - atlas simulate
     - atlas HKY85 --bam ATLAS_simulations.bam --fasta ATLAS_simulations.fasta
     - atlas GLF --bam ATLAS_simulations.bam
     - atlas saf --glf ATLAS_simulations.glf.gz --fasta ATLAS_simulations.fasta
     - atlas majorMinor --glf ATLAS_simulations.glf.gz
-    - rm ATLAS_* *.parameters saf.saf.* || exit 1
+    - rm ATLAS_* *.parameters saf.saf.*
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 5d9fc96 and 033eea6.

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

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

(syntax)

🔇 Additional comments (3)
recipes/atlas/build.sh (1)

12-12: LGTM!

Good practice to include error handling with the ninja build command.

recipes/atlas/meta.yaml (2)

12-14: LGTM! Proper version pinning implemented.

The run_exports section with pin_subpackage correctly implements the PR guidelines for avoiding ABI breakage.


57-64: Verify license change from GPLv3 to MPL-2.0.

Please confirm that this license change is intentional and properly documented in the upstream repository.

The addition of ARM platform support is a welcome improvement for broader compatibility.

Comment on lines 3 to 10
cmake . -GNinja \
-DCONDA=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_CXX_FLAGS="-D_LIBCPP_DISABLE_AVAILABILITY" \
-DCMAKE_LIBRARY_PATH=${CONDA_PREFIX}/lib \
-DCMAKE_INCLUDE_PATH=${CONDA_PREFIX}/include \
-DCMAKE_INSTALL_PREFIX=$PREFIX
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 cmake configuration.

While the cmake configuration looks correct, it's missing error handling. Also, it would be good to verify the required environment variables.

Consider applying this improvement:

+# Verify required environment variables
+if [ -z "${CXX}" ]; then
+    echo "Error: CXX environment variable is not set"
+    exit 1
+fi
+if [ -z "${CONDA_PREFIX}" ]; then
+    echo "Error: CONDA_PREFIX environment variable is not set"
+    exit 1
+fi
+
 cmake . -GNinja \
     -DCONDA=ON \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_CXX_COMPILER=${CXX} \
     -DCMAKE_CXX_FLAGS="-D_LIBCPP_DISABLE_AVAILABILITY" \
     -DCMAKE_LIBRARY_PATH=${CONDA_PREFIX}/lib \
     -DCMAKE_INCLUDE_PATH=${CONDA_PREFIX}/include \
-    -DCMAKE_INSTALL_PREFIX=$PREFIX
+    -DCMAKE_INSTALL_PREFIX=$PREFIX || exit 1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cmake . -GNinja \
-DCONDA=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_CXX_FLAGS="-D_LIBCPP_DISABLE_AVAILABILITY" \
-DCMAKE_LIBRARY_PATH=${CONDA_PREFIX}/lib \
-DCMAKE_INCLUDE_PATH=${CONDA_PREFIX}/include \
-DCMAKE_INSTALL_PREFIX=$PREFIX
# Verify required environment variables
if [ -z "${CXX}" ]; then
echo "Error: CXX environment variable is not set"
exit 1
fi
if [ -z "${CONDA_PREFIX}" ]; then
echo "Error: CONDA_PREFIX environment variable is not set"
exit 1
fi
cmake . -GNinja \
-DCONDA=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_CXX_FLAGS="-D_LIBCPP_DISABLE_AVAILABILITY" \
-DCMAKE_LIBRARY_PATH=${CONDA_PREFIX}/lib \
-DCMAKE_INCLUDE_PATH=${CONDA_PREFIX}/include \
-DCMAKE_INSTALL_PREFIX=$PREFIX || exit 1

Comment on lines +1 to +9
{% set version = "2.0.0" %}

package:
package:
name: atlas
version: {{ version }}

source:
url: https://bitbucket.org/wegmannlab/atlas/get/{{ version }}.tar.gz
sha256: 7b65eae5ab7ff439accd53febf8caa15ad9d8230278eee31fd5c2e95bf021990
url: https://bitbucket.org/wegmannlab/atlas/get/{{ version }}-rc.6.tar.gz
sha256: 017235049dddfac88fedf16bfc444cf38aed25ac84df084dc555736b5d48d6a3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Version string should include release candidate suffix.

The package version is set to "2.0.0" but the source URL downloads "2.0.0-rc.6". This mismatch could cause issues with version tracking and dependencies. Consider updating the version to match exactly:

-{% set version = "2.0.0" %}
+{% set version = "2.0.0-rc.6" %}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{% set version = "2.0.0" %}
package:
package:
name: atlas
version: {{ version }}
source:
url: https://bitbucket.org/wegmannlab/atlas/get/{{ version }}.tar.gz
sha256: 7b65eae5ab7ff439accd53febf8caa15ad9d8230278eee31fd5c2e95bf021990
url: https://bitbucket.org/wegmannlab/atlas/get/{{ version }}-rc.6.tar.gz
sha256: 017235049dddfac88fedf16bfc444cf38aed25ac84df084dc555736b5d48d6a3
{% set version = "2.0.0-rc.6" %}
package:
name: atlas
version: {{ version }}
source:
url: https://bitbucket.org/wegmannlab/atlas/get/{{ version }}.tar.gz
sha256: 017235049dddfac88fedf16bfc444cf38aed25ac84df084dc555736b5d48d6a3
🧰 Tools
🪛 yamllint

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

(syntax)

@bgruening
Copy link
Member

Should we maybe wait until the final release?

@glis-glis
Copy link
Contributor Author

Should we maybe wait until the final release?

Actually, it is the other way around. We plan to drop the "release candidate" as soon as installation through conda works. v2.0.0-rc.6 is already much more stable than v0.9.9, which is on conda.

@glis-glis
Copy link
Contributor Author

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Nov 12, 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: 2

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

48-55: Consider improving test command error handling.

While the test commands cover various functionalities, they might benefit from better error handling. Consider adding set -e or || exit 1 to each command to ensure failures are caught.

 test:
   commands:
-    - atlas | grep "successfully"
-    - atlas simulate
-    - atlas HKY85 --bam ATLAS_simulations.bam --fasta ATLAS_simulations.fasta
-    - atlas GLF --bam ATLAS_simulations.bam
-    - atlas saf --glf ATLAS_simulations.glf.gz --fasta ATLAS_simulations.fasta
-    - atlas majorMinor --glf ATLAS_simulations.glf.gz
+    - atlas | grep "successfully" || exit 1
+    - atlas simulate || exit 1
+    - atlas HKY85 --bam ATLAS_simulations.bam --fasta ATLAS_simulations.fasta || exit 1
+    - atlas GLF --bam ATLAS_simulations.bam || exit 1
+    - atlas saf --glf ATLAS_simulations.glf.gz --fasta ATLAS_simulations.fasta || exit 1
+    - atlas majorMinor --glf ATLAS_simulations.glf.gz || exit 1
     - rm ATLAS_* *.parameters saf.saf.* || exit 1
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 033eea6 and 27d7516.

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

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

(syntax)

🔇 Additional comments (1)
recipes/atlas/meta.yaml (1)

12-14: LGTM! Good practice using run_exports.

The addition of run_exports with appropriate pinning will help prevent ABI breakage, which is crucial for a major version upgrade.

- cmake
- git
- ninja
- sysroot_linux-64 =2.17 # [linux]
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

Remove duplicate sysroot_linux-64 dependency.

The sysroot_linux-64 package appears in both build and host sections. It should typically only be in the build section.

 requirements:
   build:
     - {{ compiler('cxx') }}
     - cmake
     - git
     - ninja
     - sysroot_linux-64 =2.17  # [linux]
   host:
     - armadillo
     - fmt
     - htslib
     - lapack
     - libgomp  # [linux]
     - llvm-openmp  # [osx]
     - nlohmann_json
     - openblas
-    - sysroot_linux-64 =2.17  # [linux]
     - jsoncpp
     - zlib

Also applies to: 32-32

license: GPLv3
summary: "ATLAS, a suite of methods to accurately genotype and estimate genetic diversity"
home: https://atlaswiki.netlify.app
license: MPL-2.0
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

License change was not verified successfully.

  • License file does not contain Mozilla license text.
🔗 Analysis chain

Verify license change from GPLv3 to MPL-2.0.

The license has been changed from GPLv3 to MPL-2.0. This is a significant change that should be verified against the source repository.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the license in the source repository
# Expected: Should find MPL-2.0 license file or header

# Download and check the source
curl -sL https://bitbucket.org/wegmannlab/atlas/get/2.0.0-rc.6.tar.gz | \
  tar xz --to-stdout "*/LICENSE" "*/license*" "*/COPYING" 2>/dev/null | \
  grep -i "mozilla" || echo "License file not found or doesn't contain Mozilla license text"

# Check source files for license headers
curl -sL https://bitbucket.org/wegmannlab/atlas/get/2.0.0-rc.6.tar.gz | \
  tar xz --to-stdout "*/src/*.cpp" "*/src/*.hpp" 2>/dev/null | \
  grep -i "mozilla" || echo "Source files don't contain Mozilla license headers"

Length of output: 538

@mencian mencian merged commit 8c99a1f into bioconda:master Nov 12, 2024
6 checks passed
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.

4 participants