Commit graph

91 commits

Author SHA1 Message Date
henry
b902352139
New Plugin: Titlecase (#6133)
This plugin aims to address the shortcomings of the %title function, as
brought up in issues #152, #3298 and an initial look to improvement with
#3411. It supplies a new string format command, `%titlecase` which
doesn't interfere with any prior expected behavior of the `%title`
format command.

It also adds the ability to apply titlecase logic to metadata fields
that a user selects, which is useful if you, like me, are looking for
stylistic consistency and the minor stylistic differences between
Musizbrainz, Discogs, Deezer etc, with title case are slightly
infuriating.

This will add an optional dependency of
[titlecase](https://pypi.org/project/titlecase/), which allows the
titlecase core logic to be externally maintained.

If there's not enough draw to have this as a core plugin, I can also
spin this into an independent one, but it seemed like a recurring theme
that the %title string format didn't really behave as expected, and I
wanted my metadata to match too.

- [x] Documentation. (If you've added a new command-line flag, for
example, find the appropriate page under `docs/` to describe it.)
- [x] Changelog. (Add an entry to `docs/changelog.rst` to the bottom of
one of the lists near the top of the document.)
- [x] Tests. - Not 100% coverage, but didn't see a lot of other plugins
with testing for import stages.
2025-11-23 10:34:05 -08:00
Šarūnas Nejus
bef249e616
Fix format-docs command 2025-11-11 04:03:52 +00:00
Šarūnas Nejus
881549e83c
Enable all pyupgrade lint rules 2025-11-08 12:09:52 +00:00
Šarūnas Nejus
a7830bebae
Update python requirement and dependencies 2025-11-08 11:55:20 +00:00
Šarūnas Nejus
cbd74b3167
Update confuse 2025-10-28 10:26:35 +00:00
Šarūnas Nejus
e76665bcfb
Do not support 3.14 for now, until we drop 3.9 in a couple of days 2025-10-28 10:26:34 +00:00
Šarūnas Nejus
3eb68ef830
Use cross-platform shutil.get_terminal_size to get term_width
This fixes Python 3.14 incompatibility.
2025-10-27 08:23:37 +00:00
Šarūnas Nejus
1ea3879aae
Upgrade librosa and audioread 2025-10-27 08:23:37 +00:00
Šarūnas Nejus
a938449b29
Add Sphinx extension for configuration value documentation
Create a custom Sphinx extension to document configuration values with
a simplified syntax. It is based on the `confval` but takes less space
when rendered. The extension provides:

- A `conf` directive for documenting individual configuration values
  with optional type and default parameters
- A `conf` role for cross-referencing configuration values
- Automatic formatting of default values in the signature
- A custom domain that handles indexing and cross-references

For example, if we have

.. conf:: search_limit
    :default: 5

We refer to this configuration option with :conf:`plugins.discogs:search_limit`.

The extension is loaded by adding the docs/extensions directory to the
Python path and registering it in the Sphinx extensions list.
2025-10-19 01:34:32 +01:00
snejus
c1877b7cf5 Increment version to 2.5.1 2025-10-14 22:51:15 +00:00
Šarūnas Nejus
61cbc39c4a
Revert "Add git commit suffix to __version__ for development installs (#5967)" 2025-10-14 23:39:27 +01:00
Šarūnas Nejus
efe1a67e84
Revert "Fix dynamic versioning plugin not correctly installed in workflow (#6094)"
This reverts commit dc9b498ee8, reversing
changes made to 77842b72d7.
2025-10-14 23:38:01 +01:00
Sebastian Mohr
31488e79da Removed additional linebreaks. 2025-10-14 12:58:54 +01:00
Sebastian Mohr
ac31bee4ca Reverted placeholder. 2025-10-14 12:58:54 +01:00
Sebastian Mohr
d01f960e4f Fixed an issue where the poetry-dynamic-versioning-plugin was not used in
release artifacts.

Also adds a test_release workflow which allows to create the release
distribution.
2025-10-14 12:58:54 +01:00
Sebastian Mohr
3a6769d3b9 Set sphinx dependencies as optional 2025-10-11 13:52:35 +02:00
Sebastian Mohr
1270364796 Modernized getting started guide. 2025-10-11 13:52:35 +02:00
semohr
6faa4f3ddd Increment version to 2.5.0 2025-10-11 09:58:48 +00:00
Sebastian Mohr
f6ca68319d
Add git commit suffix to __version__ for development installs (#5967)
Make it obvious when beets is installed from from a non
major version. When installed locally this adds a git hash suffix and
the distance to the last release.

closes #4448
2025-10-01 12:58:57 +02:00
JOJ0
e837598e79 Increment version to 2.4.0 2025-09-13 16:47:21 +00:00
Šarūnas Nejus
b7e5357914
Run only html by default but allow adjustments 2025-09-04 12:52:37 +01:00
J0J0 Todos
67dd355968
docs: Ensure cleanup in poe docs shortcut
otherwise Sphinx output is unpredictable!
2025-09-04 12:49:47 +01:00
Sebastian Mohr
1c6921758c
Capitalization and some more minor adjustments. Updated docstrfmt. 2025-09-04 12:49:46 +01:00
Sebastian Mohr
83eda27051
Update docstrfmt 2025-09-04 12:49:44 +01:00
Šarūnas Nejus
b3d434f58f
Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
1c16b2b308
Replace string concatenation (' + ')
- Join hardcoded strings
- Replace concatenated variables with f-strings
2025-08-30 23:10:15 +01:00
Šarūnas Nejus
9352a79e41
Replace percent formatting 2025-08-30 22:35:00 +01:00
Šarūnas Nejus
4a361bd501
Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
Šarūnas Nejus
1129170ddc
Configure docstrfmt 2025-08-10 16:25:04 +01:00
Šarūnas Nejus
15b0c052b6
Add sphinx-lint and run it in CI 2025-08-10 14:04:42 +01:00
Sebastian Mohr
dc6f07d705 Added typing_extensions to all python version. Removed sys.version checks 2025-08-04 11:19:14 +02:00
Šarūnas Nejus
46318a113c
Install gstreamer1.0-plugins-base, python3-gst-1.0 for bpd 2025-07-16 14:06:35 +01:00
Ben Stolovitz
2f98f11d57 fix local langdetect test failures
avoid linter error

avoid other linter error

fix format

changing deps (no lock!)

poetry lock?

lint & format

attempt 2 at poetry lock

crlf -> lf line endings

changelog!
2025-05-31 18:56:21 -04:00
snejus
d487d675b9 Increment version to 2.3.1 2025-05-14 09:53:19 +00:00
Šarūnas Nejus
28781e9077
Pin Poetry version <2 2025-05-14 10:42:07 +01:00
snejus
250b0da900 Increment version to 2.3.0 2025-05-07 22:34:25 +00:00
Šarūnas Nejus
fdc1aba603
Replace typing.cast with explicit type definitions and ignore TC006 2025-05-07 20:39:33 +01:00
Šarūnas Nejus
63c23c32ed
Add missed out python versions to package classifiers 2025-05-07 10:24:04 +01:00
Šarūnas Nejus
921b7ed9ea
Rewrite legalisation tests for readability 2025-05-04 12:23:26 +01:00
Benedikt
43301c4caa
fixup #5701 (#5745)
which added some mypy config to pyproject.toml, leading to mypy ignoring
setup.cfg
 (this shows up in CI output for #5701, but is not very visible
since we currently ignore mypy errors)

Related: https://github.com/beetbox/beets/pull/5728
2025-04-20 10:43:10 +02:00
Sebastian Mohr
2f57dd9e1c Added missing return types. 2025-04-18 23:03:32 +02:00
Šarūnas Nejus
fc49902f3a
Refactor lyrics backend tests to use pytest fixtures
- Replaced unittest.mock with pytest fixtures for better test isolation and readability.
- Simplified test cases by using parameterized tests.
- Added `requests-mock` dependency to `pyproject.toml` and `poetry.lock`.
- Removed redundant helper functions and classes.
2025-01-19 01:33:15 +00:00
valrus
c9afb8664b Add types-mock for typechecking 2024-12-31 17:22:53 -08:00
Šarūnas Nejus
420117b598
Track assignment: replace munkres with lapjv
See the following comparison between several implementations to solve
this problem: https://github.com/berhane/LAP-solvers
2024-12-27 10:16:28 +00:00
Arsen Arsenović
994f9b83f1 pyproject.toml: don't install docs et al into the wheel
wheels are directly unpacked into site-packages, so this means likely
conflict with other packages
2024-12-19 05:12:04 +00:00
Šarūnas Nejus
5c81f94cf7
Move imports required for typing under the TYPE_CHECKING block 2024-12-10 06:10:04 +00:00
Šarūnas Nejus
7be8f9c97a
Update CI config, minimum ruff version, docs and add changelog note 2024-12-10 06:10:03 +00:00
Šarūnas Nejus
88deb07890
Drop Python 3.8 from the package, update dependencies 2024-12-10 06:08:14 +00:00
Šarūnas Nejus
ed3a53f2fe
Exclude plugin tests, include all files from MANIFEST.in 2024-12-10 05:51:09 +00:00
snejus
f92c0ec8b1 Increment version to 2.2.0 2024-12-02 06:56:49 +00:00