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

adding RDEVAL #52070

Merged
merged 32 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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
13 changes: 13 additions & 0 deletions recipes/rdeval/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o xtrace

cd "$SRC_DIR"

export CXXFLAGS="$CXXFLAGS -I$PREFIX/include"
export LDFLAGS="$LDFLAGS -L$PREFIX/lib"

make
install -v -m 0755 build/bin/rdeval "$PREFIX/bin/rdeval"
34 changes: 34 additions & 0 deletions recipes/rdeval/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% set name = "rdeval" %}
{% set version = "0.0.2" %}

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

source:
url: https://github.com/vgl-hub/{{ name }}/releases/download/v{{ version }}/{{ name }}.v{{ version }}-with_submodules.zip
sha256: 56c2f4d7d2c22b27d1b380dc41b81cc77a2d97c792a69b9360bed9e0027bac4d
patches:
- quote.patch

requirements:
build:
- {{ compiler('cxx') }}
- make
- zlib
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 runtime dependencies section

The recipe is missing a run section under requirements. Since you're using zlib during build, it's likely needed at runtime too.

Add the following section:

 requirements:
   build:
     - {{ compiler('cxx') }}
     - make
     - zlib
+  host:
+    - zlib
+  run:
+    - zlib
📝 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
requirements:
build:
- {{ compiler('cxx') }}
- make
- zlib
requirements:
build:
- {{ compiler('cxx') }}
- make
host:
- zlib
run:
- zlib


build:
number: 0
run_exports:
- {{ pin_subpackage(name|lower, max_pin="x.x") }}

test:
commands:
- ${PREFIX}/bin/rdeval --help
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

Enhance test coverage

The current test only verifies that the help command works. Consider adding more comprehensive tests:

  1. Test basic functionality with sample input
  2. Verify output format
  3. Test error handling

Would you like assistance in generating additional test commands based on the tool's functionality?


about:
home: https://github.com/vgl-hub/{{ name }}
summary: A general purpose, multithreaded read analysis and manipulation tool.
license: MIT
license_file: LICENSE
license_url: https://github.com/vgl-hub/{{ name }}/blob/main/LICENSE
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 file verified and README requires a detailed Description section

  • The LICENSE file exists and is compliant with the MIT License.
  • README.md lacks a detailed Description section as recommended.
🔗 Analysis chain

Verify license file and update summary

  1. Please verify that the LICENSE file exists in the source package.
  2. Consider expanding the summary to mention:
    • The specific types of read analysis it supports
    • Its relevance to bioinformatics (since this is for Bioconda)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify license file existence and content
gh api repos/vgl-hub/rdeval/contents/LICENSE --jq '.content' | base64 -d

# Check if there's a more detailed description in README
gh api repos/vgl-hub/rdeval/contents/README.md --jq '.content' | base64 -d | grep -A 5 "^#.*Description"

Length of output: 298


Script:

#!/bin/bash
# Verify license file existence and content without using base64
gh api repos/vgl-hub/rdeval/contents/LICENSE --raw

# Check if there's a more detailed description in README
gh api repos/vgl-hub/rdeval/contents/README.md --raw | grep -A 5 "^#.*Description"

Length of output: 2865


Script:

#!/bin/bash
# Verify license file existence and content using jq to decode base64
gh api repos/vgl-hub/rdeval/contents/LICENSE --jq '.content | @base64d'

# Check if there's a more detailed description in README using jq to decode and grep for keywords
gh api repos/vgl-hub/rdeval/contents/README.md --jq '.content | @base64d' | grep -A 5 "^#.*Description"

Length of output: 1244

25 changes: 25 additions & 0 deletions recipes/rdeval/quote.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/Makefile b/Makefile
index 5823f28..7e1295c 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ BINDIR := $(BUILD)/.o

LDFLAGS := -pthread
LIBS = -lz
+-L/usr/lib/x86_64-linux-gnu -lz
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

Remove hard-coded library path and fix duplicate linker flags

The current changes introduce two issues:

  1. Hard-coding /usr/lib/x86_64-linux-gnu path breaks cross-platform compatibility and violates Conda's build practices
  2. The -lz flag is duplicated

Apply this fix to maintain portability and clean up duplicates:

 LDFLAGS := -pthread
-LIBS = -lz
--L/usr/lib/x86_64-linux-gnu -lz
+LIBS = -lz

Instead of hard-coding the library path, rely on Conda's build environment variables and the proper dependency specification in meta.yaml.

📝 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
LIBS = -lz
+-L/usr/lib/x86_64-linux-gnu -lz
LDFLAGS := -pthread
LIBS = -lz


OBJS := main input reads
BINS := $(addprefix $(BINDIR)/, $(OBJS))
diff --git a/src/reads.cpp b/src/reads.cpp
index 866f49b..ac714cf 100644
--- a/src/reads.cpp
+++ b/src/reads.cpp
@@ -14,7 +14,7 @@
#include "functions.h" // global functions
#include "stream-obj.h"

-#include "zlib.h"
+#include <zlib.h>
#include "zstream/zstream_common.hpp"
#include "zstream/ozstream.hpp"
#include "zstream/ozstream_impl.hpp"
Loading