beets/test
Tai Lee e6ac8e1646 Use a Distance object instead of floats for distance calculations.
The new Distance object knows how to perform various types of distance
calculations (expression, equality, number, priority, string).

It will keep track of each individual penalty that has been applied so
that we can utilise that information in the UI and when making decisions
about the recommendation level.

We now display the top 3 penalties (sorted by weight) on the release
list (and "..." if there are more than 3), and we display all penalties
on the album info line and track change line.

The implementation of the `max_rec` setting has been simplified by
removing duplicate validation and instead looking at the penalties that
have been applied to a distance. As a result, we can now configure a
maximum recommendation for any penalty that might be applied.

We have a few new checks when calculating album distance:

`match: preferred: countries` and `match: preferred: media` can each be
set to a list of countries and media in order of your preference. These
are empty by default. A value that matches the first item will have no
penalty, and a value that doesn't match any item will have an unweighted
penalty of 1.0.

If `match: preferred: original_year` is set to "yes", beets will apply
an unweighted penalty of 1.0 for each year of difference between the
release year and the original year.

We now configure individual weights for `mediums` (disctotal), `label`,
`catalognum`, `country` and `albumdisambig` instead of a single generic
`minor` weight. This gives more control, but more importantly separates
and names the applied penalties so that the UI can convey exactly which
fields have contributed to the overall distance penalty.

Likewise, `missing tracks` and `unmatched tracks` are penalised and
displayed in the UI separately, instead of a combined `partial` penalty.

Display non-MusicBrainz source in the disambiguation string, and
"source" in the list of penalties if a release is penalised for being
a non-MusicBrainz.
2013-06-02 18:25:10 +10:00
..
rsrc add tests for ALAC (#295) 2013-06-01 17:44:21 -07:00
__init__.py misc. overdue code cleanup 2010-07-09 18:07:15 -07:00
_common.py simplify materialization in LazyConfig 2013-05-17 19:10:44 -07:00
test_art.py API/test enhancements for #257 2013-04-27 16:47:42 -07:00
test_autotag.py Use a Distance object instead of floats for distance calculations. 2013-06-02 18:25:10 +10:00
test_db.py fix #281: album art filename respects replace 2013-05-19 10:34:46 -07:00
test_files.py tests: remove ad-hoc temporary directories 2013-02-18 18:23:32 -08:00
test_ihate.py ihate plugin: ver 1.0 - initial import 2012-10-05 02:37:21 +03:00
test_importer.py test: move DummyIO initialization to harness 2013-02-18 18:29:10 -08:00
test_mb.py fix tests for ID parsing (#291) 2013-05-29 14:51:16 -07:00
test_mediafile.py fix crash when RG fields set to null 2013-02-24 16:10:18 -08:00
test_mediafile_basic.py add tests for ALAC (#295) 2013-06-01 17:44:21 -07:00
test_pipeline.py happy new year 2013-01-11 10:43:41 -08:00
test_player.py happy new year 2013-01-11 10:43:41 -08:00
test_query.py add tests for matching floating-point ranges 2013-05-09 15:49:38 -07:00
test_template.py happy new year 2013-01-11 10:43:41 -08:00
test_the.py combine TempConfigTestCase and ExtraAsserts 2012-12-15 13:21:09 -08:00
test_ui.py Use a Distance object instead of floats for distance calculations. 2013-06-02 18:25:10 +10:00
test_vfs.py fix VFS tests 2013-04-06 16:35:17 -07:00
test_zero.py remove singleton enforcement from plugins 2013-01-31 12:13:19 -08:00
testall.py Fix python namespaces for test runs 2013-04-07 01:32:47 +02:00