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 vcf-validator to v0.10.0 #51421

Merged
merged 8 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions recipes/vcf-validator/LICENSE_ODB

This file was deleted.

19 changes: 15 additions & 4 deletions recipes/vcf-validator/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
mkdir -p ${PREFIX}/bin
#!/bin/bash

mv vcf_validator* ${PREFIX}/bin/vcf_validator
mv vcf_assembly_checker* ${PREFIX}/bin/vcf_assembly_checker
# Set c++ to version 11
export CXXFLAGS="-std=c++11 ${CXXFLAGS}"

chmod 755 ${PREFIX}/bin/vcf_assembly_checker ${PREFIX}/bin/vcf_validator
mkdir build || { echo "Failed to create build directory" >&2; exit 1; }
cd build || { echo "Failed to go into build directory" >&2; exit 1; }
cmake -G "Unix Makefiles" ..
make -j2 || { echo "Build failed" >&2; exit 1; }
cd .. || { echo "Failed to return to parent directory" >&2; exit 1; }
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

Use dynamic CPU count for parallel compilation

Instead of hardcoding -j2, use ${CPU_COUNT} to utilize the available CPU cores. This makes the build process more efficient on systems with different numbers of cores.

Apply this change:

-make -j2 || { echo "Build failed" >&2; exit 1; }
+make -j${CPU_COUNT} || { echo "Build failed" >&2; 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
make -j2 || { echo "Build failed" >&2; exit 1; }
make -j${CPU_COUNT} || { echo "Build failed" >&2; exit 1; }

if ! ./build/bin/test_validation_suite; then
echo "Validation suite failed" >&2
exit 1
fi
cp build/bin/vcf_validator ${PREFIX}/bin
Comment on lines +11 to +14
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

Check for the existence of the validation suite before execution

Before running ./build/bin/test_validation_suite, ensure that the file exists to avoid execution errors.

Apply this change:

+if [ ! -f ./build/bin/test_validation_suite ]; then
+  echo "Validation suite executable not found" >&2
+  exit 1
+fi
 if ! ./build/bin/test_validation_suite; then
   echo "Validation suite failed" >&2
   exit 1
 fi
📝 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
if ! ./build/bin/test_validation_suite; then
echo "Validation suite failed" >&2
exit 1
fi
if [ ! -f ./build/bin/test_validation_suite ]; then
echo "Validation suite executable not found" >&2
exit 1
fi
if ! ./build/bin/test_validation_suite; then
echo "Validation suite failed" >&2
exit 1
fi

cp build/bin/vcf_assembly_checker ${PREFIX}/bin
echo "Done with vcf-validator"
Comment on lines +15 to +16
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

Add error handling for copying binaries

Currently, the cp commands lack error handling. If the copy operation fails, the script will proceed without indication of an error.

Apply this change:

-cp build/bin/vcf_validator ${PREFIX}/bin
-cp build/bin/vcf_assembly_checker ${PREFIX}/bin
+cp build/bin/vcf_validator ${PREFIX}/bin || { echo "Failed to copy vcf_validator" >&2; exit 1; }
+cp build/bin/vcf_assembly_checker ${PREFIX}/bin || { echo "Failed to copy vcf_assembly_checker" >&2; 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
cp build/bin/vcf_validator ${PREFIX}/bin
cp build/bin/vcf_assembly_checker ${PREFIX}/bin
cp build/bin/vcf_validator ${PREFIX}/bin || { echo "Failed to copy vcf_validator" >&2; exit 1; }
cp build/bin/vcf_assembly_checker ${PREFIX}/bin || { echo "Failed to copy vcf_assembly_checker" >&2; exit 1; }

50 changes: 31 additions & 19 deletions recipes/vcf-validator/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
{% set name = "vcf-validator" %}
{% set version = "0.9.7" %}
{% set version = "0.10.0" %}

package:
name: {{ name }}
name: {{ name|lower }}
version: {{ version }}

source:
- url: https://github.com/EBIvariation/vcf-validator/releases/download/v{{ version }}/vcf_validator_linux # [linux]
sha256: 49aef4841cd7d0913ba12020465830b834ccfe20f2094222c8c41511f6c801ac # [linux]
- url: https://github.com/EBIvariation/vcf-validator/releases/download/v{{ version }}/vcf_assembly_checker_linux # [linux]
sha256: a9a00303c05c1fb5a33a5bd1f5c74fb5d8097f92a1f3ee815e19c137c0e26f13 # [linux]
- url: https://github.com/EBIvariation/vcf-validator/releases/download/v{{ version }}/vcf_validator_macos_x64 # [osx and x86]
sha256: 0b97a34fac6cf23951ffc33cdfb7b0602a89b4d5390564c8d816cb83019a3ffc # [osx and x86]
- url: https://github.com/EBIvariation/vcf-validator/releases/download/v{{ version }}/vcf_assembly_checker_macos_x64 # [osx and x86]
sha256: 1b5404a4239da9f5e5e39bece975e4eea55d87c486121a076226829b79477bc3 # [osx and x86]
url: https://github.com/EBIvariation/vcf-validator/archive/refs/tags/v{{ version }}.tar.gz
sha256: b46117700445644e6fc5a6d2655b477902c67aba0e7abe8a62df6cb49f923fff

build:
script:
number: 0
run_exports:
- {{ pin_subpackage(name, max_pin="x.x") }}
- {{ pin_subpackage("vcf-validator", max_pin="x.x") }}

requirements:
host:
- libboost-devel
- libcurl
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- make
- cmake >=2.8
- libboost-devel
- libtool
- zstd
- c-ares
- libcurl
- openssl
- bzip2
- libzlib
run:
- zstd
- libcurl

test:
commands:
Expand All @@ -28,17 +43,14 @@ test:

about:
home: https://github.com/EBIVariation/vcf-validator
summary: EBI EVA - Validation tool to ensure VCF specification compliance
summary: EBI EVA - Validation tool for VCF file format compliance
license: Apache-2.0
license_file:
- LICENSE
- LICENSE_ODB
license_file: LICENSE

extra:
additional-platforms:
- osx-arm64
recipe-maintainers:
- apriltuesday
- tcezard
- ebi-variation
skip-lints:
- should_be_noarch_generic
- should_not_be_noarch_source
- ebi-variation
Loading