Commit Graph

344 Commits

Author SHA1 Message Date
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
jo 3dbc1205d0 Start linting with mypy 2021-09-10 15:14:48 +02:00
jo ceb40ee216 Use shared python makefile and start linting
Always update setuptools/wheel/pip

Never fail while linting

We use github annotations to impove the code incrementally.
2021-09-10 15:14:46 +02:00
jo 0d88d17f7c Use setup extra_requires for dev/prod dependencies
Also add pylint by default.
2021-09-10 13:45:27 +02:00
jo c9e35b1f62 Update setup tools project details 2021-09-02 15:45:37 +02:00
jo fb3ee2d27a Install venv instead of virtualenv 2021-08-31 16:07:29 +02:00
jo 01141606fd libpq-dev is required for psycopg2 in production
This is a package for the API.
2021-08-31 16:07:29 +02:00
jo 18f9c81b74 Add dependencies manager
Used to generate list of packages dependencies
for different distributions, and should improve
dependencies management by having them in each project.
This tools should gather the reason why a dependency is present,
so one can remove it when unused.

Rename deps script to packages

Move installer/packages to scripts and write tests

Remove packages-list make target
2021-08-31 16:07:21 +02:00
Kyle Robbertze 4f765ebb2d remove debug statement 2021-08-12 10:08:38 +02:00
Kyle Robbertze 7e1be7b028 Truncate schedule items that run over the time of the containing show
Fixes: #1272
2021-08-12 10:08:38 +02:00
jo 01fbd1e8b9 Add isort pre-commit hook
Sort import statement in python files

See https://github.com/PyCQA/isort
2021-06-05 00:39:35 +02:00
jo b26de72704 Remove python encoding pragma 2021-06-05 00:39:23 +02:00
jo ced4fea3e1 Fix libretime-api 2021-06-04 17:06:05 +02:00
jo 5e9f99ed7e More spelling fix (dangerous) 2021-06-04 17:06:05 +02:00
jo f2e840989a Fix executable bit 2021-06-04 17:06:05 +02:00
jo c27f020d73 Format code using black 2021-06-04 17:06:05 +02:00
jo efe4fa027e Format code using prettier 2021-06-04 17:04:53 +02:00
jo ac17db97fc Fix missing encoding pragma on python files 2021-06-04 17:04:53 +02:00
Kyle Robbertze 2df0189a90 add API v2 2021-05-14 13:04:46 +02:00
paul.baranowski edd7351b76 Removed the API directory, all of it has been moved to application/controllers/ApiController.php 2010-12-15 14:25:42 -05:00
paul.baranowski 3613812012 Pypo fixes and improvements
General:
 * Moved pypo author info into one file
 * Added two database columns in schedule table: "schedule_group_played"
   and "media_item_played".

API clients:
 * Created get_liquidsoap_data() function which allows you
   to give arbitrary data to liquidsoap.
 * Added documentation
 * Renamed functions to make it more obvious what is happening

pypo_cli:
 * Got rid of more constants that were not needed
 * Created function set_export_source() to reduce code repetition
 * Separated the downloading of the schedule from tracking what has
   been played.  The tracking info is now kept in a separate file.
   This fixes the major bug that the playlist keeps restarting for
   the first minute of playback.
 * converted more print statements to debug statements

pypoTester:
 * Now uses samples from the audio_samples directory, and schedules two
   audio clips back-to-back.
2010-11-29 18:34:22 -05:00
paul.baranowski 7ade83ae74 Fixes to the liquidsoap scheduler and the API.
Added a test() function to api_client.
Fixed bug with the config file.
Added line numbers to the logging.
2010-11-18 18:00:13 -05:00
paul.baranowski 8014f94c58 Fixed whitespace to standard coding conventions. 2010-11-18 14:39:03 -05:00
paul.baranowski 8a58df3093 Moved all file-related functions from BasicStor into StoredFile class.
Got rid of all the stuff related to GUNID hex-to-int conversion.
Commented out lots of functions that are either not in use or will
no longer work.

Pypo: made things more generic and pluggable, added documentation.
Added the PHP scripts to serve the right info back to pypo.
2010-11-12 17:07:01 -05:00
paul.baranowski 35dc3fd01f CC-1713 - New storage directory structure
Changed the GUNID to a 32 hex string (MD5 value), there is no more
conversion between hex strings and bigints in the database anymore.

Added added the file extension to the file name.

Stored the complete path to the file in the database.  This means that
linking doesnt need to create any files at all. (It used to create a
symlink to the file you were importing)

The structure and file naming should be fine - there are 4096 possibilities
for the first directory level, and even will a million files this is only
244 files per sub-directory.  The GUID is fine for the file name
2010-11-11 16:50:30 -05:00