Commit Graph

74 Commits

Author SHA1 Message Date
Jonas L 41df76eed0
feat(api): replace uwsgi with gunicorn (#1785)
Related to #1719

BREAKING: The uwsgi packages and configuration files (`/etc/airtime/libretime-api.ini`) should be removed from the system.
2022-04-25 16:09:19 +02:00
Jonas L dc92661c49
chore(api): move uswgi config in api/install (#1781) 2022-04-21 07:14:35 +02:00
Jonas L 28fc8360a3
fix(api): prevent timing attacke on api key (#1771) 2022-04-17 18:55:18 +02:00
Jonas L 9d5de61241
chore(api): add mypy django stubs plugins (#1726) 2022-04-09 12:18:23 +02:00
Kyle Robbertze beebe79edd
ci: generate schema and push to api-client repo (#1740)
* chore(api): add schema generation make target

* ci: generate schema and push to api-client repo
2022-04-08 15:38:58 +02:00
jo 0bbd46c33f refactor(api): fix pylint errors 2022-04-04 15:20:22 +02:00
jo bf8db3e6f0 chore(api): add pylint-django plugin 2022-04-04 15:20:22 +02:00
Jonas L fce988aef1
feat(api): split api into multiple apps (#1626)
Fixes #1622

- split the api into 4 apps: core, history, schedule, storage
- exploded the settings into testing/prod
2022-04-04 14:38:50 +02:00
Jonas L 8c96c0a094
feat: remove unused python3-venv package (#1728) 2022-04-02 05:41:43 +02:00
Kyle Robbertze cbcd0abcae
chore(api): add API metadata (#1723) 2022-04-01 15:17:40 +02:00
Jonas L 7e9c9a2792
chore: rename vagrant devices (#1716) 2022-03-29 14:25:34 +02:00
jo e5d6216e1d feat(api): include id in file/webstream serializers 2022-03-06 15:17:44 +02:00
Jonas L f5bb31e971
fix(api): static_url settings is required in dev mode (#1662) 2022-03-04 15:50:05 +02:00
jo 2dcc654b70 feat(api): load config using shared helpers
- add django settings module documentation
- use default for previously required fields

BREAKING CHANGE: The API command line interface require the
configuration file to be present. The default configuration file path is
`/etc/airtime/airtime.conf`
2022-03-02 22:03:56 +02:00
jo 9af717ef7f feat(api): remove admin app and static files
- remove django admin app,
- disable static files for production deployment,
- keep the rest framework browsable api in dev mode.
2022-03-02 22:03:56 +02:00
jo 4da8d8c06b fix(api): model_bakery is a dev dependency 2022-03-02 22:03:56 +02:00
Jonas L d55e58e416
chore: auto generate requirements.txt (#1651)
- force LC_ALL for the sort command
2022-02-28 20:02:01 +02:00
Jonas L 98cea4dcd2
feat(api): improve uwsgi systemd integration (#1614) 2022-02-19 09:03:25 +02:00
jo 924b7f8f46 test(api): add bandit linter check 2022-02-14 21:01:35 +02:00
Jonas L 3245216869
feat(legacy): add db config defaults and allow custom port (#1559)
* feat(legacy): allow custom port for database connection

- fix heredoc for php72

* update test config db section

* update sample config db section

* update api db config

* use defaults for database config section

* update documentation

* more documentation for migration
2022-02-04 16:03:01 +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 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 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
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 0d25a330cf
chore: rename common section to python (#1509)
this will make the section more explicite,
in addition, this allow to exclude python deps
on docker images for example.
2022-01-13 07:12:50 +02:00
jo e84137a8ee chore: fixes after libretime_api rename 2022-01-04 09:18:58 +02:00
jo 6de242db65 chore: rename libretimeapi dir to libretime_api 2022-01-04 09:18:58 +02:00
Jonas L 4057c88cf0
feat: debian 11 support (#1292)
* Debian 11 Support

Run api ci test on bullseye as well

* Silan does not work for mp3 on bullseye

* Liquisoap does not fail with wma files on bullseye
2021-11-09 11:21:40 +02:00
Kyle Robbertze 7182390000
feat: add support for Ubuntu Focal 20.04 (#1168)
Co-authored-by: Valerio Bozzolan <gnu@linux.it>
2021-11-04 09:55:50 +02:00
Kyle Robbertze 6ca1ca2aec
feat: run API tests in CI (#1421)
* feat: run API tests in CI

* fix: remove incorrect test for guest user viewing themself
2021-10-18 14:17:34 +02:00
Jonas L 7384dd7a2f
feature: Use setuptools entrypoints (#1409)
* Use console_scripts entrypoint for libretimeapi

* Use console_scripts entrypoint for playout
2021-10-18 09:44:39 +02:00
Jonas L 30b3470a06
Better format enforcing (#1391)
* Add shared python format-check target

* Add .format-check to api lint target

* Format api code with makefile format target

* Add .format-check to tools lint target

* Add .format-check to analyzer lint target

* Format analyzer code with makefile format target

* Add .format-check to celery lint target

* Add .format-check to api_client lint target

* Format api_client code with makefile format target

* Add .format-check to playout lint target

* Run CI linting in parallel

* Disable isort in pre-commit
2021-10-17 16:24:37 +02:00
Kyle Robbertze 1274b2d849
Add openapi spec for API v2 (#1388) 2021-10-16 20:34:03 +02:00
jo c4c89eae19 Fix paths after legacy rename 2021-10-11 13:43:39 +02:00
jo 7f7ce0acb2 Fix api2 permissions check 2021-10-08 06:04:43 +02:00
jo 6013434393 Install api with prod extra requires 2021-10-01 17:49:33 +02:00
Kyle Robbertze 77a07f4b83 make check sequence a tuple 2021-09-22 15:27:40 +02:00
Kyle Robbertze 8ca356303b correctly filter schedule items based on is_valid
Fixes: #1360
2021-09-21 21:42:57 +02:00
Kyle Robbertze 6caa29e0c9 filter out invalid schedule items 2021-09-21 11:36:49 +02:00
jo fc02f8cafb Cleanup 2021-09-19 22:39:10 +02:00
jo f84e40dc06 Small refactoring 2021-09-19 22:38:49 +02:00
jo d8c5206e2e Fix cueout for overlapping starts & ends schedule 2021-09-19 20:48:19 +02:00
jo aad92c4ac1 Revert 77315885b9
And remove prod extra requires for api because ./setup.py install
don't handle extra requires.
2021-09-17 07:23:26 +02:00
jo c2df85c751 Cleanup redondant/useless requirements 2021-09-13 14:44:32 +02:00
jo d12e232a6f Add format target in makefiles 2021-09-13 14:43:18 +02:00
jo 3a336375c2 Setup python_requires to >=3.6
Fix python_requires format
2021-09-10 15:14:48 +02:00