Skip to content

Conversation

Vrihub
Copy link
Contributor

@Vrihub Vrihub commented Sep 19, 2025

Description

Here are some documentation updates and improvements, mainly concerning beets installation and setting up a working copy for development.

f22b595 improves CONTRIBUTING.rst

  • poetry shell now requires the corresponding poetry plugin to be installed
  • The link to the pull request "great tutorial" currently points to a conference, I retrieved the original tutorial URL via archive.org and restored it. help needed: the tutorial was last updated 5 years ago, I'm not sure if it's still up-to-date with the current state of github; maybe we should point to the github help pages instead? e.g. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
  • The suggested vim editor settings were a bit outdated, the current python ftplugin shipped with vim already implements them; plus I added a couple of other plugins which might be of interest
  • pre-commit: it was just mentioned shortly in the "How to Submit Your Work" section; I moved it to the "Development Tools" section, alongside poetry and poe, and added short instructions to install and setup pre-commit

57f26fe replaces pip with pipx in the documentation files

pip has long been deprecated to install end-user applications (such as beets) in favour of pipx (see PEP 668). I replaced all the occurrences where we suggest using pip to install beets, and updated the corresponding command line examples using the correct pipx options.

In some occasions, I've kept pip examples because they are still relevant (e.g. when showing how to install extras, in case a previous installation was done using pip, see below), and added the corresponding pipx examples.

help needed: BTW installation via pip is also still suggested in the beets homepage, I think we should replace it with pipx there too.

I've also made a few related improvements to some files:

  • README.rst: just mention the 3 main ways to install (distro packages, pipx, github) and point to guides/main.rst and faq.rst for detailed instructions (avoiding duplication)
  • guides/main.rst: help needed: I don't know about installation on windows, macosx and ARM; is it OK to replace pip->pipx there too? I guess so (pipx is available for windows and macosx too), but I'd like to have confirmation; please let me know and I'll update the PR
  • plugins/index.rst: help needed: I've also added information about how to install extras into an already existing beets installation (which I think is the most common use case: the user typically installs "plain" beets, then learns about plugins later, and then has to install extras to enable plugins). I've covered three scenarios, depending on how beets was installed (via pip, pipx, or linux distribution packages), please give some feedback about that.

To Do

  • Please give feedback about the items marked above as help needed
  • Documentation.
  • Changelog. (oops, I'll add it in a future commit)
  • Tests

Poetry shell plugin, link to pull request tutorial, vim editor settings,
pre-commit setup, some wording improvements.
Replaced pip with pipx (except where pip is still relevant).
Re-arranged and added some clarifications about installation options,
installing from sources and installing extras.
@Vrihub Vrihub requested a review from a team as a code owner September 19, 2025 10:22
Copy link
Contributor

sourcery-ai bot commented Sep 19, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refines contributing guidelines and modernizes installation documentation by migrating from pip to pipx, streamlining README and guides, and enhancing plugin installation instructions for extras.

File-Level Changes

Change Details Files
Improve CONTRIBUTING.rst with updated guidance
  • Require poetry shell plugin explicitly
  • Restore original PR tutorial link via archive.org
  • Remove outdated Vim ftplugin suggestions
  • Relocate and expand pre-commit installation instructions
CONTRIBUTING.rst
Overhaul main installation docs to use pipx and streamline options
  • Replace pip install commands with pipx for end-user installation
  • Consolidate install methods in README with links to detailed guides
  • Update guides/main.rst and reference/config.rst with pipx usage
  • Retain pip examples where extras installation requires it
README.rst
docs/guides/main.rst
docs/faq.rst
docs/reference/config.rst
Migrate plugin documentation examples from pip to pipx
  • Update plugin install commands to show pipx usage
  • Ensure pip examples appear only where extras require it
docs/plugins/absubmit.rst
docs/plugins/aura.rst
docs/plugins/autobpm.rst
docs/plugins/beatport.rst
docs/plugins/bpd.rst
docs/plugins/chroma.rst
docs/plugins/discogs.rst
docs/plugins/embedart.rst
docs/plugins/embyupdate.rst
docs/plugins/fetchart.rst
docs/plugins/kodiupdate.rst
docs/plugins/lastgenre.rst
docs/plugins/lastimport.rst
docs/plugins/lyrics.rst
docs/plugins/metasync.rst
docs/plugins/mpdstats.rst
docs/plugins/plexupdate.rst
docs/plugins/replaygain.rst
docs/plugins/scrub.rst
docs/plugins/sonosupdate.rst
docs/plugins/thumbnails.rst
docs/plugins/web.rst
Add extras installation scenarios in plugin index
  • Document extras setup for pip, pipx, and distro-package installs
  • Provide clear instructions depending on initial install method
docs/plugins/index.rst

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Decide on a single authoritative link for the “great tutorial”—either use the GitHub Docs PR guide or confirm the archived link is still accurate and up-to-date.
  • Verify and consolidate the pipx installation instructions across Windows, macOS, and ARM to ensure the commands work consistently on all platforms.
  • Add a CHANGELOG entry summarizing the switch from pip to pipx and the other docs improvements before merging.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Decide on a single authoritative link for the “great tutorial”—either use the GitHub Docs PR guide or confirm the archived link is still accurate and up-to-date.
- Verify and consolidate the pipx installation instructions across Windows, macOS, and ARM to ensure the commands work consistently on all platforms.
- Add a CHANGELOG entry summarizing the switch from pip to pipx and the other docs improvements before merging.

## Individual Comments

### Comment 1
<location> `CONTRIBUTING.rst:345-346` </location>
<code_context>
+This will turn on syntax highlighting and load the standard vim filetype plugin
+for python files (with proper settings for indentation etc).
+
+Here's a few vim plugins that you might find useful to improve your vim python
+experience:
+
</code_context>

<issue_to_address>
**issue (typo):** Change 'Here's a few' to 'Here are a few' for subject-verb agreement.

Use 'Here are a few vim plugins' to ensure proper subject-verb agreement.

```suggestion
Here are a few vim plugins that you might find useful to improve your vim python
experience:
```
</issue_to_address>

### Comment 2
<location> `docs/guides/main.rst:68` </location>
<code_context>

-If you have pip_, just say ``pip install beets`` (or ``pip install --user
-beets`` if you run into permissions problems).
+If your distribution doesn't still ship the latest regular release of beets, you
+can install it via pipx_ in a dedicated python virtual environment, which won't
+interfere with other python packages provided by your distribution. Just
</code_context>

<issue_to_address>
**suggestion (typo):** Change 'doesn't still ship' to 'doesn't yet ship' for clarity.

'Doesn't yet ship' is more idiomatic and improves clarity.

```suggestion
If your distribution doesn't yet ship the latest regular release of beets, you
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +345 to +346
Here's a few vim plugins that you might find useful to improve your vim python
experience:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Change 'Here's a few' to 'Here are a few' for subject-verb agreement.

Use 'Here are a few vim plugins' to ensure proper subject-verb agreement.

Suggested change
Here's a few vim plugins that you might find useful to improve your vim python
experience:
Here are a few vim plugins that you might find useful to improve your vim python
experience:


If you have pip_, just say ``pip install beets`` (or ``pip install --user
beets`` if you run into permissions problems).
If your distribution doesn't still ship the latest regular release of beets, you
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (typo): Change 'doesn't still ship' to 'doesn't yet ship' for clarity.

'Doesn't yet ship' is more idiomatic and improves clarity.

Suggested change
If your distribution doesn't still ship the latest regular release of beets, you
If your distribution doesn't yet ship the latest regular release of beets, you

Copy link
Contributor

@semohr semohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I agree that the contribution guide could use some improvements. This was also a pain point for me when I got started, it contains too much unnecessary content. In my opinion, the guide should be much smaller and more concise, with most of the details moved into the developer documentation.

It might be helpful to look at how other open source projects handle this. For example, numpyis a good reference, and I’m also pretty happy with the guides in beets-flask.

I’ve added comments with some ideas and suggestions, please don’t take them as requirements!

Regarding your help needed items:

  • I would keep guides/main.rst as it is. There is #5807 which changes this quite a bit.
  • plugins/index.rst looks good to me 👍


- poetry_ for packaging, virtual environment and dependency management
- poethepoet_ to run tasks, such as linting, formatting, testing
- pre-commit_ to automatically run formatting tasks before each commit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add an optional note here as pre-commit is not a requirement just a qol addition.

applications such as above. pipx_ installs each application in an isolated
virtual environment, where its dependencies will not interfere with your system
and other CLI tools.
You can install these tools using your distribution's package management system,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like the following would be better suited. E.g. I'm using conda which works for me 🙃

For development, we recommend installing tools in isolated environments to avoid dependency conflicts. In this guide, we’ll use pipx...

On the other hand, it may get tedious to type ``poetry run`` before every
command. Instead, you can activate the virtual environment in your shell with:

::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move all of the poetry and poe related content into a own section. Seems ill fitted in the getting the source code section.

$ poe test --lf # re-run failing tests (note the additional pytest option)
$ poe check-types --pretty # check types with an extra option for mypy
Finally, pre-commit_ helps us to automatically run some poe tasks before each
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This includes to much fluff in my opinion. A short mention should be enough here:

You may use pre-commit to automatically run all linting and formatting task before each commit. To activate pre-commit in your local repository run pre-commit install.

you are confused at all about how to contribute or what to contribute, take a
look at `this great tutorial <http://makeapullrequest.com/>`__, or stop by our
`discussion board`_ if you have any questions.
look at `this great tutorial`_ or stop by our `discussion board`_ if you have
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch on the link! I normally just reference the official github guide for contribution guides.

Comment on lines 213 to 230
Do you have a great bug fix, new feature, or documentation expansion you’d like
to contribute? Follow these steps to create a GitHub pull request and your code
will ship in no time.

1. Fork the beets repository and clone it (see above) to create a workspace.
2. Install pre-commit, following the instructions `here
<https://pre-commit.com/>`_.
3. Make your changes.
4. Add tests. If you’ve fixed a bug, write a test to ensure that you’ve actually
1. Fork the beets repository, clone it and install the development tools
following the instructions above.
2. Make your changes.
3. Add tests. If you’ve fixed a bug, write a test to ensure that you’ve actually
fixed it. If there’s a new feature or plugin, please contribute tests that
show that your code does what it says.
5. Add documentation. If you’ve added a new command flag, for example, find the
4. Add documentation. If you’ve added a new command flag, for example, find the
appropriate page under ``docs/`` where it needs to be listed.
6. Add a changelog entry to ``docs/changelog.rst`` near the top of the document.
7. Run the tests and style checker, see :ref:`testing`.
8. Push to your fork and open a pull request! We’ll be in touch shortly.
9. If you add commits to a pull request, please add a comment or re-request a
5. Add a changelog entry to ``docs/changelog.rst`` near the top of the document.
6. Run the tests and style checker, see :ref:`testing`.
7. Push to your fork and open a pull request! We’ll be in touch shortly.
8. If you add commits to a pull request, please add a comment or re-request a
review after you push them since GitHub doesn’t automatically notify us when
commits are added.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general it feels like this could be more concise. We have already talked about many of these things already. E.g. repo should be setup...

Maybe we can reword this and put it at the top as a quick start guide for experienced open source contributors.

Comment on lines 331 to +352
Editor Settings
~~~~~~~~~~~~~~~

Personally, I work on beets with vim_. Here are some ``.vimrc`` lines that might
help with PEP 8-compliant Python coding:
Personally, I work on beets with vim_. To get a nice python working environment
in vim, be sure to include the following lines in your ``.vimrc``:

::

filetype indent on
autocmd FileType python setlocal shiftwidth=4 tabstop=4 softtabstop=4 expandtab shiftround autoindent
syntax on
filetype plugin indent on

Consider installing `this alternative Python indentation plugin
<https://github.com/mitsuhiko/vim-python-combined>`__. I also like `neomake
<https://github.com/neomake/neomake>`__ with its flake8 checker.
This will turn on syntax highlighting and load the standard vim filetype plugin
for python files (with proper settings for indentation etc).

Here's a few vim plugins that you might find useful to improve your vim python
experience:

- `neomake <https://github.com/neomake/neomake>`__, with its flake8 checker.
- `vim-flake8 <https://github.com/nvie/vim-flake8>`__, another interface to
flake8.
- `VOoM outliner <https://www.vim.org/scripts/script.php?script_id=2657>`__, can
help to navigate big python files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my first time reading this section in detail, and I don’t think it belongs in the contributing guide. Some of the information could be moved into the developer resources in the documentation instead. In general, I think we’d be better off relocating much of this content out of the guide.

(see details here_). Beets has also been packaged in the `software
repositories`_ of several distributions. Check out the `Getting Started`_ guide
for more information.
Beets has been packaged in the `software repositories`_ of several
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d keep the old README. Why remove the pip instructions? For most users, this one line and maybe a pypi link is all they need to get started. We can change it to pipx install beets but I wouldn't remove it entirely.

Also, many distribution repositories are outdated, so I wouldn’t emphasize them, especially not in the opening sentence.


1. Uninstall beets. If you installed using ``pip``, you can just run ``pip
uninstall beets``.
1. Uninstall beets using the tools in your distribution, or, if you installed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here again pip/pipx should take precedence over distributions.

behind, so make sure you read the right version of these docs. If you want the
latest version, you can get everything you need to install with pip as
described below by running: ``apt-get install python-dev python-pip``
latest version, you can get everything you need to install with pipx as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to rebase onto #5807. I improved this section slightly in the PR I'm hoping it is approved at some point 🥲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants