Commit Graph

45 Commits

Author SHA1 Message Date
renovate[bot] 7a3fffd45f
chore(deps): update pre-commit hook psf/black-pre-commit-mirror to v24 (#2917)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[psf/black-pre-commit-mirror](https://togithub.com/psf/black-pre-commit-mirror)
| repository | major | `23.12.1` -> `24.1.1` |

Note: The `pre-commit` manager in Renovate is not supported by the
`pre-commit` maintainers or community. Please do not report any problems
there, instead [create a Discussion in the Renovate
repository](https://togithub.com/renovatebot/renovate/discussions/new)
if you have any questions.

---

### Release Notes

<details>
<summary>psf/black-pre-commit-mirror
(psf/black-pre-commit-mirror)</summary>

###
[`v24.1.1`](https://togithub.com/psf/black-pre-commit-mirror/compare/24.1.0...24.1.1)

[Compare
Source](https://togithub.com/psf/black-pre-commit-mirror/compare/24.1.0...24.1.1)

###
[`v24.1.0`](https://togithub.com/psf/black-pre-commit-mirror/compare/23.12.1...24.1.0)

[Compare
Source](https://togithub.com/psf/black-pre-commit-mirror/compare/23.12.1...24.1.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/libretime/libretime).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jo <ljonas@riseup.net>
2024-02-02 20:24:25 +01:00
jo ce27615a24 refactor(playout): rename PypoLiquidsoap to Liquidsoap 2023-04-03 15:29:36 +01:00
jo 114a599993 fix(playout): use new api-client v1 2023-03-22 12:13:59 +00:00
jo 74af2112a6 fix(playout): quote incompatible <py3.9 type hints 2023-03-22 09:11:56 +00:00
jo b7214b5d46 feat: add sentry sdk 2023-03-14 14:59:45 +00:00
jo 719464a272 refactor(playout): add more typings 2023-03-04 17:06:16 +02:00
jo a77321190f refactor(playout): fix linting errors 2023-03-04 17:06:16 +02:00
jo f09d0ec3c6 refactor(playout): remove unused recorder 2023-03-04 17:06:16 +02:00
jo 0b3dbe8505 chore(playout): disable amqp debug logs 2023-03-04 17:06:16 +02:00
jo 5042704d42 feat(playout): don't serialize message twice 2023-03-04 17:06:16 +02:00
jo 7d1f9252b2 chore(playout): remove banner in logs 2023-02-27 06:42:33 +02:00
jo e88e843b65 refactor(playout): add typings and fix linting errors
move EVENT_KEY_FORMAT to events module
properly type fetch queue
event start/end can be str or datetime
2023-02-26 20:05:12 +01:00
jo 861698987c refactor: don't use f-string on logging statements
The strings are now be formatted if the logging level is enabled.
2023-02-26 19:09:51 +02:00
jo c6940db289 feat: replace loguru with logging 2023-02-26 19:09:51 +02:00
jo f8f6fda794 chore: raise from specific exceptions 2023-02-03 07:36:58 +02:00
jo 4ada25a3ff fix(playout): add types
This reverts commit d6348d5575.
2022-10-11 09:28:52 +02:00
jo a79980e65f feat(playout): move message handling to main thread 2022-09-16 13:16:06 +02:00
jo b1c2e34ceb fix(playout): remove shutdown_handler 2022-09-16 13:16:06 +02:00
jo 64b3d164c9 refactor(playout): move daemon flag to thread class 2022-09-16 12:33:44 +02:00
Jonas L 03902f6aef
fix(playout): also shutdown on SIGTERM (#2104) 2022-09-08 12:41:56 +02:00
jo 314c70a208 feat(playout): stats collector using stream config 2022-09-06 13:21:54 +02:00
jo d6348d5575 fix(playout): py36 compatibility broken typings
This partially reverts commit 5505222df6.
2022-09-01 19:17:33 +02:00
jo 5505222df6 refactor(playout): rename vars and add typing 2022-08-21 16:13:34 +02:00
jo 1d59310156 refactor(playout): simplify legacy api check 2022-08-21 16:13:34 +02:00
jo da6458caea feat(playout): integrate new liquisoap client 2022-08-17 13:18:13 +02:00
Jonas L bddbdf716c
chore(playout): remove unused code (#2058) 2022-08-14 19:56:48 +02:00
Jonas L 1147853c63
feat(shared): pass config data via init (#2042) 2022-08-12 15:12:39 +02:00
Jonas L 4019367abc
feat(playout): rewrite stats collector (#2028)
- Replace defusedxml with lxml
2022-08-09 21:14:19 +02:00
Jonas L 9413bd5a29
refactor(playout): improve exceptions handling (#2027) 2022-08-09 21:05:21 +02:00
jo d9725003c5 feat(playout): integrate api-client v2 calls 2022-07-26 15:14:45 +02:00
Jonas L 368350b269
feat(playout): use single clients instance (#1980)
- Use legacy_client across playout code to make the difference between the old and new clients.
- Setup clients during initialization, and pass clients down to the different apps.
2022-07-22 16:26:43 +02:00
jo 473e770e8a feat: rename AirtimeApiClient to ApiClient 2022-07-22 15:00:38 +02:00
jo 8cb9bd5f32 chore(playout): update api-client imports 2022-07-22 15:00:38 +02:00
Jonas L 7e2f2d60f0
chore(playout): restructure modules (#1971) 2022-07-18 15:11:47 +02:00
jo 2bc7d64cc4 feat(playout): use liquidsoap version functions
- remove "packaging" package
2022-07-17 13:29:03 +02:00
jo 2ad65bba8c chore(playout): use comments instead of docstrings 2022-07-01 13:16:57 +02:00
Jonas L d098671f3b
feat: replace click envar with auto_envvar_prefix (#1829) 2022-05-05 09:41:32 +02:00
jo 32cb67806a chore: add pyupgrade pre-commit hook
- add --py3-plus flag to pyupgrade hook
- add --py36-plus flag to pyupgrade hook
2022-01-27 10:37:48 +02:00
jo 13852bb6db refactor(playout): remove unused imports 2022-01-24 12:46:40 +02:00
jo fa7692071c feat(playout): load config using shared helpers
- backport >=py38 Literal type
- update configuration sample
- add missing config filepath to systemd service
- make config sections optional

BREAKING CHANGE: the playout config schema has been changed like the following:
- the top section 'pypo' was renamed to 'playout'
- the 'playout.ls_*' entries were renamed to 'playout.liquidsoap_*'
- the 'playout.*_dir' entries were removed
- the 'playout.api_client' entry was removed
- the 'playout.record_file_type' entry was renamed to 'playout.record_file_format'
- the 'playout.base_recorded_files' entry was removed
- the 'playout.poll_interval' entry was removed
- the 'playout.push_interval' entry was removed
- the 'playout.cue_style' entry was removed
2022-01-24 12:46:40 +02:00
jo 12f96f5043 feat(playout): change playout working directory
- use working dir for storing files

BREAKING CHANGE:  the playout working directory changed from '/var/tmp/airtime/pypo/' to '/var/lib/libretime/playout' when running with systemd and the current directory by default.
2022-01-24 12:46:40 +02:00
Jonas L 1561353b20
feat(shared): allow cli parametrized decorators (#1527) 2022-01-20 07:30:35 +02:00
Jonas L 5c72f714a8
feat(playout): enhance playout logging (#1495)
Some initial work on modernizing the playout app. This replace any custom logger or
logging based logger with the logging tools from libretime_shared.logging and loguru.

Removed all the thread/function assigned logger (self.logger = ...), as this makes it
part of the logic (passing logger though function args) as it should not.

Of a dedicated logger is required for a specific task, it should use
the create_task_logger function.

- refactor: remove dead code
- refactor: remove py2 specific fix
- feat: remove unused test command
- feat: setup shared cli and logging tools
- feat: replace logging with loguru
- feat: setup shared cli and logging tools for notify
- fix: warn method deos not exist
- feat: make cli setup the entrypoint
- fix: install shared modules globally in production
  use extra_requires to load local packages in dev environement
- feat: configure log path in systemd service
- feat: default behavior is to log to console only
- feat: create log dir during install
- chore: add comment
- fix: don't create useless dir in install
- fix: move notify logs to /var/log/libretime dir
- fix: update setup_logger attrs
- style: linting
- fix: replace verbosity flag with log-level flag
- feat: use shared logging tool in liquidsoap
- fix: pass logger down to api client
- feat: allow custom log_filepath in liquidsoap config
- chore: add pylintrc to playout
- refactor: fix pylint errors
- feat: set liquidsoap log filepath in systemd service
- fix: missing setup entrypoint update

BREAKING CHANGE: for playout and liquidsoap the default log file path changed to None
and will only log to the console when developing / testing. Unless you are running the
app as a systemd service (production) the default logs filepaths changed:
from "/var/log/airtime/pypo/pypo.log" to "/var/log/libretime/playout.log" and
from "/var/log/airtime/pypo-liquidsoap/ls_script.log" to "/var/log/libretime/liquidsoap.log"

BREAKING CHANGE: for playout-notify the default log file path changed
from "/var/log/airtime/pypo/notify.log" to "/var/log/libretime/playout-notify.log"
2022-01-13 17:11:37 +02:00
jo b6795432b6 chore: fix linting in libretime_playout 2022-01-04 09:18:58 +02:00
jo 318b36b6b2 chore: rename pypo dir to libretime_playout 2022-01-04 09:18:58 +02:00