Commit graph

57 commits

Author SHA1 Message Date
jo
15cd4e58dc Properly test metadata unparsable file 2021-06-08 14:28:18 +02:00
jo
f84af8aa2e Remove old unicode prefix 2021-06-08 14:28:18 +02:00
jo
bec298d63f Fix missing mutagen 2021-06-08 14:24:32 +02:00
jo
9f88f82404 Fix inconsistent test across env
Liquidsoap version in CI is different from debian buster
and on test about playability is failing because of
this unhandled versions mismatch.
2021-06-08 14:24:32 +02:00
jo
bafa6fc6d8 Add comment in pytest conftest 2021-06-08 14:24:32 +02:00
jo
8b7d6f8a7e Migrate metadata_analyzer_test to pytest 2021-06-08 14:24:32 +02:00
jo
9639010ba6 Fix tests naming 2021-06-08 14:24:32 +02:00
jo
d94193ce57 Migrate analyzer_pipeline_test to pytest 2021-06-08 14:24:32 +02:00
jo
23d02bf959 fix: Temp dir path might contain underscores 2021-06-08 14:24:32 +02:00
jo
21c8aa65db Add extra comment on helper function 2021-06-08 14:24:32 +02:00
jo
6700b4b8e0 Extract common fixtures in conftest.py 2021-06-08 14:24:32 +02:00
jo
6dee626cbd Migrate filemover_analyzer_test to pytest 2021-06-08 14:24:32 +02:00
jo
b37a095414 Migrate playability_analyzer_test to pytest 2021-06-08 14:24:32 +02:00
jo
efcbd26447 Migrate replaygain_analyzer_test to pytest 2021-06-08 14:24:32 +02:00
jo
5ff923887d Migrate cuepoint_analyzer_test to pytest 2021-06-08 14:24:32 +02:00
jo
591b62ebee Migrate analyzer_test to pytest 2021-06-08 14:24:32 +02:00
jo
3522c3c86e Remove empty test file 2021-06-08 14:24:32 +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
5eb357520e Rename tests to test in airtime_analyzer 2021-06-04 17:06:05 +02:00
jo
c27f020d73 Format code using black 2021-06-04 17:06:05 +02:00
jo
ac17db97fc Fix missing encoding pragma on python files 2021-06-04 17:04:53 +02:00
Kyle Robbertze
6f6d90fad7 update replaygain values 2021-05-21 16:15:50 +02:00
Lucas Bickel
e21abf1bf1 refactor(airtime_analyzer): rename to libretime-analyzer and make entrypoint pythonic 2021-01-04 10:30:27 +00:00
Kyle Robbertze
82042e8c69 fix test failures 2020-04-29 19:06:52 +02:00
Kyle Robbertze
632ba9acfe convert print statements to py3 2020-04-29 19:05:35 +02:00
Robbt
a2573b52d2 fixed bad operator 2018-12-13 08:58:59 -05:00
Robbt
f673d92edd modified bitrates to match new mutagen values 2018-12-13 08:53:52 -05:00
vagrant
2ee85f0546 made mp3 bitrate test a range vs. exact number because of variation in results from different mutagen versions 2018-12-04 00:35:24 +00:00
Lucas Bickel
f7ceeedb04 (Amazon S3) drop broken S3 support 2018-10-06 12:45:22 +02:00
Lucas Bickel
188c127057 Merge branch 'master' into feature/analyzer-on-travis
# Conflicts:
#	.travis.yml
2017-03-04 16:35:11 +01:00
Lucas Bickel
9b3d0c90da mostly run analyzer tests on travis
* [x] regonfigured the build matrix with more php jobs and a separate python job (we can add more python jobs later)
* [x] run tests on travis' trusty beta container (it's closer to what we need anyway)
* [x] install packages needed for analyzer tests in build env
* [x] added docs on how to run nosetests locally
* [x] don't run initctl in analyzer setup so setup can also be used on travis (and add it to the install script directly)
* [x] ignore replaygain checks on travis (it has proven quite impossible to get the needed python-gi module to work in the provided virtualenv)

I tried a lot of solutions to get the replaygain checks to run. I needed to decide that this has gone far enough, maybe someone who is more of a pythonista than me can take a crack at it and get it solved. Even without running those tests on CI/CD there are still plenty others.

This PR only has parts of what are needed for getting python tests running on travis as per #15. I only took a quick shot at anything not analyzer and figured I would not be able to "fix" them without digging a bit deeper (ie. also getting rid of std_err_override).
2017-03-03 20:38:27 +01:00
Lucas Bickel
e28ad471f9 Rewrite config from /etc/airtime-saas to plain /etc/airtime
This is the results of sed -i -e 's|/etc/airtime-saas/|/etc/airtime/|' `grep -irl 'airtime-saas' airtime_mvc/ python_apps/` :P

It might need more testing, the airtime-saas part never really made sense, zf1 has environments for that, ie you would create a saas env based on production for instance.

I beleive legacy upstream was using this to share configuration between customers (ie. analyser runs only once and writes to a shared S3 bucket). I assume they mount the airtime-saas folder onto individual customers instances with a global config. Like I said, I don't feel that this makes sense since all it does is make hacking at the configs in airtime-saas a bit easier. A serious SaaS operation should be using something like puppet or ansible to achieve this.
2017-03-03 15:57:41 +01:00
Albert Santoni
76f202106b Defensive coding against Silan bugs and bump to Mutagen 1.31 2015-10-30 17:12:13 -04:00
Albert Santoni
28fc1cf2fc Fixed some airtime_analyzer unit tests 2015-04-10 15:08:44 -04:00
Albert Santoni
37f9f273c7 Fixed the airtime_analyzer unit tests 2015-02-24 17:03:38 -05:00
Albert Santoni
70f5bd3748 Fixed the unit tests 2015-02-19 10:17:42 -05:00
drigato
cee0ff4881 SAAS-560: Deploy separate cloud storage config files for each development environment
Default to production config files if dev env specific files are not
found.
Fix analyzer unit tests.
2015-02-05 14:31:20 -05:00
Albert Santoni
2793509781 Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into saas
Conflicts:
	python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py
	python_apps/airtime_analyzer/airtime_analyzer/message_listener.py
2015-02-02 13:17:26 -05:00
Albert Santoni
9baed1b328 Make the unit tests pass again 2015-02-02 13:14:14 -05:00
drigato
29c5cf5de0 Merge branch 'cc-5709-airtime-analyzer' into cc-5709-airtime-analyzer-cloud-storage 2015-01-15 17:21:26 -05:00
drigato
52a66632c6 SAAS-539: Analyzer can return values in scientific notation which are not compatible with Airtime
Fix unit tests
2015-01-15 17:17:29 -05:00
Albert Santoni
9a8b34feae Unit test tweak for CloudStorage 2014-12-19 14:03:28 -05:00
Albert Santoni
1718868835 Stub CloudStorageAnalyzer tests 2014-12-19 12:59:20 -05:00
Albert Santoni
dbfb2fc69b CC-5739: Added Liquidsoap playability test to airtime_analyzer 2014-12-11 15:45:45 -05:00
Albert Santoni
3b1c776879 Removed all ReplayGain and Silan stuff from pypo, plus a bugfix
* Ripped out all the ReplayGain and Silan analysis from pypo, since
  it's now implemented in airtime_analyzer. This fixes a bunch of
  race conditions.
* Also renamed the replaygain field to replay_gain in airtime_analyzer
  to match Airtime.
2014-12-11 14:26:05 -05:00
Albert Santoni
4dd2768755 ReplayGain analysis in airtime_analyzer using python-rgain
* Implemented Replaygain analysis for Ogg Vorbis, MP3, MP4, and FLAC
  using python-rgain
* Added unit tests for ReplayGainAnalyzer
* Squashed stderr output in ReplayGainAnalyzer and CuePointAnalyzer
* Clean up
2014-12-11 14:12:41 -05:00
Albert Santoni
38bd45b8dc Silan cue-in/out analysis now moved to airtime_analyzer
* Added a new CuePointAnalyzer using silan (will remove silan stuff from pypo later)
* Makes silan analysis slightly more reliable for certain short files.
* Fixes CC-5961: Audio duration cutoff for WAVE files
* Added unit tests for the new analyzer and improved code coverage slightly
* Added unit tests for WAVE metadata extraction and an invalid WMA file
2014-12-10 18:44:35 -05:00
Albert Santoni
e84f765696 Better FileMover permissions unit test (passes as root) 2014-07-07 15:53:25 -04:00
Albert Santoni
bc72a6626e CC-5709: Airtime Analyzer
* Fixed some unit tests that broken when I dropped python-magic in
  favour of mutagen for MIME type detection
2014-04-23 18:20:50 -04:00