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 ci #156

Merged
merged 4 commits into from
Apr 15, 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
38 changes: 9 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2020 CERN.
# Copyright (C) 2022 Graz University of Technology.
# Copyright (C) 2022-2024 Graz University of Technology.
#
# Invenio 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 @@ -29,54 +29,34 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
requirements-level: [pypi]
cache-service: [redis]
db-service: [postgresql10, postgresql13, mysql5, mysql8]
python-version: [3.9, 3.12]
db-service: [postgresql14, mysql8]
include:
- db-service: postgresql10
- db-service: postgresql14
DB_EXTRAS: "postgresql"

- db-service: postgresql13
DB_EXTRAS: "postgresql"

- db-service: mysql5
DB_EXTRAS: "mysql"

- db-service: mysql8
DB_EXTRAS: "mysql"

env:
CACHE: ${{ matrix.cache-service }}
DB: ${{ matrix.db-service }}
EXTRAS: tests
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
run: |
pip install wheel requirements-builder
requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
cache: pip
cache-dependency-path: setup.cfg

- name: Install dependencies
run: |
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
pip install ".[$EXTRAS]"
pip freeze
docker --version
docker-compose --version
docker version

- name: Run tests
run: |
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
# Copyright (C) 2022 Graz University of Technology.
# Copyright (C) 2022-2024 Graz University of Technology.
#
# Invenio 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 @@ -322,8 +322,8 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"https://docs.python.org/": None,
"https://datacite.readthedocs.io/en/latest/": None,
"python": ("https://docs.python.org/", None),
"datacites": ("https://datacite.readthedocs.io/en/latest/", None),
}

# Autodoc configuraton.
Expand Down
8 changes: 5 additions & 3 deletions invenio_pidstore/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,11 @@ def __repr__(self):
self.pid_type,
self.pid_value,
self.status,
" / {0}:{1}".format(self.object_type, self.object_uuid)
if self.object_type
else "",
(
" / {0}:{1}".format(self.object_type, self.object_uuid)
if self.object_type
else ""
),
)


Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
# Copyright (C) 2022 Graz University of Technology.
# Copyright (C) 2022-2024 Graz University of Technology.
#
# Invenio 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 @@ -35,7 +35,7 @@ install_requires =

[options.extras_require]
tests =
pytest-black>=0.3.0
pytest-black-ng>=0.4.0
Flask-Menu>=0.5.1
invenio-admin>=1.2.0
invenio-access>=1.0.0
Expand Down