Commit graph

12019 commits

Author SHA1 Message Date
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
Serene
b88c09720c
Add a workflow for easily creating releases (#4952)
I humbly present a solution our lack of releases: a workflow that can be
triggered to automatically create one. This workflow builds the project,
creates a GitHub release, and publishes beets to PyPi, for a one-stop
solution.

@sampsyo this would make it much easier to create releases, as it
requires only one little interaction: going to the actions tab and
entering a version number. Once that's done, the workflow should take
care of the rest.

I have only tested the `build` job so far, since I can't do anything
about the pypi or do a release just to test, but the code is lifted from
other similar actions and should work fine.

It also requires one piece of setup. This is that PyPi must be set up
with a [trusted publisher](https://docs.pypi.org/trusted-publishers/) to
receive the new package. Once that's done, the process should go off
automatically.
2024-05-30 08:57:02 +10:00
Lev Gorodetskiy
2a4cf0d335
Codestyle 2024-05-26 11:57:24 -03:00
Lev Gorodetskiy
53d72c14ea
Update changelog 2024-05-25 12:28:08 -03:00
Lev Gorodetskiy
2130404217
Add timeout to all requests calls 2024-05-25 12:24:53 -03:00
Šarūnas Nejus
c75f07a0da Define paths to lint in mypy configuration 2024-05-07 21:16:24 +01:00
Šarūnas Nejus
1713011089 Move mypy configuration to setup.cfg 2024-05-07 21:16:24 +01:00
Šarūnas Nejus
e9ce625879
Dedupe get_attribute_converter 2024-05-07 21:15:00 +01:00
Šarūnas Nejus
c1518dbf38
Test fetching each of the documents 2024-05-07 21:14:59 +01:00
Šarūnas Nejus
6ee734685d
Feed in app context and args into Document to allow testing
This will be help with testing each of the documents which do not
any more depend on the 'global' `current_app` and `request`. These two
can now be provided at the time the objects are instantiated.
2024-05-07 19:55:02 +01:00
Šarūnas Nejus
4e07b941f7
Make a random change for testing 2024-05-07 16:28:28 +01:00