Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation logs and formatting changes #194

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion neon_speech/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def run(module, package, force_install):
@click.option("--force-install", "-f", default=False, is_flag=True,
help="Force pip installation of configured module")
def install_plugin(module, package, force_install):
log_deprecation("`install-plugin` replaced by `install-dependencies`", "2.0.0")
log_deprecation("`install-plugin` replaced by `install-dependencies`", "5.0.0")
from neon_speech.utils import install_stt_plugin
from ovos_config.config import Configuration
speech_config = Configuration()
Expand All @@ -102,6 +102,7 @@ def install_plugin(module, package, force_install):
if not module:
click.echo("Plugin specified without module")


@neon_speech_cli.command(help="Install neon-speech module dependencies from config & cli")
@click.option("--package", "-p", default=[], multiple=True,
help="Additional package to install (can be repeated)")
Expand All @@ -114,6 +115,7 @@ def install_dependencies(package: List[str]):
LOG.info(f"pip exit code: {result}")
sys.exit(result)


@neon_speech_cli.command(help="Install a STT Plugin")
@click.option("--plugin", "-p", default=None,
help="STT module to init")
Expand Down
4 changes: 3 additions & 1 deletion neon_speech/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ def _plugin_to_package(plugin: str) -> str:
}
return known_plugins.get(plugin) or plugin


def build_extra_dependency_list(config: Union[dict, Configuration], additional: List[str] = []) -> List[str]:
extra_dependencies = config.get("extra_dependencies", {})
dependencies = additional + extra_dependencies.get("global", []) + extra_dependencies.get("voice", [])

return dependencies

@deprecated("Replaced by `neon_utils.packaging_utils.install_packages_from_pip`", "2.0.0")

@deprecated("Replaced by `neon_utils.packaging_utils.install_packages_from_pip`", "5.0.0")
def install_stt_plugin(plugin: str) -> bool:
"""
Install an stt plugin using pip
Expand Down
Loading