Commit graph

12222 commits

Author SHA1 Message Date
Šarūnas Nejus
190198bfa6
Make make-github-release job dependent on publish-to-pypi 2024-06-15 08:48:13 +01:00
Šarūnas Nejus
8b52f3f9a5
Release workflow: Move changelog retrieval to the build job 2024-06-15 06:35:01 +01:00
Šarūnas Nejus
ed574f4307
Release workflow: Update external GitHub action versions
This fixes three warnings seen on https://github.com/beetbox/beets/actions/runs/9296798803
2024-06-15 06:35:01 +01:00
Šarūnas Nejus
1f8c5b8b33
Release workflow: Use poe changelog in make-github-release job 2024-06-15 04:25:51 +01:00
Šarūnas Nejus
0a1bddd99e
Release workflow: Use poetry to build the package 2024-06-15 04:25:51 +01:00
Šarūnas Nejus
f964aa89c9
Release workflow: use poe bump to bump the version 2024-06-15 04:25:51 +01:00
Šarūnas Nejus
e3075b76e0
Move dependencies required for release to a separate group 2024-06-15 04:25:50 +01:00
Serene
54a8ef7a32
Fix changelog reminder workflow (#5305)
Quote the breaking glob as noted by @bal-e.
2024-06-15 12:23:06 +10:00
Serene
8a28fd5707
Remove the beet executable and update shebangs (#5303)
## Description

This is a very simple PR, just removing the (apparently unused) `beet`
executable from the repository and substituting `bin/env python` for
`bin/python3` where possible.

Fixes #4604.
2024-06-15 11:11:50 +10:00
Serene
461a1c6f91
Make the release send a toot on Fosstodon (#5302)
This adds a step to the GitHub release so that it sends a toot on
Fosstodon, beets' Mastodon account, to publicise that and get some
engagement!

Not tested, but this is lifted straight from the action repo so it
*should* be okay. @snejus for a sanity check if you wouldn't mind
2024-06-15 10:02:47 +10:00
Serene
aacf983268
Remove release script from pyproject (#5307)
I realised that when users install beets, this `release` script would
also get installed for them, which is not ideal, I guess.
2024-06-15 09:57:36 +10:00
Šarūnas Nejus
db1b72fced
Fix black security vulnerability (#5306)
See https://github.com/beetbox/beets/security/dependabot/7
2024-06-14 20:53:50 +01:00
Šarūnas Nejus
09b67c1da6
Ignore aura.py/flake8-docstrings 2024-06-14 20:12:19 +01:00
Šarūnas Nejus
a3721fea81
Check all Python files when poetry.lock changes 2024-06-14 20:12:19 +01:00
Šarūnas Nejus
8608b2549b
Trigger lint workflow on dependency updates 2024-06-14 18:49:39 +01:00
Šarūnas Nejus
e7ece96268
Remove release script from pyproject
I realised that when users install beets, this `release` script would
also get installed for them, which is not ideal, I guess.
2024-06-14 16:27:40 +01:00
Šarūnas Nejus
b29c9a83b9
Upgrade black, pin it below v25 2024-06-14 16:16:51 +01:00
Šarūnas Nejus
249d49942e
Make a change to test 2024-06-14 16:04:15 +01:00
Šarūnas Nejus
040a2412b3
Quote changed files glob 2024-06-14 16:00:36 +01:00
Arav K.
8b3890bb4d [changelog] note the removal of the 'beet' script 2024-06-14 14:55:06 +02:00
Arav K.
0b10d84862 Explicitly use Python 3 for scripts
While Python 2 is long dead, and a 'bin/env python' shebang is probably
perfectly fine, this is just a bit safer.

See <https://github.com/beetbox/beets/issues/4604>.
2024-06-14 14:44:29 +02:00
Arav K.
0b517fc4c9 Remove the 'beet' wrapper script
Apparently, this script isn't actually used for anything; the build
system will automatically generate a script like this when installing
`beets`.

See <https://github.com/beetbox/beets/issues/4604>.
2024-06-14 14:41:40 +02:00
Serene
0c96da1136
Use output of tagging action in message
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-06-14 21:51:29 +10:00
Serene
c7da94152f
Fix changelog workflow (#5231)
Use `pull_request_target` event for the changelog update reminder
2024-06-14 20:40:52 +10:00
Serene-Arc
d03b1af90d
Add mastodon step to release step 2024-06-14 18:52:08 +10:00
Šarūnas Nejus
b583fb7dec
Resolve some 'mypy' errors (#5282)
## Description

I noticed that some development work was waiting on cleaner `mypy` runs,
so I thought I would help out a bit. This PR just contains a number of
miscellaneous fixes across the codebase that I hit. I'm happy to add
more, or remove any problematic changes (though I don't think I've
broken anything, only type annotations have changed).

## To Do

- [x] ~Documentation~
- [ ] Changelog
- [x] ~Tests~
2024-06-13 14:41:35 +01:00
Serene
1f671fcc38
Update the bash completion script (#5301)
Some functions used by the bash completion script have become
deprecated. This was causing the test suite to break on faster-moving
distributions (e.g. Arch Linux and Gentoo). The issue is only noticeable
because the tests for the completion function explicitly disallow
compatibility implementations from being loaded. Rather than allowing
compatibility implementations, I've added some basic logic to the
completion script so that older and newer versions of `bash-completion`
can be supported simultaneously.
2024-06-13 17:56:45 +10:00
Arav K.
9ca8f24189 Require 'bash-completion' >=v2.8 instead of v2.10
Debian 10 LTS only has 'bash-completion' v2.8, but support for it
expires at the end of the month (2024-06-30).  Still, this completion
script apparently worked there, so there's no harm in reducing the
version requirement, which I had previously picked arbitrarily.

See https://github.com/beetbox/beets/pull/5301#issuecomment-2164297308.
2024-06-13 09:19:12 +02:00
Arav K.
b1b7230466 Update the bash completion script
I haven't run git blame, but this script hasn't been updated in a while.
Apparently development in 'bash-completion' is moving a lot faster now,
so supporting multiple mutually-incompatible versions of it has become
necessary.

For some reason, this issue wasn't caught on CI - I think the newer
'bash-completion' hasn't reached the distribution used there.  Still,
this code is now forward-compatible.
2024-06-13 02:25:13 +02:00
Arav K.
c7ca2efbba [SingletonQuery] correct superclass typing
I had misinterpreted the pattern type for this query to be 'NoReturn',
thinking that it accepted no pattern at all (even so, I should have
typed it as 'None').  However, it does accept a pattern, and uses it to
decide whether to select only singletons or none at all.

See <https://github.com/beetbox/beets/pull/5282#discussion_r1633212742>.
2024-06-12 16:02:00 +02:00
Arav K.
549fea14cd [util/pipeline] use 'Queue' without generics
Apparently Python 3.8 does not support generic type parameters on the
built-in 'queue.Queue' type?
2024-06-12 15:59:31 +02:00
Arav K.
8b232bd311 [autotag/hooks] restore support for 'None' values
In changing the implementation of the 'AttrDict' class to eliminate
'mypy' errors, I had accidentally removed support for storing 'None'
values in the dict.  This commit restores support for them.
2024-06-12 15:58:00 +02:00
Arav K.
c13d8c5fa1 Ensure support for Python 3.8
'typing.Never' was introduced later, and 'typing.Type' was used instead
of just 'type' until 3.9.  This commit will likely be reverted over time
as these 3.8 etc. get dropped.
2024-06-12 15:58:00 +02:00
Arav K.
d3bdf137ea Resolve some 'mypy' errors 2024-06-12 15:58:00 +02:00
Šarūnas Nejus
d7bf28deed
Replace setup.py packaging by Poetry (#5266)
Migrate `beets` package configuration to Poetry which nowadays seems to
be the gold standard.

I have been using Poetry since 2019 and I have mostly been happy a happy
user: it makes local dev setup easy and has the tools I need to maintain
python packages day to day, including reliable dependency resolution,
versioning and publishing to Pypi.

It's a user-friendly tool, so it should make it more straightforward for
contributors to setup and navigate the codebase, and ultimately,
hopefully facilitate more frequent releases!

Since poetry manages local virtual environment, we do not have much need
for tox any more. Therefore, it was replaced by a task runner
`poethepoet`. Type `poe` in the project directory to see the available
commands.

- [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. (Very much encouraged but not strictly required.)
2024-06-12 10:59:24 +01:00
Šarūnas Nejus
0507f6f7c1
Fix sphinx docs linting 2024-06-12 10:51:58 +01:00
Šarūnas Nejus
c2a13ee4b1
Format docs/conf.py 2024-06-11 15:22:58 +01:00
Šarūnas Nejus
50cf70eea3
Check all python files for formatting issues 2024-06-11 15:21:39 +01:00
Serene
b4003c34e5
small grammar corrections (#5298)
## Description

Just some little grammar adjusts.
2024-06-11 13:54:29 +10:00
Leonardo Santos
a7169d0645 small grammar corrections 2024-06-10 20:18:58 -03:00
Šarūnas Nejus
a4ed6ab62a
Document the changes 2024-06-10 13:46:27 +01:00
Šarūnas Nejus
6d3b76d3ef
Update dependencies 2024-06-10 13:46:27 +01:00
Šarūnas Nejus
4752fb01df
Do not use fetch-depth: 2 to get changed-files, and fix small typo 2024-06-10 13:46:27 +01:00
Šarūnas Nejus
67637225ba
Revert "Use poetry action instead of pipx"
This reverts commit 5526bd3c184344d63eec8da4db9793b1be7002e7.

Poetry must be installed before `setup-python` action, weirdly. And we
need to install poethepoet globally too!
2024-06-10 13:46:27 +01:00
Šarūnas Nejus
17ec5909ed
Revert "Simplify workflow"
This reverts commit 4550d39d1e7833557e863de18163f5a4b80db977.

I love this attempt to DRY-up the linting workflow! I remember back in
the day also initially assuming that this is how the jobs work. However,
I had to meet the harsh reality of each job needing to be set up from
zero. :(
2024-06-10 13:46:26 +01:00
Šarūnas Nejus
fee65baf32
Revert "Use poetry prefix"
This reverts commit af996f42c3e5cacb6f5b68716a11500c1183ac02.

Since `poethepoet` is installed globally in the workflows, running it
does not require `poetry run` suffix. This is actually one of the
reasons why it's preferable to have this tool installed globally.
2024-06-10 13:46:26 +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
Šarūnas Nejus
627c0698ee
Revert "Only format correct directories"
This reverts commit c3b6f07c4336e6639e4597a800700820155ad294.

This commit hardcoded the paths that `isort` and `black` checks. This
means that the `check-format` job will act on the entire codebase
instead of only changed files. We need to define a `path` argument with
a default value in order to achieve the above.

Regarding "." vs "beets beetsplug test", the intention behind using "."
was to also check python files like `docs/conf.py` and
`extra/release.py` which I presume we would also want to format
properly.
2024-06-10 13:46:26 +01:00
Šarūnas Nejus
b00a83c229
Partially revert "Simplify logic ci.yaml"
This reverts commit 913f85620dc1d68aed87e19ed1f8f2126f483cad.
2024-06-10 13:46:26 +01:00
Serene-Arc
6d7a6df2fa
Simplify workflow 2024-06-10 13:46:26 +01:00