- Handle formats as strings ONLY and evaluate them through a shared
cached template helper.
- This removes the need for conditional logic that acts on Template
objects or strings.
- Move test files from the top-level `test/` directory into
package-specific folders like `test/dbcore/`, `test/plugins/`,
`test/util/`, and `test/extra/`.
- Keep test coverage the same, but make the test suite match the
codebase structure more closely. This makes ownership and navigation
clearer, and helps reviewers find related tests faster.
- Add the large file-move commit to `.git-blame-ignore-revs` so `git
blame` stays useful and points at real logic changes instead of this
mechanical reorganization.
#### What changed
- Reorganized tests so they live closer to the subsystem they cover:
- query parsing tests moved from `test/test_dbcore.py` to
`test/test_queryparse.py`
- utility/path tests moved from `test/test_files.py` to
`test/test_util.py`
- Added shared lightweight db test fixtures in `beets/test/fixtures.py`,
and updated tests to import `ModelFixture1` and `SortFixture` from
there.
- Added the related refactor commits to `.git-blame-ignore-revs` so `git
blame` stays focused on real logic changes.
#### Why this matters
- The test suite is now structured by responsibility instead of growing
large mixed-purpose test files.
- Shared fixtures remove duplicate dbcore test setup and make cross-file
reuse simpler.
- This lowers coupling between test modules and makes future test
changes easier to find and review.
#### High-level impact
- Test-only refactor; no production behavior changes.
- Improves maintainability, readability, and ownership of the test
architecture.
- Keeps blame history cleaner after the test file split.
This PR refactors configuration and logging initialization in the beets
UI layer.
Logging is no longer implicitly configured as a side effect of import;
it is now initialized explicitly during UI startup. This allows library
users to fully control logging configuration themselves, and enables
more granular logging setup based on user configuration (future PR).
It also clarifies startup order by deferring heavier initialization
until after logging is available for proper error reporting.
---
This is related to the multi-step efforts to improve logging in beets
https://github.com/beetbox/beets/issues/6553
## Description
Every `.py` file in the repo carries the full 13-line MIT license text
as a header. The license is already shipped in the distribution, it's in
the top-level `LICENSE` file and included in our sdist/wheels.
Duplicating it across 170+ source files is just noise imo: it pushes the
actual code down, adds nothing for users or contributors, and creates
churn whenever a new file is scaffolded.
This PR strips the headers from all Python files. No functional change,
purely cosmetic cleanup.
```
wheel: 651,685 -> 615,351 bytes (―36 KB)
sdist: 2,382,290 -> 2,369,828 bytes (―12 KB)
────
total: -48 KB
```
## Description
Include `coverArt` in album API requests and parse the `coverArts`
resources from the included array. The `cover_art_url` is passed to
`AlbumInfo(cover_art_url=...)`, which the fetchart plugin uses to
retrieve album art. Falls back to constructing a URL from the cover art
resource ID when no direct URL is available in the API response.
This updates the test config setup in `beets/test/helper.py` so
`ConfigMixin` always sets `config["create_backup_before_migrations"] =
False`.
Tests no longer create database backups whenever `Database` is
initialised. I saw a significant increase in test durations after #6742
was merged.
@semohr, as discussed:
- Extracts the Tidal fields shared by albums and tracks into a new
`Attributes` `TypedDict` in `beetsplug/tidal/api_types.py`.
- Updates parser helpers in `beetsplug/tidal/__init__.py` to depend on
`Attributes` instead of the `AlbumAttributes | TrackAttributes` union
when they only read common metadata like title, links, label, and
popularity.
- High-level impact: this reduces duplicated type definitions, makes the
shared contract clearer, and simplifies future changes to common Tidal
metadata without changing album- and track-specific types.
- Factor common album and track Tidal fields into a shared
MediaAttributes TypedDict.
- Use the shared type in parser helpers that only need common Tidal
metadata.
- Fix mypy: avoid {} default in relationships.get() that creates Never type
- Fix doc build: use :doc:\etchart\ instead of :doc:\plugins/fetchart\ from within plugins/ directory
- Consolidates `test/dbcore/test_sort.py` around a smaller set of
parameterized pytest cases instead of many near-duplicate test branches.
- Simplifies the test architecture by:
- sharing library setup through fixtures,
- expressing sort coverage through query strings instead of separate
sort object permutations,
- grouping related behavior into broader, table-driven tests.
- Tightens config-related tests to use the `config` fixture, which keeps
sort override assertions local to each test and avoids leaking global
config state.
- Reduces duplicate edge-case coverage for missing fields and mixed
field presence by keeping one clear representative path for each
behavior.
- High-level impact:
- no production sorting logic changes,
- same core sort behavior remains covered,
- test suite becomes easier to read, maintain, and extend,
- future sort changes should require updating fewer places.