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
python -m awesome_bioinfo validate [options]Options
| Option | Shorthand | Description | Default |
|---|---|---|---|
--strict | — | Treat warnings as errors | False |
--verbose | -v | Output detailed validation logs | False |
Examples
# 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 --verbosestats — Project Statistics
Output knowledge base scale statistics, field coverage, and category distribution.
Usage
python -m awesome_bioinfo stats [options]Options
| Option | Shorthand | Description | Default |
|---|---|---|---|
--format | -f | Output format: table / json / csv | table |
--category | -c | Filter by specified category | all |
Examples
# 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-alignmentsearch — Full-Text Search
Search algorithms by name, description, or tags.
Usage
python -m awesome_bioinfo search <query> [options]Options
| Option | Shorthand | Description | Default |
|---|---|---|---|
--limit | -n | Maximum number of results returned | 10 |
--field | — | Search field: name / description / tag / all | all |
--lang | -l | Output language: zh / en | zh |
Examples
# 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 taginfo — Algorithm Details
View complete metadata for a single algorithm.
Usage
python -m awesome_bioinfo info <algorithm-id> [options]Options
| Option | Shorthand | Description | Default |
|---|---|---|---|
--format | -f | Output format: table / json / yaml | table |
--lang | -l | Output language: zh / en | zh |
Examples
# 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 encompare — Algorithm Comparison
Side-by-side comparison of core metrics for two or more algorithms.
Usage
python -m awesome_bioinfo compare <id1> <id2> [options]Options
| Option | Shorthand | Description | Default |
|---|---|---|---|
--format | -f | Output format: table / json | table |
--fields | — | Specify comparison fields, comma-separated | all |
Examples
# 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 jsonexport — Data Export
Export algorithm data to JSON, CSV, or other formats.
Usage
python -m awesome_bioinfo export [options]Options
| Option | Shorthand | Description | Default |
|---|---|---|---|
--format | -f | Output format: json / csv / yaml | json |
--output | -o | Output file path | stdout |
--category | -c | Filter by specified category | all |
Examples
# 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.csvvitepress — Documentation Generation
Generate VitePress static site source (Chinese + English).
Usage
python -m awesome_bioinfo vitepress [options]Options
| Option | Shorthand | Description | Default |
|---|---|---|---|
--clean | — | Clean docs/zh and docs/en before generation | False |
--lang | -l | Generate only specified language: zh / en / all | all |
Examples
# 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 --cleanData Management Guide
Adding a New Algorithm
- Copy template:
cp templates/algorithm_template.yaml data/algorithms/<category>.yaml(append to existing file or create new) - Fill in fields, ensuring
idis globally unique anddescriptionis 50–500 characters - Run validation:
python -m awesome_bioinfo validate - Generate docs:
python -m awesome_bioinfo vitepress - Local preview:
cd docs && npm run dev - Submit PR and wait for CI to pass
Updating the Category System
- Modify
data/categories.yaml, adding or adjusting categories/subcategories - Synchronously update
category/subcategoryfields in all algorithm YAML files referencing that category - Run validation and generation commands to confirm zero errors
- Since category changes are spec-level changes, they must go through the
/opsx:proposeproposal workflow
VitePress Command Cheat Sheet
cd docs
# Local development preview
npm run dev
# Production build
npm run build
# Preview build artifacts
npm run previewCI/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 generate→npm 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:
# Complete pre-commit check
alias bio-check='ruff check awesome_bioinfo && mypy awesome_bioinfo && pytest tests/ -q && python -m awesome_bioinfo validate'