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

black: fix formating v24.1.1 #374

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 6 additions & 5 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 CERN.
# Copyright (C) 2024 Graz University of Technology.
#
# Invenio-Requests is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -16,11 +17,11 @@ jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -29,7 +30,7 @@ jobs:
run: |
python setup.py compile_catalog sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.3.1
uses: pypa/gh-action-pypi-publish@v1.8.11
with:
user: __token__
password: ${{ secrets.pypi_token }}
9 changes: 5 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 CERN.
# Copyright (C) 2024 Graz University of Technology.
#
# Invenio-Requests is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -31,7 +32,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9]
requirements-level: [pypi]
db-service: [postgresql12]
search-service: [opensearch2,elasticsearch7]
Expand All @@ -43,9 +44,9 @@ jobs:
EXTRAS: tests,${{ matrix.search-service }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Generate dependencies
Expand All @@ -55,7 +56,7 @@ jobs:
cat .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt

- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
Expand Down
7 changes: 4 additions & 3 deletions invenio_requests/customizations/event_types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2022 CERN.
# Copyright (C) 2024 Graz University of Technology.
#
# Invenio-Requests is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -104,9 +105,9 @@ def marshmallow_schema(cls):
"""Create a schema for the entire request including payload."""
type_id = cls.type_id
if type_id not in current_requests._events_schema_cache:
current_requests._events_schema_cache[
type_id
] = cls._create_marshmallow_schema()
current_requests._events_schema_cache[type_id] = (
cls._create_marshmallow_schema()
)
return current_requests._events_schema_cache[type_id]


Expand Down
20 changes: 10 additions & 10 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (C) 2021 CERN.
# Copyright (C) 2021 Northwestern University.
# Copyright (C) 2021 TU Wien.
# Copyright (C) 2023 Graz University of Technology.
# Copyright (C) 2023-2024 Graz University of Technology.
#
# Invenio-Requests is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -115,12 +115,12 @@ def app_config(app_config):
app_config["JSONSCHEMAS_HOST"] = "localhost"
app_config["BABEL_DEFAULT_LOCALE"] = "en"
# app_config["I18N_LANGUAGES"] = [('da', 'Danish')]
app_config[
"RECORDS_REFRESOLVER_CLS"
] = "invenio_records.resolver.InvenioRefResolver"
app_config[
"RECORDS_REFRESOLVER_STORE"
] = "invenio_jsonschemas.proxies.current_refresolver_store"
app_config["RECORDS_REFRESOLVER_CLS"] = (
"invenio_records.resolver.InvenioRefResolver"
)
app_config["RECORDS_REFRESOLVER_STORE"] = (
"invenio_jsonschemas.proxies.current_refresolver_store"
)
app_config["REQUESTS_REGISTERED_TYPES"] = [RequestType()]
app_config["REQUESTS_REGISTERED_EVENT_TYPES"] = [
LogEventType(),
Expand All @@ -147,9 +147,9 @@ def app_config(app_config):
]

# Extending preferences schemas, to include notification preferences. Should not matter for most test cases
app_config[
"ACCOUNTS_USER_PREFERENCES_SCHEMA"
] = UserPreferencesNotificationsSchema()
app_config["ACCOUNTS_USER_PREFERENCES_SCHEMA"] = (
UserPreferencesNotificationsSchema()
)
app_config["USERS_RESOURCES_SERVICE_SCHEMA"] = NotificationsUserSchema
return app_config

Expand Down