Commit graph

46 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
a7830bebae
Update python requirement and dependencies 2025-11-08 11:55:20 +00:00
Šarūnas Nejus
d64efbb6c1
Upgrade deps before upgrade 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
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
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
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
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
7a79adb1e6
Update Python deps 2025-07-17 13:30:31 +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
Šarūnas Nejus
28781e9077
Pin Poetry version <2 2025-05-14 10:42:07 +01:00
Šarūnas Nejus
16a6cb1340
Update dependencies
And thus address the following security vulnerabilities: https://github.com/beetbox/beets/security/dependabot
2025-05-07 10:24:05 +01: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
Šarūnas Nejus
88deb07890
Drop Python 3.8 from the package, update dependencies 2024-12-10 06:08:14 +00:00
Šarūnas Nejus
f39eb984ca
Update dependencies 2024-11-26 16:06:29 +00:00
Jack Wilsdon
4c22c1bbea Update mediafile to 0.13.0 2024-11-03 20:31:10 +00:00
Šarūnas Nejus
826783d4c3
Define docs dependencies as an extra
Seems like readthedocs build expects docs dependencies to be available
as an extra, see one of the failing builds: https://app.readthedocs.org/projects/beets/builds/26079213/.

You can see this has been failing due to missing 'pydata_sphinx_theme':

    raise ThemeError(__('no theme named %r found (missing theme.toml?)') % name)
    sphinx.errors.ThemeError: no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
    Theme error:
    no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
2024-10-30 11:55:55 +00:00
Šarūnas Nejus
06a5ecaf80
Replace isort and black by ruff format 2024-09-21 11:29:24 +01:00
Šarūnas Nejus
f8ef22348b
Replace flake8 by ruff 2024-09-21 11:28:43 +01:00
Arav K.
87cd81d481 Add dependency on 'platformdirs' 2024-09-20 23:27:36 +02:00
Šarūnas Nejus
255ac4bc2f
Update dependencies 2024-09-04 19:06:55 +01:00
Šarūnas Nejus
06ca500ff2
Do not install reflink for tests on Windows 2024-09-04 18:56:19 +01:00
Šarūnas Nejus
49cae5ca23
autobpm: Fix the issue with tempo being a numpy array 2024-08-19 22:44:16 +01:00
Šarūnas Nejus
03cf567a90
autobpm: Add autobpm extra and update the docs
Given that librosa has been introducing breaking changes like there's no
tomorrow, use '^' version specifier to only allow updating the patch
version.
2024-08-19 22:44:16 +01:00
Arkadiy Illarionov
89f1bda4e0 Update poetry.lock 2024-06-22 16:18:56 +03:00
Šarūnas Nejus
2800a323a2
Revert "Make queries fast, filter all flexible attributes (#5240)"
This reverts commit 143b9202f3, reversing
changes made to 8508a57d77.
2024-06-19 21:51:44 +01:00
Šarūnas Nejus
e61c7d637d
fixup! Add ability to debug queries 2024-06-16 19:46:03 +01:00
Šarūnas Nejus
1862c7367b
Add ability to debug queries 2024-06-16 15:28:45 +01:00
Šarūnas Nejus
fa788e2e5a
Remove flake8-docstrings and its exclusion rules 2024-06-15 13:09:33 +01:00
Šarūnas Nejus
e3075b76e0
Move dependencies required for release to a separate group 2024-06-15 04:25:50 +01:00
Šarūnas Nejus
b29c9a83b9
Upgrade black, pin it below v25 2024-06-14 16:16:51 +01:00
Šarūnas Nejus
6d3b76d3ef
Update dependencies 2024-06-10 13:46:27 +01:00
Šarūnas Nejus
f3df90c9ff
Revert "Add poethepoet to dependencies for devs"
This reverts commit fc373f5fef8c8dd1656dfdf31c14b3365a0a75bc.

See CONTRIBUTING.rst which has tools setup guidelines for users. They
are expected to install both poetry and poethepoet globally in their
system.
2024-06-10 13:46:26 +01:00
Serene-Arc
35533b3807
Add poethepoet to dependencies for devs 2024-06-10 13:46:26 +01:00
Šarūnas Nejus
bfd9753314
Remove tox
Unfortunately tox does not play very nicely with Poetry. Tox was mostly
useful since it managed virtual environments, however now this is done
by Poetry.

Thus we do not anymore need it since we can run our commands using
`poetry run`. I have extended the internal helper tool 'project' with
those commands that have previously been run using tox.
2024-06-10 13:46:25 +01:00
Šarūnas Nejus
7bbd215efc
Update all docs with Poetry 2024-06-10 13:10:16 +01:00
Šarūnas Nejus
90263a9e9e
Use poetry in workflows 2024-06-10 13:10:16 +01:00
Šarūnas Nejus
614ba1d3d6
Configure pyproject.toml 2024-06-10 13:10:13 +01:00