Skip to content

Latest commit

 

History

History
207 lines (154 loc) · 4.79 KB

File metadata and controls

207 lines (154 loc) · 4.79 KB

Deployment Guide

This document provides instructions for deploying Bioinfo Tools to various package managers.

Table of Contents

PyPI Deployment

Prerequisites

  • PyPI account (register at https://pypi.org/)
  • twine installed: pip install twine build

Steps

  1. Update version number in:

    • bioinfo_tools/__init__.py
    • setup.py
    • pyproject.toml
  2. Build the package:

    python -m build

    This creates distribution files in dist/

  3. Test the package locally:

    pip install dist/bioinfo_tools-*.whl
    bioinfo-tools --help
  4. Upload to TestPyPI (optional but recommended):

    twine upload --repository testpypi dist/*
  5. Upload to PyPI:

    twine upload dist/*
  6. Verify installation:

    pip install bioinfo-tools
    bioinfo-tools --version

Conda/Bioconda Deployment

Prerequisites

  • Fork of bioconda-recipes repository
  • Conda installed
  • GitHub account

Steps

  1. Create a release on GitHub:

  2. Get the SHA256 hash of the tarball:

    wget https://github.com/Mxrcon/Bioinfo-python-scripts/archive/refs/tags/v1.0.0.tar.gz
    sha256sum v1.0.0.tar.gz
  3. Update the conda recipe:

    • Edit conda_recipe/meta.yaml
    • Update the sha256 field with the hash from step 2
    • Ensure version numbers match
  4. Test the conda recipe locally:

    conda build conda_recipe/
  5. Fork bioconda-recipes:

  6. Add your recipe to bioconda:

    git clone https://github.com/YOUR_USERNAME/bioconda-recipes.git
    cd bioconda-recipes
    git checkout -b add-bioinfo-tools
    
    # Copy your recipe
    mkdir -p recipes/bioinfo-tools
    cp ../Bioinfo-python-scripts/conda_recipe/meta.yaml recipes/bioinfo-tools/
    
    # Commit and push
    git add recipes/bioinfo-tools/
    git commit -m "Add bioinfo-tools recipe"
    git push origin add-bioinfo-tools
  7. Create a Pull Request:

    • Go to your fork on GitHub
    • Click "Pull Request"
    • Title: "Add bioinfo-tools recipe"
    • Description: Brief description of the tool
    • Submit the PR
  8. Wait for CI checks and review:

    • Bioconda's CI will test your recipe
    • Address any feedback from reviewers
    • Once approved and merged, the package will be available via conda
  9. Installation after deployment:

    conda install -c bioconda bioinfo-tools

Pixi Configuration

Pixi is already configured in pixi.toml. Users can use it as follows:

For Users

# Install pixi (if not already installed)
curl -fsSL https://pixi.sh/install.sh | bash

# Clone and use the project
git clone https://github.com/Mxrcon/Bioinfo-python-scripts.git
cd Bioinfo-python-scripts
pixi install
pixi shell

Available Pixi Commands

# Install the package
pixi run install

# Run tests
pixi run test

# Clean build artifacts
pixi run clean

# Development environment (with linters and formatters)
pixi shell -e dev

Version Management

When releasing a new version:

  1. Update version in:

    • bioinfo_tools/__init__.py
    • setup.py
    • pyproject.toml
    • pixi.toml
    • conda_recipe/meta.yaml
  2. Update CHANGELOG.md with release notes

  3. Commit changes:

    git add .
    git commit -m "Bump version to X.Y.Z"
    git tag -a vX.Y.Z -m "Release X.Y.Z"
    git push origin main --tags
  4. Follow deployment steps above for each platform

Troubleshooting

PyPI Issues

Problem: Package name already taken
Solution: Choose a different name in setup.py and pyproject.toml

Problem: Upload fails with authentication error
Solution: Use twine upload with --username and --password or configure .pypirc

Conda Issues

Problem: Build fails with missing dependencies
Solution: Ensure all dependencies are listed in meta.yaml under requirements/run

Problem: Tests fail in conda build
Solution: Add required test files to the source distribution or simplify tests in meta.yaml

Pixi Issues

Problem: Command not found
Solution: Ensure you're in a pixi shell or use pixi run <command>

Problem: Dependencies not installing
Solution: Check that all channels are properly configured in pixi.toml

Contact

For deployment help or questions: