Skip to content

CLI Workflow Reference

Overview

python -m awesome_bioinfo is the unified CLI entry point for this knowledge base, providing a complete toolchain from data validation, statistical queries, full-text search, and algorithm comparison to document generation. This page provides complete usage references, option descriptions, and typical examples for all subcommands.


validate — Data Validation

Validate the integrity, consistency, and compliance of all YAML data files.

Usage

bash
python -m awesome_bioinfo validate [options]

Options

OptionShorthandDescriptionDefault
--strictTreat warnings as errorsFalse
--verbose-vOutput detailed validation logsFalse

Examples

bash
# Standard validation
python -m awesome_bioinfo validate

# Strict mode (any warning blocks)
python -m awesome_bioinfo validate --strict

# Verbose output
python -m awesome_bioinfo validate --verbose

stats — Project Statistics

Output knowledge base scale statistics, field coverage, and category distribution.

Usage

bash
python -m awesome_bioinfo stats [options]

Options

OptionShorthandDescriptionDefault
--format-fOutput format: table / json / csvtable
--category-cFilter by specified categoryall

Examples

bash
# Standard statistics table
python -m awesome_bioinfo stats

# JSON format output
python -m awesome_bioinfo stats -f json

# Single category statistics
python -m awesome_bioinfo stats -c sequence-alignment

Search algorithms by name, description, or tags.

Usage

bash
python -m awesome_bioinfo search <query> [options]

Options

OptionShorthandDescriptionDefault
--limit-nMaximum number of results returned10
--fieldSearch field: name / description / tag / allall
--lang-lOutput language: zh / enzh

Examples

bash
# Default search
python -m awesome_bioinfo search smith

# Limit result count
python -m awesome_bioinfo search "sequence alignment" -n 5

# Search tags only
python -m awesome_bioinfo search "dynamic-programming" --field tag

info — Algorithm Details

View complete metadata for a single algorithm.

Usage

bash
python -m awesome_bioinfo info <algorithm-id> [options]

Options

OptionShorthandDescriptionDefault
--format-fOutput format: table / json / yamltable
--lang-lOutput language: zh / enzh

Examples

bash
# View in table form
python -m awesome_bioinfo info smith-waterman

# JSON output
python -m awesome_bioinfo info needleman-wunsch -f json

# English output
python -m awesome_bioinfo info blast -l en

compare — Algorithm Comparison

Side-by-side comparison of core metrics for two or more algorithms.

Usage

bash
python -m awesome_bioinfo compare <id1> <id2> [options]

Options

OptionShorthandDescriptionDefault
--format-fOutput format: table / jsontable
--fieldsSpecify comparison fields, comma-separatedall

Examples

bash
# Default comparison
python -m awesome_bioinfo compare smith-waterman needleman-wunsch

# Compare only complexity and year
python -m awesome_bioinfo compare blast bwa --fields time_complexity,year

# JSON format
python -m awesome_bioinfo compare minimap2 bwa-mem -f json

export — Data Export

Export algorithm data to JSON, CSV, or other formats.

Usage

bash
python -m awesome_bioinfo export [options]

Options

OptionShorthandDescriptionDefault
--format-fOutput format: json / csv / yamljson
--output-oOutput file pathstdout
--category-cFilter by specified categoryall

Examples

bash
# Export all data as JSON
python -m awesome_bioinfo export -f json -o algorithms.json

# Export single category as CSV
python -m awesome_bioinfo export -f csv -c variant-calling -o variants.csv

vitepress — Documentation Generation

Generate VitePress static site source (Chinese + English).

Usage

bash
python -m awesome_bioinfo vitepress [options]

Options

OptionShorthandDescriptionDefault
--cleanClean docs/zh and docs/en before generationFalse
--lang-lGenerate only specified language: zh / en / allall

Examples

bash
# Generate all documentation
python -m awesome_bioinfo vitepress

# Chinese only
python -m awesome_bioinfo vitepress -l zh

# Clean and regenerate
python -m awesome_bioinfo vitepress --clean

Data Management Guide

Adding a New Algorithm

  1. Copy template: cp templates/algorithm_template.yaml data/algorithms/<category>.yaml (append to existing file or create new)
  2. Fill in fields, ensuring id is globally unique and description is 50–500 characters
  3. Run validation: python -m awesome_bioinfo validate
  4. Generate docs: python -m awesome_bioinfo vitepress
  5. Local preview: cd docs && npm run dev
  6. Submit PR and wait for CI to pass

Updating the Category System

  1. Modify data/categories.yaml, adding or adjusting categories/subcategories
  2. Synchronously update category / subcategory fields in all algorithm YAML files referencing that category
  3. Run validation and generation commands to confirm zero errors
  4. Since category changes are spec-level changes, they must go through the /opsx:propose proposal workflow

VitePress Command Cheat Sheet

bash
cd docs

# Local development preview
npm run dev

# Production build
npm run build

# Preview build artifacts
npm run preview

CI/CD Integration Notes

GitHub Actions Workflows

The following workflows are defined under .github/workflows/:

  • lint.yml: ruff + mypy, triggered on every push
  • test.yml: Full pytest suite + coverage reporting, triggered on PR and push
  • validate.yml: python -m awesome_bioinfo validate, triggered when data files change
  • deploy.yml: vitepress generatenpm run build → deploy to Pages, triggered on master branch push

Local Pre-Commit Checks

It is recommended to configure the following shortcut command in local Git hooks or aliases:

bash
# Complete pre-commit check
alias bio-check='ruff check awesome_bioinfo && mypy awesome_bioinfo && pytest tests/ -q && python -m awesome_bioinfo validate'

Released under the MIT License.