{"id":23177,"library":"total-perspective-vortex","title":"Total Perspective Vortex","description":"A library for routing entities (jobs, users or groups) to destinations in Galaxy. Current version is 3.2.1, released in April 2025. Release cadence is irregular with multiple minor releases per year.","status":"active","version":"3.2.1","language":"python","source_language":"en","source_url":"https://github.com/galaxyproject/total-perspective-vortex","tags":["galaxy","routing","job-scheduling","config","pydantic"],"install":[{"cmd":"pip install total-perspective-vortex","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Configuration models","package":"pydantic","optional":false},{"reason":"YAML config parsing","package":"pyyaml","optional":false},{"reason":"Template rendering in configuration","package":"Jinja2","optional":false}],"imports":[{"note":"Package name uses underscores, not hyphens, but tpv is not importable directly.","wrong":"from tpv.config import TPVConfigLoader","symbol":"TPVConfigLoader","correct":"from total_perspective_vortex.config import TPVConfigLoader"}],"quickstart":{"code":"from total_perspective_vortex.entities import Entity\nfrom total_perspective_vortex.routing import Router\n\n# Define an entity (e.g., a job)\nentity = Entity(\n    id=\"job-123\",\n    tool_id=\"toolshed.g2.bx.psu.edu/repos/devteam/fastqc/fastqc/0.11.9\",\n    user=\"alice\"\n)\n\n# Initialize router with config path\nrouter = Router(config_path=\"tpv_config.yml\")\n\n# Route entity to destination\ndestination = router.route(entity)\nprint(destination)","lang":"python","description":"Basic usage: create an entity, load a router, and route to a destination."},"warnings":[{"fix":"Update config to use new database URL: https://gxy.io/tpv/db-v2.yml","message":"Version 3.0.0 changed the TPV shared database URL. Old short links point to db-v1 which is frozen. Use https://gxy.io/tpv/db-v2.yml for latest v2 database or fork your own.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Replace `class Config` with `model_config = ConfigDict(...)` in your custom models.","message":"Pydantic v1-style class Config is deprecated since v3.2.1. Replace with ConfigDict (Pydantic v2).","severity":"deprecated","affected_versions":">=3.2.1"},{"fix":"Check if tool is being automatically tagged; manually set tool_type in config after loading.","message":"The entity 'tool_type' tag is automatically set for special tool types (e.g., 'data_source'). This can override user-set tool_type attributes unexpectedly.","severity":"gotcha","affected_versions":">=3.2.0"},{"fix":"Test templates separately and use tpv validate command to catch errors early.","message":"Jinja2 templates in configuration are evaluated at load time; syntax errors or missing variables cause silent failures or unexpected defaults.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install total-perspective-vortex` in the same environment. Check with `python -c \"import total_perspective_vortex; print(total_perspective_vortex.__version__)\"`.","cause":"Running Python environment without the package installed, or using wrong Python interpreter.","error":"ModuleNotFoundError: No module named 'total_perspective_vortex'"},{"fix":"Validate config with `tpv validate --config path/to/config.yml` and fix errors according to schema.","cause":"Configuration YAML has invalid structure or type mismatch (e.g., string instead of integer for memory).","error":"pydantic.error_wrappers.ValidationError: 1 validation error for TPVConfig\nconfig -> destinations -> ..."},{"fix":"Check that destination IDs in your config match those referenced in routing rules. Use `tpv dry-run --explain` to trace decision.","cause":"Route returned a destination with a missing or incorrectly spelled key in the entity or routing rules.","error":"KeyError: 'destination_id'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}