Commit Graph

17415 Commits

Author SHA1 Message Date
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 21aaf9bca1 chore: upgrade pre-commit hooks 2022-01-27 10:37:48 +02:00
Jonas L e740267ee4
chore(legacy): upgrade propel1 dependency (#1512) 2022-01-26 23:18:18 +02:00
jo 7393db50e0 test: require lint to succeed for shared/ and tools/ 2022-01-26 10:15:35 +02:00
jo bed5436a6e chore: split dev requirement from package install 2022-01-26 10:15:35 +02:00
jo e862e9f280 test(tools): fix mypy linters 2022-01-26 10:15:35 +02:00
jo 9de82bb568 chore: make linters config consistent in pyproject.toml
- remove mypy config from makefile
2022-01-26 10:15:35 +02:00
jo 7988b7467b test: allow to set python linters to fail per app 2022-01-26 10:15:35 +02:00
jo b9502bc203 test(shared): fix linting 2022-01-26 10:15:35 +02:00
jo 1a1f0488d5 test(shared): ignore pylint warning 2022-01-26 10:15:35 +02:00
jo 0f8cb1a5ed chore: set python build system in pyproject.toml
- fix local package install
- local packages requirement url format
2022-01-26 10:15:35 +02:00
jo 441028a1d2 chore: make setup.py file chdir consistent 2022-01-26 10:15:35 +02:00
Jonas L 1924919e18
fix(shared): type is required for default config submodel (#1536)
We cannot load submodels values from environment variables without having the submodel type annotations.
2022-01-24 15:24:16 +02:00
jo d93fb44356 feat(analyzer): analyze cuepoint using ffmpeg
- store cue(in|out) as strings
- reraise when executable was not found

BREAKING CHANGE: The analyzer requires 'ffmpeg'. The 'silan' system dependency can be removed.
2022-01-24 12:54:31 +02:00
jo ceab19271d feat(analyzer): analyze replaygain using ffmpeg
- remove pycairo pip install
- fix py36 compatibility
- reraise when executable was not found

BREAKING CHANGE: The analyzer requires 'ffmpeg'. The 'rgain3' python package and it's system dependencies can be removed.
2022-01-24 12:54:31 +02:00
jo bf7b0d44fb test(analyzer): update fixtures
- add fixture with > 2 silences
2022-01-24 12:54:31 +02:00
jo 6a919a9805 test(analyzer): rename and remove unused imports 2022-01-24 12:54:31 +02:00
jo 7aba20f1ac test(shared): check config using optional sections
fix missing DatabaseConfig rename
2022-01-24 12:46:40 +02:00
jo 13852bb6db refactor(playout): remove unused imports 2022-01-24 12:46:40 +02:00
jo 1c50b28500 refactor(playout): move constants in config 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
jo 32bea651f6 chore: add root clean target 2022-01-24 12:46:40 +02:00
Weblate (bot) 12968c02c5
chore: translated using weblate (Turkish) (#1531)
Currently translated at 41.7% (400 of 959 strings)

Translation: LibreTime/Legacy
Translate-URL: https://hosted.weblate.org/projects/libretime/legacy/tr/

Co-authored-by: ToldYouThat <itoldyouthat@protonmail.com>
2022-01-24 07:07:18 +02:00
Jonas L 8569af9328
style(legacy): force semicolon on same line (#1534) 2022-01-23 20:15:55 +02:00
jo 522d989cab fix(analyzer): install missing steps package 2022-01-21 11:54:00 +02:00
jo aa2d1ff4c7 refactor(analyzer): simplify entrypoint
The AbstractApp only make it more complex.
2022-01-21 11:54:00 +02:00
jo 35d38df9d3 feat(analyzer): load config using shared helpers
- make rabbitmq config optional
2022-01-21 11:54:00 +02:00
jo b527c2704d feat(shared): add suffix to shared config models 2022-01-21 11:54:00 +02:00
Weblate (bot) 76069006b5
chore: Translations update from Hosted Weblate (#1529)
* chore: translated using weblate (Turkish)

Currently translated at 41.7% (400 of 959 strings)

Translation: LibreTime/Legacy
Translate-URL: https://hosted.weblate.org/projects/libretime/legacy/tr/

* chore: translated using weblate (Turkish)

Currently translated at 42.1% (404 of 959 strings)

Translation: LibreTime/Legacy
Translate-URL: https://hosted.weblate.org/projects/libretime/legacy/tr/

Co-authored-by: ToldYouThat <itoldyouthat@protonmail.com>
2022-01-21 11:17:46 +02:00
Jonas L 1561353b20
feat(shared): allow cli parametrized decorators (#1527) 2022-01-20 07:30:35 +02:00
dependabot[bot] 2de1ce6e0d
chore: bump php-amqplib/php-amqplib from 3.1.1 to 3.1.2 in /legacy (#1526)
Bumps [php-amqplib/php-amqplib](https://github.com/php-amqplib/php-amqplib) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/php-amqplib/php-amqplib/releases)
- [Changelog](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md)
- [Commits](https://github.com/php-amqplib/php-amqplib/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: php-amqplib/php-amqplib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 12:06:38 +02:00
jo 2cae31a97a refactor(analyzer): redefine *_analyzer into steps
- update imports and names
- define step as a protocol
- extract analyzer function from classes
2022-01-18 11:18:19 +02:00
jo f6a52c8324 refactor(analyzer): rename analyzer files 2022-01-18 11:18:19 +02:00
jo 2a8da1e931 test(shared): assert key is from file 2022-01-18 11:14:24 +02:00
jo b1ecf25d6f feat(shared): allow loading from ini config file 2022-01-18 11:14:24 +02:00
jo 65dff91d47 fix(shared): tmp_path fixture type mismatch 2022-01-18 11:14:24 +02:00
jo 100784cb78 fix(shared): prevent child override by empty dict 2022-01-18 11:14:24 +02:00
Jonas L f42d67d41d
fix(legacy): api migration config variable name (#1522) 2022-01-18 09:36:40 +02:00
Jonas L 5364911922
feat(playout): migrate notify cli to click (#1519)
Fixes #1502

- replace notify option parser with click
- refactor call from liquidsoap to playout-notify

BREAKING CHANGE: the libretime-layout-notify log file in '/var/log/airtime/pypo-liquidsoap/notify.log' was removed and merged into the existing '/var/log/libretime/liquidsoap.log' log file.
2022-01-17 11:51:32 +02:00
Jonas L fe0b2c4a7a
feat(analyzer): enhance analyzer cli and logging (#1507)
Some initial work on modernizing the analyzer app. This replace any custom logger or `logging` based logger with the logging tools from `libretime_shared.logging` and `loguru`.

- rename cli to main
- use pathlib in setup.py
- add api-client and shared package as dev deps
- rework main entrypoint cli to use click and shared helpers
- remove unused imports
- replace logging with logger
- rework analyzer app using shared abstract app
- move analyzer log path to systemd service
- change analyzer working dir

BREAKING CHANGE: The analyzer cli has been reworked and uses new flags / environnement variables for configuration.
`--debug` flag becomes `--log-level <level>`
`--rmq-config-file` flag becomes `--config <filepath>`
`--http-retry-queue-file` flag becomes `--retry-queue-filepath`.
`retry-queue-filepath` default value changed from `/tmp/airtime_analyzer_http_retries` to `retry_queue` in the working dir.
`LIBRETIME_CONF_DIR` environnement variable replaced by `LIBRETIME_CONFIG_FILEPATH`.

BREAKING CHANGE: When running analyzer as a systemd service, the working directory is now /var/lib/libretime/analyzer.
2022-01-17 10:26:30 +02:00
jo bf59f20ffd feat(api): allow to run without log file for dev
BREAKING CHANGE: moved production api log file
from '/var/log/airtime/api.log' to '/var/log/libretime/api.log'
2022-01-17 09:49:22 +02:00
jo 401808d7d1 fix(api): duplicate exception raising and close file 2022-01-17 09:49:22 +02:00
jo ad7686e8a7 feat(api): update env var settings loading
BREAKING CHANGE: environment variables names changed
'LIBRETIME_CONF_DIR' was removed
'LIBRETIME_CONF_FILE' was renamed to 'LIBRETIME_CONFIG_FILEPATH'
2022-01-17 09:49:22 +02:00
Jonas L 19faffea16
fix: make vagrant source.list update idempotent (#1520) 2022-01-17 09:33:09 +02:00
Kyle Robbertze 8b4260d74b fix(legacy): correct linting issues 2022-01-15 00:51:01 +01:00
jo dc93189962 fix(shared): require click >=8.0.3 2022-01-14 19:36:40 +02:00
jo b37f4f7509 fix(playout): optional log_file for liquidsoap 2022-01-14 19:36:40 +02:00
Jonas L 4443528cf8
ci: cancel duplicate test workflow (#1513) 2022-01-13 19:35:42 +02:00
Jonas L c2cd1c28b8
chore: rename master branch to main (#1508) 2022-01-13 16:03:31 +00:00