Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Release 1.0.1a1 #83

Merged
merged 3 commits into from
Nov 11, 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
46 changes: 7 additions & 39 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,20 @@
# Changelog

## [1.0.0a1](https://github.com/OpenVoiceOS/ovos-backend-client/tree/1.0.0a1) (2024-09-11)
## [1.0.1a1](https://github.com/OpenVoiceOS/ovos-backend-client/tree/1.0.1a1) (2024-11-11)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/V0.2.1a1...1.0.0a1)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/V1.0.0...1.0.1a1)

**Breaking changes:**
**Closed issues:**

- refactor!:deprecate\_refresh\_endpoint [\#78](https://github.com/OpenVoiceOS/ovos-backend-client/pull/78) ([JarbasAl](https://github.com/JarbasAl))

## [V0.2.1a1](https://github.com/OpenVoiceOS/ovos-backend-client/tree/V0.2.1a1) (2024-09-11)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/0.2.1a1...V0.2.1a1)

## [0.2.1a1](https://github.com/OpenVoiceOS/ovos-backend-client/tree/0.2.1a1) (2024-09-11)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/V0.2.0...0.2.1a1)

**Merged pull requests:**

- Update oauthlib requirement from ~=3.0 to ~=3.2 in /requirements [\#66](https://github.com/OpenVoiceOS/ovos-backend-client/pull/66) ([dependabot[bot]](https://github.com/apps/dependabot))

## [V0.2.0](https://github.com/OpenVoiceOS/ovos-backend-client/tree/V0.2.0) (2024-09-10)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/0.2.0...V0.2.0)

## [0.2.0](https://github.com/OpenVoiceOS/ovos-backend-client/tree/0.2.0) (2024-09-10)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/0.2.0a2...0.2.0)
- Oauth2 App database should not require the refresh\_endpoint [\#59](https://github.com/OpenVoiceOS/ovos-backend-client/issues/59)

**Merged pull requests:**

- Release 0.2.0a2 [\#76](https://github.com/OpenVoiceOS/ovos-backend-client/pull/76) ([github-actions[bot]](https://github.com/apps/github-actions))

## [0.2.0a2](https://github.com/OpenVoiceOS/ovos-backend-client/tree/0.2.0a2) (2024-09-10)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/V0.2.0a2...0.2.0a2)

## [V0.2.0a2](https://github.com/OpenVoiceOS/ovos-backend-client/tree/V0.2.0a2) (2024-09-10)
- fix:nominatim [\#82](https://github.com/OpenVoiceOS/ovos-backend-client/pull/82) ([JarbasAl](https://github.com/JarbasAl))

[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/0.1.2...V0.2.0a2)

**Breaking changes:**

- Remove oauth refresh endpoint [\#61](https://github.com/OpenVoiceOS/ovos-backend-client/pull/61) ([forslund](https://github.com/forslund))

**Merged pull requests:**
## [V1.0.0](https://github.com/OpenVoiceOS/ovos-backend-client/tree/V1.0.0) (2024-09-11)

- chore:semver\_versioning [\#75](https://github.com/OpenVoiceOS/ovos-backend-client/pull/75) ([JarbasAl](https://github.com/JarbasAl))
[Full Changelog](https://github.com/OpenVoiceOS/ovos-backend-client/compare/1.0.0...V1.0.0)



Expand Down
21 changes: 13 additions & 8 deletions ovos_backend_client/backends/offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@

import requests
from oauthlib.oauth2 import WebApplicationClient
from ovos_backend_client.backends.base import AbstractBackend, BackendType
from ovos_backend_client.database import JsonMetricDatabase, JsonWakeWordDatabase, \
SkillSettingsModel, OAuthTokenDatabase, OAuthApplicationDatabase, DeviceModel, JsonUtteranceDatabase
from ovos_backend_client.identity import IdentityManager
from ovos_backend_client.settings import get_local_settings
from ovos_config.config import Configuration, update_mycroft_config, get_xdg_config_save_path
from ovos_config.locations import USER_CONFIG, get_xdg_data_save_path, xdg_data_home
from ovos_utils import timed_lru_cache
from ovos_utils.log import LOG
from ovos_utils.network_utils import get_external_ip
from ovos_utils.smtp_utils import send_smtp

from ovos_backend_client.backends.base import AbstractBackend, BackendType
from ovos_backend_client.database import JsonMetricDatabase, JsonWakeWordDatabase, \
SkillSettingsModel, OAuthTokenDatabase, OAuthApplicationDatabase, DeviceModel, JsonUtteranceDatabase
from ovos_backend_client.identity import IdentityManager
from ovos_backend_client.settings import get_local_settings

try:
from ovos_plugin_manager.tts import get_voices, get_voice_id
from ovos_plugin_manager.wakewords import get_ww_id, get_wws
Expand Down Expand Up @@ -198,7 +199,9 @@ def geolocation_get(self, location):
str: JSON structure with lookup results
"""
url = "https://nominatim.openstreetmap.org/search"
data = self.get(url, params={"q": location, "format": "json", "limit": 1}).json()[0]

data = self.get(url, params={"q": location, "format": "json", "limit": 1},
headers={"User-Agent": "OVOS/1.0"}).json()[0]
lat = data.get("lat")
lon = data.get("lon")

Expand All @@ -207,7 +210,8 @@ def geolocation_get(self, location):

url = "https://nominatim.openstreetmap.org/details.php"
details = self.get(url, params={"osmid": data['osm_id'], "osmtype": data['osm_type'][0].upper(),
"format": "json"}).json()
"format": "json"},
headers={"User-Agent": "OVOS/1.0"}).json()

# if no addresstags are present for the location an empty list is sent instead of a dict
tags = details.get("addresstags") or {}
Expand Down Expand Up @@ -255,7 +259,8 @@ def reverse_geolocation_get(self, lat, lon):
str: JSON structure with lookup results
"""
url = "https://nominatim.openstreetmap.org/reverse"
details = self.get(url, params={"lat": lat, "lon": lon, "format": "json"}).json()
details = self.get(url, params={"lat": lat, "lon": lon, "format": "json"},
headers={"User-Agent": "OVOS/1.0"}).json()
address = details.get("address")
location = {
"address": details["display_name"],
Expand Down
4 changes: 2 additions & 2 deletions ovos_backend_client/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# START_VERSION_BLOCK
VERSION_MAJOR = 1
VERSION_MINOR = 0
VERSION_BUILD = 0
VERSION_ALPHA = 0
VERSION_BUILD = 1
VERSION_ALPHA = 1
# END_VERSION_BLOCK