Skip to content

Commit c9f59ee

Browse files
authored
Add broken link checker to integration test (#3703)
* fix broken links * add link check command to tox * add link check to the weekly integration test
1 parent f2a4864 commit c9f59ee

23 files changed

+76
-66
lines changed

.github/workflows/integration_test.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ jobs:
2727
run: |
2828
tox -e int
2929
30+
- name: Check external links in docs
31+
run: |
32+
tox -e links
33+
3034
- name: Notify on failure
3135
if: ${{ failure() }}
3236
env:

CONTRIBUTING.rst

+11-9
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Non-Programming
2828

2929
- Promote beets! Help get the word out by telling your friends, writing
3030
a blog post, or discussing it on a forum you frequent.
31-
- Improve the `documentation <http://beets.readthedocs.org/>`__. It’s
31+
- Improve the `documentation`_. It’s
3232
incredibly easy to contribute here: just find a page you want to
3333
modify and hit the “Edit on GitHub” button in the upper-right. You
3434
can automatically send us a pull request for your changes.
@@ -62,7 +62,7 @@ Getting the Source
6262
^^^^^^^^^^^^^^^^^^
6363

6464
The easiest way to get started with the latest beets source is to use
65-
`pip <https://pip.pypa.io/>`__ to install an “editable” package. This
65+
`pip`_ to install an “editable” package. This
6666
can be done with one command:
6767

6868
.. code-block:: bash
@@ -147,8 +147,7 @@ request and your code will ship in no time.
147147
5. Add a changelog entry to ``docs/changelog.rst`` near the top of the
148148
document.
149149
6. Run the tests and style checker. The easiest way to run the tests is
150-
to use `tox <https://tox.readthedocs.org/en/latest/>`__. For more
151-
information on running tests, see :ref:`testing`.
150+
to use `tox`_. For more information on running tests, see :ref:`testing`.
152151
7. Push to your fork and open a pull request! We’ll be in touch shortly.
153152
8. If you add commits to a pull request, please add a comment or
154153
re-request a review after you push them since GitHub doesn’t
@@ -253,7 +252,7 @@ guidelines to follow:
253252
Editor Settings
254253
---------------
255254

256-
Personally, I work on beets with `vim <http://www.vim.org/>`__. Here are
255+
Personally, I work on beets with `vim`_. Here are
257256
some ``.vimrc`` lines that might help with PEP 8-compliant Python
258257
coding::
259258

@@ -318,7 +317,7 @@ To install the test dependencies, run ``python -m pip install .[test]``.
318317
Or, just run a test suite with ``tox`` which will install them
319318
automatically.
320319

321-
.. _setup.py: https://github.com/beetbox/beets/blob/master/setup.py#L99`
320+
.. _setup.py: https://github.com/beetbox/beets/blob/master/setup.py
322321

323322
Writing Tests
324323
-------------
@@ -352,9 +351,9 @@ others. See `unittest.mock`_ for more info.
352351
.. _Python unittest: https://docs.python.org/2/library/unittest.html
353352
.. _Codecov: https://codecov.io/github/beetbox/beets
354353
.. _pytest-random: https://github.com/klrmn/pytest-random
355-
.. _tox: http://tox.readthedocs.org
356-
.. _detox: https://pypi.python.org/pypi/detox/
357-
.. _pytest: http://pytest.org
354+
.. _tox: https://tox.readthedocs.io/en/latest/
355+
.. _detox: https://pypi.org/project/detox/
356+
.. _pytest: https://docs.pytest.org/en/stable/
358357
.. _Linux: https://github.com/beetbox/beets/actions
359358
.. _Windows: https://ci.appveyor.com/project/beetbox/beets/
360359
.. _`https://github.com/beetbox/beets/blob/master/setup.py#L99`: https://github.com/beetbox/beets/blob/master/setup.py#L99
@@ -364,3 +363,6 @@ others. See `unittest.mock`_ for more info.
364363
.. _integration test: https://github.com/beetbox/beets/actions?query=workflow%3A%22integration+tests%22
365364
.. _unittest.mock: https://docs.python.org/3/library/unittest.mock.html
366365
.. _Python unittest: https://docs.python.org/2/library/unittest.html
366+
.. _documentation: https://beets.readthedocs.io/en/stable/
367+
.. _pip: https://pip.pypa.io/en/stable/
368+
.. _vim: https://www.vim.org/

docs/changelog.rst

+9-11
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Fixes:
196196
* ``beet update`` will now confirm that the user still wants to update if
197197
their library folder cannot be found, preventing the user from accidentally
198198
wiping out their beets database.
199-
Thanks to :user:`logan-arens`.
199+
Thanks to user: `logan-arens`.
200200
:bug:`1934`
201201
* :doc:`/plugins/bpd`: Fix the transition to next track when in consume mode.
202202
Thanks to :user:`aereaux`.
@@ -1273,7 +1273,7 @@ And there are a few bug fixes too:
12731273
The last release, 1.3.19, also erroneously reported its version as "1.3.18"
12741274
when you typed ``beet version``. This has been corrected.
12751275

1276-
.. _six: https://pythonhosted.org/six/
1276+
.. _six: https://pypi.org/project/six/
12771277

12781278

12791279
1.3.19 (June 25, 2016)
@@ -2119,7 +2119,7 @@ As usual, there are loads of little fixes and improvements:
21192119
* The :ref:`config-cmd` command can now use ``$EDITOR`` variables with
21202120
arguments.
21212121

2122-
.. _API changes: https://developer.echonest.com/forums/thread/3650
2122+
.. _API changes: https://web.archive.org/web/20160814092627/https://developer.echonest.com/forums/thread/3650
21232123
.. _Plex: https://plex.tv/
21242124
.. _musixmatch: https://www.musixmatch.com/
21252125

@@ -2344,7 +2344,7 @@ The big new features are:
23442344
* A new :ref:`asciify-paths` configuration option replaces all non-ASCII
23452345
characters in paths.
23462346

2347-
.. _Mutagen: https://bitbucket.org/lazka/mutagen
2347+
.. _Mutagen: https://github.com/quodlibet/mutagen
23482348
.. _Spotify: https://www.spotify.com/
23492349

23502350
And the multitude of little improvements and fixes:
@@ -2599,7 +2599,7 @@ Fixes:
25992599
* :doc:`/plugins/convert`: Display a useful error message when the FFmpeg
26002600
executable can't be found.
26012601

2602-
.. _requests: https://www.python-requests.org/
2602+
.. _requests: https://requests.readthedocs.io/en/master/
26032603

26042604

26052605
1.3.3 (February 26, 2014)
@@ -2780,7 +2780,7 @@ As usual, there are also innumerable little fixes and improvements:
27802780
Bezman.
27812781

27822782

2783-
.. _Acoustic Attributes: http://developer.echonest.com/acoustic-attributes.html
2783+
.. _Acoustic Attributes: https://web.archive.org/web/20160701063109/http://developer.echonest.com/acoustic-attributes.html
27842784
.. _MPD: https://www.musicpd.org/
27852785

27862786

@@ -3130,7 +3130,7 @@ will automatically migrate your configuration to the new system.
31303130
header. Thanks to Uwe L. Korn.
31313131
* :doc:`/plugins/lastgenre`: Fix an error when using genre canonicalization.
31323132

3133-
.. _Tomahawk: https://tomahawk-player.org/
3133+
.. _Tomahawk: https://github.com/tomahawk-player/tomahawk
31343134

31353135
1.1b3 (March 16, 2013)
31363136
----------------------
@@ -3473,7 +3473,7 @@ begins today on features for version 1.1.
34733473
* Changed plugin loading so that modules can be imported without
34743474
unintentionally loading the plugins they contain.
34753475

3476-
.. _The Echo Nest: http://the.echonest.com/
3476+
.. _The Echo Nest: https://web.archive.org/web/20180329103558/http://the.echonest.com/
34773477
.. _Tomahawk resolver: https://beets.io/blog/tomahawk-resolver.html
34783478
.. _mp3gain: http://mp3gain.sourceforge.net/download.php
34793479
.. _aacgain: https://aacgain.altosdesign.com
@@ -3911,7 +3911,7 @@ plugin.
39113911

39123912
* The :doc:`/plugins/web` encapsulates a simple **Web-based GUI for beets**. The
39133913
current iteration can browse the library and play music in browsers that
3914-
support `HTML5 Audio`_.
3914+
support HTML5 Audio.
39153915

39163916
* When moving items that are part of an album, the album art implicitly moves
39173917
too.
@@ -3928,8 +3928,6 @@ plugin.
39283928

39293929
* Fix crash when "copying" an art file that's already in place.
39303930

3931-
.. _HTML5 Audio: http://www.w3.org/TR/html-markup/audio.html
3932-
39333931
1.0b9 (July 9, 2011)
39343932
--------------------
39353933

docs/conf.py

+7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
'stdlib': ('https://docs.python.org/3/library/%s.html', ''),
2929
}
3030

31+
linkcheck_ignore = [
32+
r'https://github.com/beetbox/beets/issues/',
33+
r'https://github.com/\w+$', # ignore user pages
34+
r'.*localhost.*',
35+
r'https://www.musixmatch.com/', # blocks requests
36+
]
37+
3138
# Options for HTML output
3239
htmlhelp_basename = 'beetsdoc'
3340

docs/dev/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ in hacking beets itself or creating plugins for it.
77
See also the documentation for `MediaFile`_, the library used by beets to read
88
and write metadata tags in media files.
99

10-
.. _MediaFile: https://mediafile.readthedocs.io/
10+
.. _MediaFile: https://mediafile.readthedocs.io/en/latest/
1111

1212
.. toctree::
1313

docs/dev/library.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ responsible for handling queries to retrieve stored objects.
4545

4646
.. automethod:: transaction
4747

48-
.. _SQLite: https://sqlite.org/
48+
.. _SQLite: https://sqlite.org/index.html
4949
.. _ORM: https://en.wikipedia.org/wiki/Object-relational_mapping
5050

5151

@@ -118,7 +118,7 @@ To make changes to either the database or the tags on a file, you
118118
update an item's fields (e.g., ``item.title = "Let It Be"``) and then call
119119
``item.write()``.
120120

121-
.. _MediaFile: https://mediafile.readthedocs.io/
121+
.. _MediaFile: https://mediafile.readthedocs.io/en/latest/
122122

123123
Items also track their modification times (mtimes) to help detect when they
124124
become out of sync with on-disk metadata, mainly to speed up the

docs/dev/plugins.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ To access this value, say ``self.config['foo'].get()`` at any point in your
301301
plugin's code. The `self.config` object is a *view* as defined by the `Confuse`_
302302
library.
303303

304-
.. _Confuse: https://confuse.readthedocs.org/
304+
.. _Confuse: https://confuse.readthedocs.io/en/latest/
305305

306306
If you want to access configuration values *outside* of your plugin's section,
307307
import the `config` object from the `beets` module. That is, just put ``from
@@ -379,7 +379,7 @@ access to file tags. If you have created a descriptor you can add it through
379379
your plugins ``add_media_field()`` method.
380380

381381
.. automethod:: beets.plugins.BeetsPlugin.add_media_field
382-
.. _MediaFile: https://mediafile.readthedocs.io/
382+
.. _MediaFile: https://mediafile.readthedocs.io/en/latest/
383383

384384

385385
Here's an example plugin that provides a meaningless new field "foo"::

docs/faq.rst

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ FAQ
22
###
33

44
Here are some answers to frequently-asked questions from IRC and elsewhere.
5-
Got a question that isn't answered here? Try `IRC`_, the `discussion board`_, or
5+
Got a question that isn't answered here? Try the `discussion board`_, or
66
:ref:`filing an issue <bugs>` in the bug tracker.
77

8-
.. _IRC: irc://irc.freenode.net/beets
98
.. _mailing list: https://groups.google.com/group/beets-users
109
.. _discussion board: https://discourse.beets.io
1110

@@ -119,7 +118,7 @@ Run a command like this::
119118

120119
pip install -U beets
121120

122-
The ``-U`` flag tells `pip <https://pip.pypa.io/>`__ to upgrade
121+
The ``-U`` flag tells `pip`_ to upgrade
123122
beets to the latest version. If you want a specific version, you can
124123
specify with using ``==`` like so::
125124

@@ -188,7 +187,9 @@ there to report a bug. Please follow these guidelines when reporting an issue:
188187

189188
If you've never reported a bug before, Mozilla has some well-written
190189
`general guidelines for good bug
191-
reports <https://www.mozilla.org/bugs/>`__.
190+
reports`_.
191+
192+
.. _general guidelines for good bug reports: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines
192193

193194

194195
.. _find-config:
@@ -300,8 +301,7 @@ a flag. There is no simple way to remedy this.)
300301
…not change my ID3 tags?
301302
------------------------
302303

303-
Beets writes `ID3v2.4 <http://www.id3.org/id3v2.4.0-structure>`__ tags by
304-
default.
304+
Beets writes `ID3v2.4`_ tags by default.
305305
Some software, including Windows (i.e., Windows Explorer and Windows
306306
Media Player) and `id3lib/id3v2 <http://id3v2.sourceforge.net/>`__,
307307
don't support v2.4 tags. When using 2.4-unaware software, it might look
@@ -311,6 +311,7 @@ To enable ID3v2.3 tags, enable the :ref:`id3v23` config option.
311311

312312

313313
.. _invalid:
314+
.. _ID3v2.4: https://id3.org/id3v2.4.0-structure
314315

315316
…complain that a file is "unreadable"?
316317
--------------------------------------
@@ -379,3 +380,4 @@ installed using pip, the command ``pip show -f beets`` can show you where
379380
try `this Super User answer`_.
380381

381382
.. _this Super User answer: https://superuser.com/a/284361/4569
383+
.. _pip: https://pip.pypa.io/en/stable/

docs/guides/main.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ beets`` if you run into permissions problems).
6464
To install without pip, download beets from `its PyPI page`_ and run ``python
6565
setup.py install`` in the directory therein.
6666

67-
.. _its PyPI page: https://pypi.org/project/beets#downloads
67+
.. _its PyPI page: https://pypi.org/project/beets/#files
6868
.. _pip: https://pip.pypa.io
6969

7070
The best way to upgrade beets to a new version is by running ``pip install -U

docs/plugins/absubmit.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ file. The available options are:
6262
.. _streaming_extractor_music: https://acousticbrainz.org/download
6363
.. _FAQ: https://acousticbrainz.org/faq
6464
.. _pip: https://pip.pypa.io
65-
.. _requests: https://docs.python-requests.org/en/master/
65+
.. _requests: https://requests.readthedocs.io/en/master/
6666
.. _github: https://github.com/MTG/essentia
6767
.. _AcousticBrainz: https://acousticbrainz.org

docs/plugins/beatport.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ Configuration
4141

4242
This plugin can be configured like other metadata source plugins as described in :ref:`metadata-source-plugin-configuration`.
4343

44-
.. _requests: https://docs.python-requests.org/en/latest/
44+
.. _requests: https://requests.readthedocs.io/en/master/
4545
.. _requests_oauthlib: https://github.com/requests/requests-oauthlib
46-
.. _Beatport: https://beetport.com
46+
.. _Beatport: https://www.beatport.com/

docs/plugins/bpd.rst

+3-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ BPD is a music player using music from a beets library. It runs as a daemon and
55
implements the MPD protocol, so it's compatible with all the great MPD clients
66
out there. I'm using `Theremin`_, `gmpc`_, `Sonata`_, and `Ario`_ successfully.
77

8-
.. _Theremin: https://theremin.sigterm.eu/
8+
.. _Theremin: https://github.com/TheStalwart/Theremin
99
.. _gmpc: https://gmpc.wikia.com/wiki/Gnome_Music_Player_Client
1010
.. _Sonata: http://sonata.berlios.de/
1111
.. _Ario: http://ario-player.sourceforge.net/
1212

1313
Dependencies
1414
------------
1515

16-
Before you can use BPD, you'll need the media library called GStreamer (along
16+
Before you can use BPD, you'll need the media library called `GStreamer`_ (along
1717
with its Python bindings) on your system.
1818

1919
* On Mac OS X, you can use `Homebrew`_. Run ``brew install gstreamer
@@ -22,14 +22,11 @@ with its Python bindings) on your system.
2222
* On Linux, you need to install GStreamer 1.0 and the GObject bindings for
2323
python. Under Ubuntu, they are called ``python-gi`` and ``gstreamer1.0``.
2424

25-
* On Windows, you may want to try `GStreamer WinBuilds`_ (caveat emptor: I
26-
haven't tried this).
27-
2825
You will also need the various GStreamer plugin packages to make everything
2926
work. See the :doc:`/plugins/chroma` documentation for more information on
3027
installing GStreamer plugins.
3128

32-
.. _GStreamer WinBuilds: https://www.gstreamer-winbuild.ylatuya.es/
29+
.. _GStreamer: https://gstreamer.freedesktop.org/download
3330
.. _Homebrew: https://brew.sh
3431

3532
Usage

docs/plugins/convert.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ can use the :doc:`/plugins/replaygain` to do this analysis. See the LAME
191191
`documentation`_ and the `HydrogenAudio wiki`_ for other LAME configuration
192192
options and a thorough discussion of MP3 encoding.
193193

194-
.. _documentation: http://lame.sourceforge.net/using.php
194+
.. _documentation: https://lame.sourceforge.io/index.php
195195
.. _HydrogenAudio wiki: https://wiki.hydrogenaud.io/index.php?title=LAME
196196
.. _gapless: https://wiki.hydrogenaud.io/index.php?title=Gapless_playback
197-
.. _LAME: https://lame.sourceforge.net/
197+
.. _LAME: https://lame.sourceforge.io/index.php

docs/plugins/embyupdate.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To use the ``embyupdate`` plugin you need to install the `requests`_ library wit
1818
With that all in place, you'll see beets send the "update" command to your Emby server every time you change your beets library.
1919

2020
.. _Emby: https://emby.media/
21-
.. _requests: https://docs.python-requests.org/en/latest/
21+
.. _requests: https://requests.readthedocs.io/en/master/
2222

2323
Configuration
2424
-------------

docs/plugins/keyfinder.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ configuration file. The available options are:
3131
`initial_key` value.
3232
Default: ``no``.
3333

34-
.. _KeyFinder: https://www.ibrahimshaath.co.uk/keyfinder/
34+
.. _KeyFinder: http://www.ibrahimshaath.co.uk/keyfinder/
3535
.. _keyfinder-cli: https://github.com/EvanPurkhiser/keyfinder-cli/

docs/plugins/kodiupdate.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ With that all in place, you'll see beets send the "update" command to your Kodi
2727
host every time you change your beets library.
2828

2929
.. _Kodi: https://kodi.tv/
30-
.. _requests: https://docs.python-requests.org/en/latest/
30+
.. _requests: https://requests.readthedocs.io/en/master/
3131

3232
Configuration
3333
-------------

0 commit comments

Comments
 (0)