Skip to content

Commit

Permalink
planned_deprecations (#254)
Browse files Browse the repository at this point in the history
* planned_deprecations

* tests
  • Loading branch information
JarbasAl authored Sep 5, 2024
1 parent 7b0d673 commit 5ca16a9
Show file tree
Hide file tree
Showing 27 changed files with 39 additions and 453 deletions.
17 changes: 0 additions & 17 deletions ovos_plugin_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,2 @@
from ovos_plugin_manager.utils import PluginTypes
from ovos_plugin_manager.plugin_entry import OpenVoiceOSPlugin
from ovos_utils.log import LOG


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)
12 changes: 3 additions & 9 deletions ovos_plugin_manager/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@
from ovos_config import Configuration
from ovos_utils.log import log_deprecation

log_deprecation("ovos_plugin_manager.audio has been deprecated on ovos-audio, "
"move to ovos_plugin_manager.media", "0.1.0")


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)
# TODO - restore this log in next release with updated version string
#log_deprecation("ovos_plugin_manager.audio has been deprecated on ovos-audio, "
# "move to ovos_plugin_manager.media", "1.0.0")


def find_audio_service_plugins() -> dict:
Expand Down
16 changes: 0 additions & 16 deletions ovos_plugin_manager/audio2ipa.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
from ovos_utils.log import LOG


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_audio2ipa_plugins() -> dict:
"""
Find all installed plugins
Expand Down
18 changes: 0 additions & 18 deletions ovos_plugin_manager/audio_transformers.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
from ovos_utils.log import LOG

from ovos_plugin_manager.templates.transformers import AudioTransformer, AudioLanguageDetector
from ovos_plugin_manager.utils import PluginTypes, PluginConfigTypes


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_audio_transformer_plugins() -> dict:
"""
Find all installed plugins
Expand Down
16 changes: 0 additions & 16 deletions ovos_plugin_manager/coreference.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@
replace_coreferences


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_coref_plugins() -> dict:
"""
Find all installed plugins
Expand Down
17 changes: 0 additions & 17 deletions ovos_plugin_manager/g2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@
from ovos_plugin_manager.utils import normalize_lang, PluginTypes, PluginConfigTypes
from ovos_plugin_manager.templates.g2p import Grapheme2PhonemePlugin, PhonemeAlphabet
from ovos_utils.log import LOG
from ovos_config import Configuration


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_g2p_plugins() -> dict:
Expand Down
16 changes: 0 additions & 16 deletions ovos_plugin_manager/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@
from ovos_utils.log import LOG


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_gui_plugins() -> dict:
"""
Find all installed plugins
Expand Down
16 changes: 0 additions & 16 deletions ovos_plugin_manager/keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
from ovos_plugin_manager.templates.keywords import KeywordExtractor


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_keyword_extract_plugins() -> dict:
"""
Find all installed plugins
Expand Down
16 changes: 0 additions & 16 deletions ovos_plugin_manager/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@
from ovos_plugin_manager.utils import PluginTypes, PluginConfigTypes


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_tx_plugins() -> dict:
"""
Find all installed plugins
Expand Down
17 changes: 0 additions & 17 deletions ovos_plugin_manager/metadata_transformers.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
from ovos_plugin_manager.utils import normalize_lang, PluginTypes, \
PluginConfigTypes
from ovos_plugin_manager.templates.transformers import MetadataTransformer
from ovos_utils.log import LOG


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_metadata_transformer_plugins() -> dict:
Expand Down
16 changes: 0 additions & 16 deletions ovos_plugin_manager/microphone.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,6 @@
from ovos_utils.log import LOG


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_microphone_plugins() -> dict:
"""
Find all installed plugins
Expand Down
16 changes: 0 additions & 16 deletions ovos_plugin_manager/phal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
from ovos_utils.log import LOG


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_phal_plugins() -> dict:
"""
Find all installed plugins
Expand Down
16 changes: 0 additions & 16 deletions ovos_plugin_manager/postag.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@
from ovos_plugin_manager.templates.postag import PosTagger


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_postag_plugins() -> dict:
"""
Find all installed plugins
Expand Down
15 changes: 0 additions & 15 deletions ovos_plugin_manager/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@
from ovos_plugin_manager.templates.segmentation import Segmenter


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_segmentation_plugins() -> dict:
"""
Expand Down
2 changes: 1 addition & 1 deletion ovos_plugin_manager/skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def get_default_skills_directory(conf: Optional[dict] = None) -> str:
if path_override:
log_deprecation("'directory_override' is deprecated!"
"add the new path to 'extra_directories' instead",
"0.1.0")
"1.0.0")
skills_folder = expanduser(path_override)
elif conf["skills"].get("extra_directories") and \
len(conf["skills"].get("extra_directories")) > 0:
Expand Down
15 changes: 0 additions & 15 deletions ovos_plugin_manager/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@
from ovos_utils.log import LOG


def find_plugins(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import find_plugins
return find_plugins(*args, **kwargs)


def load_plugin(*args, **kwargs):
# TODO: Deprecate in 0.1.0
LOG.warning("This reference is deprecated. "
"Import from ovos_plugin_manager.utils directly")
from ovos_plugin_manager.utils import load_plugin
return load_plugin(*args, **kwargs)


def find_question_solver_plugins() -> dict:
"""
Expand Down
Loading

0 comments on commit 5ca16a9

Please sign in to comment.