Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs build #5492

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test
on:
pull_request_target:
pull_request:
push:
branches:
- master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Lint check
run-name: Lint code
on:
pull_request_target:
pull_request:
push:
branches:
- master
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
cache: poetry

- name: Install dependencies
run: poetry install --only=docs
run: poetry install --extras=docs

- name: Add Sphinx problem matcher
run: echo "::add-matcher::.github/sphinx-problem-matcher.json"
Expand Down
4 changes: 3 additions & 1 deletion beetsplug/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@

return (command.encode("utf-8"), extension.encode("utf-8"))


def in_no_convert(item: Item) -> bool:
no_convert_query = config["convert"]["no_convert"].as_str()

Expand All @@ -91,8 +92,9 @@
query, _ = parse_query_string(no_convert_query, Item)
return query.match(item)
else:
return False

Check failure on line 95 in beetsplug/convert.py

View workflow job for this annotation

GitHub Actions / Check linting

Ruff (W293)

beetsplug/convert.py:95:1: W293 Blank line contains whitespace



def should_transcode(item, fmt):
"""Determine whether the item should be transcoded as part of
conversion (i.e., its bitrate is high or it has the wrong format).
Expand Down
35 changes: 18 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ resampy = { version = ">=0.4.3", optional = true }
requests-oauthlib = { version = ">=0.6.1", optional = true }
soco = { version = "*", optional = true }

pydata-sphinx-theme = { version = "*", optional = true }
sphinx = { version = "*", optional = true }

[tool.poetry.group.test.dependencies]
beautifulsoup4 = "*"
codecov = ">=2.1.13"
Expand Down Expand Up @@ -96,10 +99,6 @@ types-PyYAML = "*"
types-requests = "*"
types-urllib3 = "*"

[tool.poetry.group.docs.dependencies]
pydata-sphinx-theme = "*"
sphinx = "*"

[tool.poetry.group.release.dependencies]
click = ">=8.1.7"
packaging = ">=24.0"
Expand All @@ -115,6 +114,7 @@ beatport = ["requests-oauthlib"]
bpd = ["PyGObject"] # python-gi and GStreamer 1.0+
chroma = ["pyacoustid"] # chromaprint or fpcalc
# convert # ffmpeg
docs = ["pydata-sphinx-theme", "sphinx"]
discogs = ["python3-discogs-client"]
embedart = ["Pillow"] # ImageMagick
embyupdate = ["requests"]
Expand Down
5 changes: 2 additions & 3 deletions test/plugins/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@
# included in all copies or substantial portions of the Software.


import fnmatch
import os.path
import re
import sys
import unittest
import pytest

import pytest
from mediafile import MediaFile

from beets import util
from beetsplug import convert
from beets.library import Item
from beets.test import _common
from beets.test.helper import (
AsIsImporterMixin,
ImportHelper,
PluginTestCase,
capture_log,
control_stdin,
)
from beets.util import bytestring_path, displayable_path
from beetsplug import convert


def shell_quote(text):

Check failure on line 39 in test/plugins/test_convert.py

View workflow job for this annotation

GitHub Actions / Check linting

Ruff (I001)

test/plugins/test_convert.py:16:1: I001 Import block is un-sorted or un-formatted
import shlex

return shlex.quote(text)
Expand Down Expand Up @@ -352,7 +352,6 @@
("bitrate:320 , format:ogg", True),
],
)

def test_no_convert_skip(self, config_value, should_skip):
item = Item(format="ogg", bitrate=256)
convert.config["convert"]["no_convert"] = config_value
Expand Down
Loading