{"id":8881,"library":"bioversions","title":"Bioversions","description":"Bioversions is a Python library (current version 0.8.324) that provides programmatic access to the current version numbers for a wide array of biological databases. It aims to simplify the integration of up-to-date database versions into bioinformatics workflows and tools. The library actively maintains and daily updates a static listing of these versions, reflecting a frequent release cadence for its internal data, while the library itself sees regular patch updates.","status":"active","version":"0.8.324","language":"en","source_language":"en","source_url":"https://github.com/biopragmatics/bioversions.git","tags":["biology","bioinformatics","versions","databases","data management"],"install":[{"cmd":"pip install bioversions","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"symbol":"bioversions","correct":"import bioversions"}],"quickstart":{"code":"import bioversions\n\n# Get the current version for a specific database (e.g., BioGRID)\nbiogrid_version = bioversions.get_version('biogrid')\nprint(f\"Current BioGRID version: {biogrid_version}\")\n\n# Get more detailed information using resolve()\nbioversion_obj = bioversions.resolve('biogrid')\nprint(f\"BioGRID version object: {bioversion_obj.version} (updated {bioversion_obj.date})\")\n","lang":"python","description":"This quickstart demonstrates how to import the `bioversions` library and retrieve the current version of a biological database, such as BioGRID, using `get_version()` for a simple string or `resolve()` for more detailed metadata."},"warnings":[{"fix":"Design code to be robust to version changes. For testing, consider using version comparison (e.g., `version >= 'expected_min_version'`) or mock results. Avoid direct equality checks with specific version strings unless explicitly testing for a historical state.","message":"The versions returned by `bioversions` are dynamic and reflect the current state of external biological databases. Hardcoding specific version strings in tests or logic will eventually lead to `AssertionError` or incorrect behavior as databases update.","severity":"gotcha","affected_versions":"All versions"},{"fix":"To bypass the cache for a specific call (if a method supports it, check documentation) or to force a refresh (e.g., by clearing the cache via `bioversions.clear_cache()`), or by manually deleting the cache directory. Note: `clear_cache()` refreshes for the next call.","message":"Results are cached locally (default: `~/.data/bioversions`) and refreshed only once per day. If you need immediate updates or are debugging, ensure to consider the cache's daily refresh cycle.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Override the cache location by setting the `BIOVERSIONS_HOME` environment variable to a desired path before running your application. For robust production systems, monitor the upstream databases' release notes for major structural changes.","message":"The default cache location (`~/.data/bioversions`) can be inconvenient in some environments. While the library is generally stable, its dependence on external databases means their internal APIs or naming conventions might change, potentially affecting the accuracy of retrieved versions.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run `pip install bioversions` to install the library.","cause":"The `bioversions` package has not been installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'bioversions'"},{"fix":"Update your assertions to reflect the current expected version, or use `bioversions.get_version()` dynamically in your tests without hardcoding a specific version string, if appropriate for your test's intent.","cause":"This specific assertion, often found in older documentation or copied from examples, fails because the actual version of the biological database (e.g., BioGRID) has since been updated, as `bioversions` correctly reflects the current version.","error":"AssertionError: This was true on Dec 5th, 2020!"},{"fix":"Verify the correct spelling and availability of the database name by checking the `bioversions` documentation or by iterating through `bioversions.iter_versions()` to see supported names.","cause":"Attempted to retrieve a version for a database name that `bioversions` does not recognize or that is misspelled.","error":"KeyError: 'some_nonexistent_database'"}]}