Module streamgen
๐๐ฆ a framework and implementation for simulating stream datasets.
View Source
"""๐๐ฆ a framework and implementation for simulating stream datasets."""
import importlib
from beartype import beartype
EXTRAS = {
"examples": ["perlin_numpy", "polars", "ipymlp"],
"cl": [
# "avalanche",
"continuum",
],
"all": [
"perlin_numpy",
"polars",
"ipympl",
"avalanche",
"continuum",
],
}
"""๐งพ Dictionary mapping pip EXTRAS to their corresponding dependencies.
This dictionary has to stay in sync with `[tool.poetry.EXTRAS]` in `pyproject.toml`.
"""
@beartype
def is_extra_installed(extra: str) -> bool:
"""๐ฆโ check if setuptools/pip extra is installed in the current Python environment.
Args:
extra (str): name of the extra.
Returns:
bool: True if extra is installed.
"""
return all(importlib.util.find_spec(package) is not None for package in EXTRAS[extra])
Sub-modules
- streamgen.enums
- streamgen.exceptions
- streamgen.nodes
- streamgen.parameter
- streamgen.samplers
- streamgen.streams
- streamgen.transforms
- streamgen.visualizations
Variables
EXTRAS
๐งพ Dictionary mapping pip EXTRAS to their corresponding dependencies.
This dictionary has to stay in sync with [tool.poetry.EXTRAS]
in pyproject.toml
.
Functions
is_extra_installed
def is_extra_installed(
extra: str
) -> bool
๐ฆโ check if setuptools/pip extra is installed in the current Python environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
extra | str | name of the extra. | None |
Returns:
Type | Description |
---|---|
bool | True if extra is installed. |
View Source
@beartype
def is_extra_installed(extra: str) -> bool:
"""๐ฆโ check if setuptools/pip extra is installed in the current Python environment.
Args:
extra (str): name of the extra.
Returns:
bool: True if extra is installed.
"""
return all(importlib.util.find_spec(package) is not None for package in EXTRAS[extra])