Commit graph

13230 commits

Author SHA1 Message Date
Š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
Serene-Arc
f3c9f03d71
Use poetry action instead of pipx 2024-06-10 13:46:26 +01:00
Serene-Arc
4d5b821e52
Use poetry prefix 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
Serene-Arc
4f566f181f
Only format correct directories 2024-06-10 13:46:25 +01:00
Serene-Arc
b57c0dd7c5
Rename action 2024-06-10 13:46:25 +01:00
Serene-Arc
6b2ec01a14
Search for changed doc and python files separately 2024-06-10 13:46:25 +01:00
Serene
4494acd515
Simplify logic ci.yaml
Changed the logic so that it isn't testing repeatedly for the correct matrix version, and since we're using poetry instead of pipx, changed the action
2024-06-10 13:46:25 +01:00
Šarūnas Nejus
5ccc69da2c
Lint only changed files 2024-06-10 13:46:25 +01:00
Šarūnas Nejus
4a8e6e961f
Update workflows 2024-06-10 13:46:25 +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
347911cdee
Introduce Poe the Poet task runner and define tasks.
This makes it easier for people to interact with the project in
a unified manner.
2024-06-10 13:46:25 +01:00
Šarūnas Nejus
1aad6e0929
release.py: introduce pyproject.toml 2024-06-10 13:10:17 +01:00
Šarūnas Nejus
7bbd215efc
Update all docs with Poetry 2024-06-10 13:10:16 +01:00
Šarūnas Nejus
e30ee3f490
Update workflows 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
Šarūnas Nejus
0966e3c653
Test aura (#5239)
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.
2024-06-10 13:07:48 +01:00
Serene
f01d80902b
Fix reflink: "auto" option (#5288) 2024-06-10 20:20:21 +10:00
Serene
b53908fe67
Fix the version error in the release workflow (#5274) 2024-06-09 14:52:06 +10:00
Leo Nikkilä
7bcca193d5 Fix reflink: "auto" option
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.
2024-06-08 01:26:24 +03:00
Šarūnas Nejus
d2a94c1cdd
release.py: Add changelog.rst conversion to markdown 2024-06-07 09:01:44 +01:00
Šarūnas Nejus
3e5e1eca87
release.py: simplify bumping the version
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.
2024-06-07 09:01:44 +01:00
Šarūnas Nejus
be778b8da0
release.py: Use click for the CLI 2024-06-05 19:12:50 +01:00
Serene-Arc
c0ef37c46a
Fix error with build workflow using wrong ref
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.
2024-06-05 19:12:50 +01:00
Serene-Arc
591d052647
Fix formatting of replacement
Black requires that there be double quotes instead of single
2024-06-05 19:12:50 +01:00
Serene-Arc
ff3bf918b0
Fix new heading in docs 2024-06-05 19:12:49 +01:00
Šarūnas Nejus
1b594790ca
Upgrade to Python 3.8 / drop Python 3.7 (#5283)
## 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.
2024-06-05 08:37:43 +01:00
Šarūnas Nejus
65bfbda9e7
Remove windows windows/tox specific instructions
On Python 3.8 this is irrelevant since in all cases tox v4 will be
installed which works fine.
2024-06-05 04:41:02 +01:00
Šarūnas Nejus
0aa361e6c8
Remove support for Python 3.7 in the build and docs 2024-06-05 04:41:02 +01:00
Šarūnas Nejus
4c844d6efa
Replace lazy_property by cached_property 2024-06-05 04:41:02 +01:00
Šarūnas Nejus
179405ed82
A couple of small updates in the code 2024-06-05 04:41:02 +01:00
Serene
d4ecd5fc86
Adjust temporary files (#5280)
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
2024-06-04 09:29:49 +10:00
Kirill A. Korinsky
d8ea474764
Update changelog.rst 2024-06-03 13:28:47 +02:00
Kirill A. Korinsky
8811c64599
Adjust temporary files
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
2024-06-03 00:54:22 +02:00
Serene
e999987300
Add missed HAVE_REFLINK in test_files.py (#5272) 2024-06-02 14:51:29 +10:00
Serene
4c334ef9e7
Fix formatting of version to please the formatting CI (#5279) 2024-06-02 14:48:50 +10:00
Serene-Arc
d8165aa757
Fix formatting 2024-06-02 14:47:45 +10:00
Serene
731acd848c
Add timeout argument to all requests calls (#5262) 2024-06-02 14:44:28 +10:00
Kirill A. Korinsky
938628b094
Add missed HAVE_REFLINK in test_files.py 2024-05-30 14:09:37 +02:00
Serene
1fba18054a
Fix changelog version (#5270) 2024-05-30 14:26:34 +10:00
Serene-Arc
6edd80a1d5
Fix changelog version 2024-05-30 14:21:30 +10:00
Serene-Arc
33ab22db8c Increment version numbers to 2.0.0 2024-05-30 04:05:25 +00:00