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.)
This reverts commit 5526bd3c184344d63eec8da4db9793b1be7002e7.
Poetry must be installed before `setup-python` action, weirdly. And we
need to install poethepoet globally too!
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. :(
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.
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.
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.
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.
In #4746 I was making a small adjustment in beetsplug/aura.py and found
that the module wasn't tested. So this PR adds some high-level tests to
act a safeguard for any future adjustments.
The docs say:
> The `auto` option uses reflinks when possible and falls back to plain
> copying when necessary.
I've been using this option for a while, and recently discovered that
despite the option, copying fails between two BTRFS filesystems with:
Error: OS/filesystem does not support reflinks. during link of paths /mnt/fs1/file, /mnt/fs2/file
I tracked this down to how the configuration is handled in the importer.
Additionally, update the 'in progress' header in the changelog: instead
of using a specific version number, simply say 'Unreleased' since we do
not know in advance what version will the changes be eventually
released.
This also simplifies latest changelog retrieval.
Looking at the logs, it's using the ref before the one that increments
the version in the previous action in the workflow. This code is from
https://github.com/actions/checkout/issues/439#issuecomment-965968956
and supposedly fixes this by making it pull specifically from master,
rather than the ref that the workflow was called on.
## Description
Fixes#5222.
Drop Python 3.7. `pyupgrade` is responsible for most of the changes in
the code. I undid some of the bits it attempted to update that aren't
strictly necessary:
1. Converting `List/Dict/Tuple` -> `list/dict/tuple` in modules that
have `from __future__ import annotations` import. This should be done in
a separate PR, and for all modules
2. Converting some `.format(` calls to f-strings. It didn't do it
consistently, and it should also be done in a separate PR, I believe.
Python upgrade unblocks several other PRs, for example #5266 and #5248.
Rigth now it creates something like:
```
.../Perota Chingo/Un viajecito/.12 Rie Chinito.flac64u8gm5u.beets
```
where no separatio between temp name and file extention, and it makes
quite hard to read it.
So, this changes adjust name to
```
.../Perota Chingo/Un viajecito/.12 Rie Chinito.flac.64u8gm5u.beets
```
This was one of forgotten fixup from
8d50301be5
Rigth now it creates something like:
```
.../Perota Chingo/Un viajecito/.12 Rie Chinito.flac64u8gm5u.beets
```
where no separatio between temp name and file extention, and it makes quite hard to read it.
So, this changes adjust name to
```
.../Perota Chingo/Un viajecito/.12 Rie Chinito.flac.64u8gm5u.beets
```
This was one of forgotten fixup from 8d50301be5