Skip to content

CI updates #1518

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

Merged
merged 3 commits into from
Feb 7, 2025
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
23 changes: 6 additions & 17 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
{
extends: [
'config:base',
'github>camptocamp/gs-renovate-config-preset:base.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:group.json5#0.8.0',
'github>camptocamp/gs-renovate-config-preset:stabilization-branches.json5#0.8.0',
'github>camptocamp/gs-renovate-config-preset:ci.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:pre-commit.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:python.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:json-schema.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:shellcheck.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:preset.json5#0.8.0',
'github>camptocamp/gs-renovate-config-preset:security.json5#0.8.0',
'github>camptocamp/gs-renovate-config-preset:docker.json5#0.8.0',
'github>camptocamp/gs-renovate-config-preset:own.json5#0.8.0',
],
baseBranches: ['master', 'test'],
osvVulnerabilityAlerts: true,
vulnerabilityAlerts: {
schedule: ['at any time'],
automerge: true,
},
customManagers: [
/** Do update on the schema present in the ci/config.yaml */
{
fileMatch: ['^ci/config\\.yaml$'],
matchStrings: [
'.*https://raw\\.githubusercontent\\.com/(?<depName>[^\\s]+)/(?<currentValue>[0-9\\.]+)/.*',
],
datasourceTemplate: 'github-tags',
customType: 'regex',
},
],
packageRules: [
{
groupName: 'scikit-image',
Expand Down
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,21 @@ repos:
- --tool=ruff
- --die-on-tool-error
- --output-format=pylint
- --profile=.prospector.yaml
- --profile=utils:autofix
additional_dependencies:
- prospector-profile-duplicated==1.10.4 # pypi
- prospector-profile-utils==1.17.0 # pypi
- ruff==0.9.4 # pypi
- id: prospector
args:
- --die-on-tool-error
- --output-format=pylint
- --profile=utils:tests
- --profile=utils:autofix
additional_dependencies:
- prospector-profile-utils==1.19.2 # pypi
- ruff==0.9.5 # pypi
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 39.156.2
hooks:
Expand Down
2 changes: 0 additions & 2 deletions .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ inherits:
- utils:base
- utils:no-design-checks
- utils:fix
- utils:unsafe

ignore-paths:
- scan_to_paperless/process_schema.py
- scan_to_paperless/config.py
Expand Down
14 changes: 0 additions & 14 deletions .whitesource

This file was deleted.

2 changes: 1 addition & 1 deletion scan_to_paperless/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ class Tesseract(TypedDict, total=False):


class _ArgumentsDeskew(TypedDict, total=False):
"""The deskew configuration."""
"""The deskew configuration"""

min_angle: int | float
"""
Expand Down
2 changes: 1 addition & 1 deletion scan_to_paperless/process_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ class Tesseract(TypedDict, total=False):


class _ArgumentsDeskew(TypedDict, total=False):
"""The deskew configuration."""
"""The deskew configuration"""

min_angle: int | float
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_should_not_commit() -> None:
# @pytest.mark.skip(reason="for test")
def test_find_lines() -> None:
lines = process.find_lines(load_image("limit-lines-1.png"), True, {})
assert 1821 in [l[0] for l in lines]
assert 1821 in [line[0] for line in lines]


# @pytest.mark.skip(reason="for test")
Expand Down Expand Up @@ -146,7 +146,7 @@ def init_test() -> None:

# @pytest.mark.skip(reason="for test")
@pytest.mark.parametrize(
"type_,limit,better_value,cut_white",
("type_", "limit", "better_value", "cut_white"),
[
pytest.param(
"lines",
Expand Down Expand Up @@ -564,7 +564,7 @@ async def test_empty() -> None:
# @pytest.mark.skip(reason="for test")
@pytest.mark.flaky(reruns=3)
@pytest.mark.parametrize(
"test,args", [pytest.param("600", {"dpi": 600, "deskew": {"num_angles": 179}}, id="600")]
("test", "args"), [pytest.param("600", {"dpi": 600, "deskew": {"num_angles": 179}}, id="600")]
)
async def test_custom_process(test: str, args: dict[str, Any]) -> None:
init_test()
Expand Down Expand Up @@ -745,7 +745,7 @@ async def test_tiff_jupyter() -> None:
# @pytest.mark.skip(reason="for test")
@pytest.mark.flaky(reruns=3, only_rerun="ValueError")
@pytest.mark.parametrize(
"name,config",
("name", "config"),
[
pytest.param("default", {}, id="default"),
pytest.param(
Expand Down
Loading