hstrat
raw JSON → 1.25.0 verified Mon Apr 27 auth: no python
hstrat enables phylogenetic inference on distributed digital evolution populations. It provides tools for reconstructing evolutionary history from digital organisms. Current version is 1.25.0, with a monthly release cadence.
pip install hstrat Common errors
error ModuleNotFoundError: No module named 'hstrat' ↓
cause hstrat not installed or Python environment not matching.
fix
Run
pip install hstrat and ensure Python >=3.10. error AttributeError: module 'hstrat' has no attribute 'HereditaryStratigraphicColumn' ↓
cause Wrong import path; class is inside submodules.
fix
Use
from hstrat import hstrat; col = hstrat.HereditaryStratigraphicColumn() or from hstrat.hstrat import HereditaryStratigraphicColumn. error TypeError: __init__() got an unexpected keyword argument 'foo' ↓
cause API mismatch with older version.
fix
Check the API documentation for your version. Use help(hstrat.HereditaryStratigraphicColumn) to see correct parameters.
Warnings
breaking In version 1.0.0, the API was overhauled. Many functions were renamed or moved. Upgrade carefully. ↓
fix Migrate to 1.x API: refer to migration guide at https://hstrat.readthedocs.io/en/latest/migration.html
gotcha The package requires Python >=3.10; using older versions will cause import errors. ↓
fix Update Python to 3.10 or newer.
deprecated The function `hstrat.deprecated_func` is deprecated since 1.20.0 and will be removed in 2.0.0. ↓
fix Replace with `hstrat.new_func` as per deprecation warning details.
Imports
- hstrat
import hstrat
Quickstart
import hstrat
import os
# Example: create a simple phylogenetic tree
from hstrat import hstrat
col = hstrat.HereditaryStratigraphicColumn()
# Deposit a stratum
col.DepositStrata(1)
print('Column deposited successfully')