Commit Graph

386 Commits (mark-ii/latest)

Author SHA1 Message Date
Kris Gesling be45edb54f autoformat 2021-12-01 09:32:24 +09:30
Åke Forslund 70df575d43 Make log settings not cache local only config
After startup the cached config would be without remote config. This
makes sure the config without remote isn't cached.
2021-11-09 21:04:58 +01:00
Kris Gesling 131a9ed03f PEP8 2021-11-04 20:53:00 +09:30
Gaëtan Trellu 0247b3a4b5
[log_format] Add an option to change the log format (#3016)
* [log_format] Add an option to change the log format

Hacing an option to change the log format could be useful when logs
are shipped into an aggregator such as Elasticsearch.

The current format is very hard to parse.

* [log_format] Set default Formatter

Because mycroft.configuration.Configuration() class import LOG class,
a default Formatter have to be defined before import the
mycroft.configuration.Configuration() class.
2021-10-29 14:59:22 +09:30
Kris Gesling 4df863633d Merge dev pre-XDG into feature/mark-2
This includes all commits up to but not including PR #2794
2021-08-17 15:56:42 +09:30
jarbasal 87d22d30a4 fix cyclic imports with LOG
The mycroft.util.log module called LOG.init() which needs to read the config,
the configuration module imports the log system to log causing cyclic import
issues.

This moves the LOG.init() call out of the log module making it possible
to use the normal config system to init the logs and does a slight
re-arrangement so that the uninited log can be used.
2021-08-05 10:04:45 +02:00
Åke Forslund 9029dc1f41 Slight cleanup
- Make XDG usage more visible by using the xdg module prefix
- fix overloaded python keywords
- remove unused imports
2021-08-05 10:04:45 +02:00
Åke Forslund 8e69d4616d Correct resolution order for resolving log configs 2021-08-05 10:04:45 +02:00
Bart Ribbers e20443b824 Use XDG Base directories for settings, cache and runtime data
Improve deprecation warning message
2021-08-05 10:04:45 +02:00
Kris Gesling a794db0c9a Make network tests configurable
Previously test URIs were hardcoded.
They can now be configured in mycroft.conf
2021-08-02 21:00:05 +09:30
ChanceNCounter a211441acc stop passing lang=None to Lingua Franca
LF's only breaking change over the past two versions has been the
deprecation of `lang=None` as a valid parameter. This is because the new
language loading paradigm wants to load certain functions on the fly,
which it cannot do when it is explicitly told to look for a null lang.

I've addressed this by passing `lingua_franca.get_default_lang()` where
the `lang=None` call remained.

Bonus: Gets rid of over 200 DeprecationWarnings in unit tests!
2021-06-23 21:56:19 -07:00
Kris Gesling 2c598fd96b Merge branch 'dev' into feature/mark-2 2021-06-15 12:01:18 +09:30
Åke Forslund cfc84bab27 Add approprate blank lines to fix phinxdoc warnings 2021-05-11 15:12:10 +09:30
Kris Gesling e75a05557b docstring cleanup 2021-05-11 15:10:32 +09:30
Kris Gesling 27cf725411 Merge branch 'dev' into feature/mark-2 2021-05-10 07:22:45 +09:30
Kris Gesling 6327ac5dbb
Upgrade Lingua Franca to v0.4.1 (#2890)
**Update Lingua Franca to v0.4.1**

The update from Lingua Franca v0.2.x to v0.4.x includes few
breaking changes.
- Some API methods have been updated.
- Mycroft-core tests have been updated to reflect improvements in
  Lingua Franca's formatting and parsing.
- add LF default lang setting method to config.locale 
  including warning that this method will change in the future
- Add TODO's for 21.08 - moving more methods to LF
- simplify loading and setting default of languages in Skills service
- Remove unneeded wrappers for Lingua Franca functions
- Fix documentation of format and parse utils
- Fix test warnings
2021-05-08 08:34:02 +09:30
Kris Gesling 784f166bc2 Raise TypeError rather than quietly fail 2021-05-03 20:13:21 +09:30
Kris Gesling 0fb90edd28 Rename to get_temp_path and add docstring 2021-04-30 16:49:59 +09:30
dzekem christa 7765d11224 ran autopep8 2021-04-30 14:48:15 +09:30
dzekem christa 3f745c52ad created temp path function 2021-04-30 14:47:49 +09:30
dzekem christa 621b4ab650 spaces added and uniformity in code 2021-04-30 14:46:36 +09:30
dzekem christa 9252158829 rectified pep8 issues 2021-04-30 14:46:36 +09:30
dzekem christa 32f666edd4 Issue-2727 - fixing hard coded /tmp 2021-04-30 14:46:36 +09:30
dzekem christa a174c3c822 replaced hard coded /tmp 2021-04-30 14:46:36 +09:30
Kris Gesling 6f1e708f34 Merge branch 'dev' into feature/mark-2 2021-03-31 21:38:16 +09:30
Åke Forslund 7bd27eb5df Make curate_cache() return removed files 2021-03-21 12:47:57 +01:00
Chris Veilleux 6ed674bd3e Merge remote-tracking branch 'origin/dev' into feature/mark-2
# Conflicts:
#	mycroft/audio/__main__.py
#	mycroft/client/speech/__main__.py
#	mycroft/skills/__main__.py
#	mycroft/util/process_utils.py
2021-02-26 11:49:30 -06:00
Ken Smith a7873cc22f Generic hardware enclosure capabilities should work with any device like your laptop or the Mark2. Provides a view of the default input devices (keyboards and mice) and default output devices (screens). Should be safe to merge to master also. 2021-02-09 16:28:48 -05:00
Kris Gesling cc3bf5b45a Change names for consistency 2021-01-28 17:21:33 +01:00
Åke Forslund bea1f008c6 Add ProcessStatus class
ProcessStatus tracks the process status and allows callbacks on changes
and status queries over the messagebus.

StatusCallbackMap is used to setup the callbacks

ProcessState is an enum tracking the different states.
2021-01-28 17:21:33 +01:00
Kris Gesling 767d2d6912 add whitelist arg to docstring 2021-01-11 16:57:25 +09:30
Kris Gesling ad32a7a873 move bus connect method to process_utils 2021-01-11 16:57:25 +09:30
Kris Gesling f2b7b0251b
Merge pull request #2757 from forslund/feature/ready-check
Feature: add Process Status and ensure all services ready
2020-11-12 09:16:43 +09:30
Kris Gesling fa0b0dbd41 Change names for consistency 2020-09-25 06:52:25 +02:00
Åke Forslund 633dea1ac5 Add ProcessStatus class
ProcessStatus tracks the process status and allows callbacks on changes
and status queries over the messagebus.

StatusCallbackMap is used to setup the callbacks

ProcessState is an enum tracking the different states.
2020-09-25 06:51:20 +02:00
Åke Forslund caf834c728 Add plugin utils 2020-09-23 07:46:09 +02:00
Åke Forslund fc3d8ce801 Add MontonicEvent class
This handles jumps forward in time correctly
2020-09-10 13:26:25 +02:00
Kris Gesling 05e96935d4
Merge pull request #2673 from MycroftAI/remove/speaking-utils
remove deprecated speaking utils
2020-08-21 00:32:35 +00:00
Kris Gesling b444d00ccf remove previously deprecated speaking utils 2020-08-18 23:31:07 +09:30
Kris Gesling 666178c483 remove unnecessary remove_last_slash method 2020-08-18 23:06:42 +09:30
Kris Gesling ed46311cd8 remove unnecessary get_http method 2020-08-18 23:04:53 +09:30
Åke Forslund 2dde23467c Let lingua franca check extract_duration lang
Mycroft doesn't need to check for supported languages for
extract_duration, lingua_franca handles that internally.
2020-08-07 07:47:11 +02:00
Åke Forslund 1258480f30 Improve audio utils log 2020-04-27 08:38:44 +02:00
Åke Forslund 707be52f21 Update time util docstrings 2020-04-17 23:42:04 +02:00
Åke Forslund 313aaa660d Improve documentation of download util 2020-04-17 23:42:04 +02:00
Åke Forslund c5dccc16e2 Improve getting tmp download path 2020-04-17 23:42:04 +02:00
Åke Forslund 3a908a1e35 Minor cleanup of download docstrings and imports 2020-04-17 23:42:04 +02:00
Åke Forslund 06157e3331 Reuse ensure_directory_exists() in create_file()
ensure_directory_exists() now takes the directory permissions as an
optional argument.
2020-04-17 23:42:04 +02:00
Åke Forslund 26ef052891 Minor cleanups
- Remove superfluous parentheses
- Remove unneccessary pass
2020-04-17 23:42:04 +02:00
Åke Forslund aa42552d97 Refactor test change loglevel and add tests for process_utils 2020-04-17 23:42:04 +02:00