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

add flexiformatter version 1.0.2 #51633

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Conversation

ljwharbers
Copy link
Contributor

Add flexiformatter version 1.0.2


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 Oct 24, 2024

Warning

Rate limit exceeded

@ljwharbers has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Files that changed from the base of the PR and between 9a77541 and 85931ef.

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces a new metadata file, recipes/meta.yaml, for the flexiformatter package, version 1.0.2. This file includes essential information such as the package name, version, and source URL for downloading from PyPI, along with a SHA256 checksum for integrity verification. The entry point for the application is specified as flexiformatter.reformat_flexiplex_tags:app, indicating the main function of the package. It is categorized as architecture-independent and includes installation instructions using pip. The requirements section outlines necessary dependencies for both the host and runtime environments, including Python, pip, setuptools, and libraries like typer, simplesam, and samtools. The test section provides import statements and commands to verify functionality. Additionally, the about section includes the project's homepage, a brief summary, licensing details, and a reference to the license file. The extra section lists the recipe maintainers for the package.

Possibly related PRs

  • Update flexi-formatter to 0.0.4 #51400: This PR updates the flexi-formatter package, which is directly related to the main PR that introduces the flexiformatter package, as both involve similar functionalities and package naming conventions.
  • Update flexi-formatter to 1.0.1 #51434: This PR also updates the flexi-formatter package, further connecting it to the main PR by addressing the same package and its versioning.

Suggested labels

please review & merge, new version

Suggested reviewers

  • martin-g

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: 1

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

18-19: Consider removing run_exports section.

The run_exports section is typically used for compiled libraries (C/C++) to ensure ABI compatibility. For a pure Python package marked as noarch: python, this section is unnecessary and can be removed.

-  run_exports:
-    - {{ pin_subpackage(name|lower, max_pin='x.x') }}

32-41: Enhance test coverage.

While basic import and help command tests are good, consider adding functional tests to verify the core functionality:

   commands:
     - flexiformatter --help
     - samtools --help
+    - flexiformatter --version
+    # Add a test with minimal input data if possible
   requires:
     - pip

42-50: Add recommended metadata fields.

Consider adding these additional fields to the about section as per Bioconda guidelines:

 about:
   home: "https://github.com/ljwharbers/flexiformatter"
   summary: Moving flexiplex barcode and UMI to bam tags
   license: MIT
   license_file: LICENSE
+  doc_url: "https://github.com/ljwharbers/flexiformatter#readme"
+  dev_url: "https://github.com/ljwharbers/flexiformatter"
+  description: |
+    Flexiformatter is a tool for processing flexiplex output files,
+    moving barcode and UMI information to BAM tags.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e0997be and 438297c.

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

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

(syntax)

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

8-10: Verify package source URL and checksum.

The source URL follows the PyPI convention, but let's verify its accessibility and integrity.

✅ Verification successful

The previous attempt showed a 301 redirect and missing sha256sum command. Let's try to:

  1. Verify the package information directly from PyPI's JSON API
  2. Compare it with our meta.yaml content
  3. This will help us confirm both the correct URL pattern and SHA256 hash

Source URL and checksum are correct and verified

The verification confirms that:

  1. The package version (1.0.2) matches
  2. The SHA256 checksum in meta.yaml (4afde5aa4318b663d348bfe35845f911dc7770b107ae2eddc69b588f979638ab) matches the PyPI source distribution's checksum
  3. While the URL pattern in meta.yaml uses pypi.io, this redirects to files.pythonhosted.org which is the canonical PyPI storage, so this is correct and follows conda-forge conventions
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package source URL and checksum
# Expected: URL should be accessible and checksum should match

# Test source URL accessibility
curl -sI "https://pypi.io/packages/source/f/flexiformatter/flexiformatter-1.0.2.tar.gz" | head -n 1

# Download and verify checksum
curl -sL "https://pypi.io/packages/source/f/flexiformatter/flexiformatter-1.0.2.tar.gz" | sha256sum

Length of output: 289


Script:

#!/bin/bash
# Let's try a different approach using Python's pip to get package info
# and verify the package existence on PyPI

# Check if the package exists on PyPI and get its information
curl -s "https://pypi.org/pypi/flexiformatter/json" | jq -r '.info.version, .urls[].url, .urls[].digests.sha256' 2>/dev/null

# Also let's check the actual meta.yaml content to compare
cat recipes/meta.yaml

Length of output: 1599

Comment on lines 21 to 30
requirements:
host:
- python >=3
- pip
- setuptools
run:
- python >=3
- typer
- simplesam
- samtools
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 specific version constraints for dependencies.

While the requirements are correct, consider adding more specific version constraints for better reproducibility and to prevent potential compatibility issues:

   host:
-    - python >=3
+    - python >=3.7
     - pip
     - setuptools
   run:
-    - python >=3
-    - typer
+    - python >=3.7
+    - typer >=0.9.0
     - simplesam
     - samtools
📝 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:
host:
- python >=3
- pip
- setuptools
run:
- python >=3
- typer
- simplesam
- samtools
requirements:
host:
- python >=3.7
- pip
- setuptools
run:
- python >=3.7
- typer >=0.9.0
- simplesam
- samtools

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 (1)
recipes/meta.yaml (1)

32-40: Consider adding functional tests.

While basic import and help command tests are good, consider adding tests that verify core functionality:

  1. Testing actual file processing
  2. Verifying tag manipulation in BAM files

Consider adding these test commands:

   commands:
     - flexiformatter --help
     - samtools --help
+    - flexiformatter --version
+    - flexiformatter convert --help
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 438297c and 9a77541.

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

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

(syntax)

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

1-6: LGTM! Package metadata is correctly defined using Jinja2 templating.

🧰 Tools
🪛 yamllint

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

(syntax)


48-50: LGTM! Recipe maintainer correctly set to the package author.


12-20: 🛠️ Refactor suggestion

Review build configuration flags and run_exports.

  1. Using both --no-deps and --no-build-isolation might cause build issues. Consider removing --no-build-isolation to ensure proper dependency resolution during build time.

  2. The run_exports section is typically used for compiled packages with ABI compatibility concerns. For a pure Python package, this might be unnecessary.

#!/bin/bash
# Description: Check if this is a pure Python package
# Expected: Should find only Python files, no compiled extensions

# Look for any potential compiled extensions in the package
rg -l "setup\(.*ext_modules.*\)" 
rg -l "Extension\(.*\)"

Consider this simplified build section:

 build:
   entry_points:
     - flexiformatter = flexiformatter.reformat_flexiplex_tags:app
   noarch: python
-  script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
+  script: {{ PYTHON }} -m pip install . -vv --no-deps
   number: 0
-  run_exports:
-    - {{ pin_subpackage(name|lower, max_pin='x.x') }}

42-46: Verify repository and license information.

#!/bin/bash
# Description: Verify GitHub repository and license
# Expected: Repository should exist and contain LICENSE file

# Test 1: Check if the GitHub repository exists
curl -sI "https://github.com/ljwharbers/flexiformatter" | head -n 1

# Test 2: Check for LICENSE file in the repository
curl -sI "https://raw.githubusercontent.com/ljwharbers/flexiformatter/main/LICENSE" | head -n 1

21-30: Verify samtools package availability in Bioconda.

#!/bin/bash
# Description: Check if samtools is available in Bioconda
# Expected: Should find samtools in conda-forge or bioconda

# Search for samtools package in meta.yaml files
rg "name:\s*samtools" 

Comment on lines 8 to 10
source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/flexiformatter-{{ version }}.tar.gz
sha256: 4afde5aa4318b663d348bfe35845f911dc7770b107ae2eddc69b588f979638ab
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

Package source integrity verification failed

The source verification revealed discrepancies between the recipe and PyPI:

  • Version matches (1.0.2), but:
  • SHA256 checksums don't match:
    • Recipe: 4afde5aa4318b663d348bfe35845f911dc7770b107ae2eddc69b588f979638ab
    • PyPI: fc117809168051e2ba4bfe83c69065de7f65efff7e3941e94552c88e4c6cb3a2
  • URL structure in recipe differs from PyPI's actual URL pattern

Please update the recipe with:

  1. The correct SHA256 checksum from PyPI: fc117809168051e2ba4bfe83c69065de7f65efff7e3941e94552c88e4c6cb3a2
  2. Consider using PyPI's actual URL pattern: https://files.pythonhosted.org/packages/...
🔗 Analysis chain

Verify package source integrity.


Let me try a different approach to verify the package source integrity.

The previous attempt failed because the URL structure was incorrect and some commands weren't available. Using PyPI's JSON API will give us more reliable information about the package's source URL and checksums.


Let me try one more verification to get the actual version number from the meta.yaml file.

This will help us verify if the version and checksum in the recipe match the ones from PyPI.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the PyPI package URL and checksum
# Expected: URL should be accessible and checksum should match

# Test 1: Check if the URL is accessible
curl -sI "https://pypi.io/packages/source/f/flexiformatter/flexiformatter-1.0.2.tar.gz" | head -n 1

# Test 2: Download and verify checksum
curl -sL "https://pypi.io/packages/source/f/flexiformatter/flexiformatter-1.0.2.tar.gz" | sha256sum

Length of output: 921


Script:

#!/bin/bash
# Let's verify the package information using PyPI's JSON API
curl -s "https://pypi.org/pypi/flexiformatter/json" | jq -r '.urls[] | select(.packagetype=="sdist") | {url, digests}'

# Also get the version from meta.yaml for reference
cat recipes/meta.yaml | grep "version:"

Length of output: 568


Script:

#!/bin/bash
# Get the complete content of meta.yaml to see the version and source information
cat recipes/meta.yaml

Length of output: 1083

@mencian
Copy link
Contributor

mencian commented Oct 24, 2024

Hi @ljwharbers, I see that there's already a package named flexi-formatter; if this is the same package, please update the existing recipe instead.

@ljwharbers
Copy link
Contributor Author

Hi @ljwharbers, I see that there's already a package named flexi-formatter; if this is the same package, please update the existing recipe instead.

Hi,

Sorry for the confusion. Should I also update it if I actually intend to change the package name (also some of the internal things have changed). The old named package has already been deleted from PyPi.

@martin-g martin-g merged commit 9bde3bb into bioconda:master Oct 25, 2024
7 checks passed
@ljwharbers ljwharbers deleted the flexiformatter branch October 25, 2024 07:56
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.

3 participants