#88 #89 : use pytest + reorganise settings (#92)

- !88 pytest on existing tests
- !89 reorganise settings (! see notes for deployment)

Co-authored-by: bkfox <thomas bkfox net>
Reviewed-on: rc/aircox#92
This commit is contained in:
Thomas Kairos
2023-03-28 14:40:49 +02:00
parent 4bebc56a28
commit 0e183099ed
31 changed files with 511 additions and 368 deletions

View File

@ -20,7 +20,7 @@ Where:
To check quality of files, call the command sound_quality_check using the
parameters given by the setting AIRCOX_SOUND_QUALITY. This script requires
parameters given by the setting SOUND_QUALITY. This script requires
Sox (and soxi).
"""
import logging
@ -29,7 +29,7 @@ from datetime import datetime, timedelta
from watchdog.events import PatternMatchingEventHandler
from aircox import settings
from aircox.conf import settings
from aircox.models import Sound
from .sound_file import SoundFile
@ -121,7 +121,7 @@ class MonitorHandler(PatternMatchingEventHandler):
def __init__(self, subdir, pool, **sync_kw):
"""
:param str subdir: sub-directory in program dirs to monitor \
(AIRCOX_SOUND_ARCHIVES_SUBDIR or AIRCOX_SOUND_EXCERPTS_SUBDIR);
(SOUND_ARCHIVES_SUBDIR or SOUND_EXCERPTS_SUBDIR);
:param concurrent.futures.Executor pool: pool executing jobs on file
change;
:param **sync_kw: kwargs passed to `SoundFile.sync`;
@ -132,7 +132,7 @@ class MonitorHandler(PatternMatchingEventHandler):
patterns = [
"*/{}/*{}".format(self.subdir, ext)
for ext in settings.AIRCOX_SOUND_FILE_EXT
for ext in settings.SOUND_FILE_EXT
]
super().__init__(patterns=patterns, ignore_directories=True)