Skip to content

Commit

Permalink
Merge pull request #316 from OpenVoiceOS/release-0.5.6a1
Browse files Browse the repository at this point in the history
Release 0.5.6a1
  • Loading branch information
JarbasAl authored Dec 4, 2024
2 parents e79d49a + deb9437 commit 41eb746
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 25 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Changelog

## [0.5.5a1](https://github.com/OpenVoiceOS/ovos-utils/tree/0.5.5a1) (2024-11-25)
## [0.5.6a1](https://github.com/OpenVoiceOS/ovos-utils/tree/0.5.6a1) (2024-12-04)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-utils/compare/0.5.4...0.5.5a1)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-utils/compare/0.5.5...0.5.6a1)

**Merged pull requests:**

- Update ovos-config requirement from \<1.0.0,\>=0.0.12 to \>=0.0.12,\<2.0.0 in /requirements [\#313](https://github.com/OpenVoiceOS/ovos-utils/pull/313) ([dependabot[bot]](https://github.com/apps/dependabot))
- refactor:move\_to\_extras [\#315](https://github.com/OpenVoiceOS/ovos-utils/pull/315) ([JarbasAl](https://github.com/JarbasAl))



Expand Down
4 changes: 2 additions & 2 deletions ovos_utils/geolocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

import requests
from requests.exceptions import RequestException, Timeout
from timezonefinder import TimezoneFinder

from ovos_utils import timed_lru_cache
from ovos_utils.lang import standardize_lang_tag
from ovos_utils.log import LOG
from ovos_utils.network_utils import get_external_ip, is_valid_ip


_tz_finder: TimezoneFinder = None
_tz_finder = None


def get_timezone(lat: float, lon: float) -> Dict[str, str]:
Expand All @@ -30,6 +29,7 @@ def get_timezone(lat: float, lon: float) -> Dict[str, str]:
"""
global _tz_finder
if _tz_finder is None:
from timezonefinder import TimezoneFinder
# lazy loaded, resource intensive so we only want to do it once
_tz_finder = TimezoneFinder()
try:
Expand Down
8 changes: 1 addition & 7 deletions ovos_utils/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ def is_gui_running(applications: List[str] = _default_gui_apps) -> bool:
Return true if a GUI application is running
@param applications: list of applications to check for
"""
deprecated = any((is_process_running(app) for app in applications
if app.startswith("mycroft-")))
if deprecated:
LOG.warning("you are running a deprecated mycroft-gui version, "
"please move to a OVOS maintained version")
return True
return deprecated or any((is_process_running(app) for app in applications))
return any((is_process_running(app) for app in applications))


def is_gui_connected(bus=None) -> bool:
Expand Down
4 changes: 2 additions & 2 deletions ovos_utils/lang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
from os.path import isdir, join
from typing import Optional

from langcodes import tag_distance, standardize_tag as std

from ovos_utils.file_utils import resolve_resource_file


def standardize_lang_tag(lang_code: str, macro=True) -> str:
"""https://langcodes-hickford.readthedocs.io/en/sphinx/index.html"""
try:
from langcodes import standardize_tag as std
return str(std(lang_code, macro=macro))
except:
if macro:
Expand All @@ -28,6 +27,7 @@ def get_language_dir(base_path: str, lang: str ="en-US") -> Optional[str]:
for f in listdir(base_path):
if isdir(f"{base_path}/{f}"):
try:
from langcodes import tag_distance
score = tag_distance(lang, f)
except: # not a valid language code
continue
Expand Down
2 changes: 1 addition & 1 deletion ovos_utils/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import requests
from json_database import JsonStorageXDG
from oauthlib.oauth2 import WebApplicationClient
from ovos_config.locations import get_xdg_cache_save_path

from ovos_utils.log import LOG
Expand Down Expand Up @@ -108,6 +107,7 @@ def refresh_oauth_token(token_id):
client_secret = app_data["client_secret"]

# Perform refresh
from oauthlib.oauth2 import WebApplicationClient
client = WebApplicationClient(client_id, refresh_token=refresh_token)
uri, headers, body = client.prepare_refresh_token_request(token_endpoint)
refresh_result = requests.post(uri, headers=headers, data=body,
Expand Down
4 changes: 2 additions & 2 deletions ovos_utils/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# START_VERSION_BLOCK
VERSION_MAJOR = 0
VERSION_MINOR = 5
VERSION_BUILD = 5
VERSION_ALPHA = 0
VERSION_BUILD = 6
VERSION_ALPHA = 1
# END_VERSION_BLOCK
11 changes: 7 additions & 4 deletions requirements/extras.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
rapidfuzz>=3.6,<4.0
ovos-plugin-manager>=0.0.25,<1.0.0
ovos-config>=0.0.12,<2.0.0
ovos-workshop>=0.0.13,<3.0.0
ovos_bus_client>=0.0.8,<2.0.0
ovos-plugin-manager>=0.0.25
ovos-config>=0.0.12
ovos-workshop>=0.0.13
ovos_bus_client>=0.0.8
langcodes
timezonefinder
oauthlib~=3.2
5 changes: 1 addition & 4 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ pyee>=8.0.0
combo-lock~=0.2
rich-click~=1.7
rich~=13.7
orjson
langcodes
timezonefinder
oauthlib~=3.2
orjson

0 comments on commit 41eb746

Please sign in to comment.