Skip to content

Commit

Permalink
release: v1.0.0
Browse files Browse the repository at this point in the history
Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
  • Loading branch information
jma committed May 15, 2024
1 parent a155fef commit 37f6553
Show file tree
Hide file tree
Showing 7 changed files with 1,141 additions and 718 deletions.
43 changes: 16 additions & 27 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ name: CI

on:
push:
branches: main
branches:
- main
- staging
pull_request:
branches:
- main
- "maint-**"
- "staging"
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 3 * * 6"
Expand All @@ -36,29 +38,21 @@ on:

jobs:
Tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
# TODO: You can add/remove combinations e.g. `dev` requirements or
# `postgresql13` by adding a new item to the following lists.
# You can see the complete list of services and versions that are available at:
# https://docker-services-cli.readthedocs.io/en/latest/configuration.html
python-version: ["3.9"]
requirements-level: [pypi]
db-service: [postgresql13]
search-service: [elasticsearch]
include:
- search-service: elasticsearch
SEARCH_EXTRAS: "elasticsearch"

# - search-service: opensearch2
# SEARCH_EXTRAS: "opensearch2"
dependencies: ['dev', 'deploy']

env:
DB: ${{ matrix.db-service }}
SEARCH: ${{ matrix.search-service }}
# TODO: Adapt EXTRAS accordingly
EXTRAS: tests,${{ matrix.search-service }}

steps:
- name: Checkout
Expand All @@ -69,25 +63,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Generate dependencies
run: |
python -m pip install --upgrade pip setuptools py wheel requirements-builder
requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
- name: Install Poetry
uses: snok/install-poetry@v1

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
- name: Update depencencies
if: ${{ matrix.dependencies == 'dev' }}
run: poetry update

- 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
poetry install
- name: Run tests
run: |
./run-tests.sh
poetry run ./run-tests.sh
- name: Run build
run: poetry build
5 changes: 0 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,3 @@
:target: https://github.com/rero/rero-invenio-files/blob/master/LICENSE

Files support for the RERO invenio instances.

TODO: Please provide feature overview of module

Further documentation is available on
https://rero-invenio-files.readthedocs.io/
1,664 changes: 1,114 additions & 550 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[tool.poetry]
name = "rero-invenio-files"
version = "0.1.0"
version = "1.0.0"
description = "Files support for the RERO invenio instances."
authors = ["RERO <software@rero.ch>"]
license = "GNU Affero General Public License v3.0"
readme = "README.rst"

[tool.poetry.dependencies]
python = "^3.9"
invenio-records-resources = "^4.18.3"
invenio-records-resources = "<5.7.0"
invenio-search = {version = ">=2.1.0,<3.0.0", extras = ["elasticsearch7"]}
invenio-db = {version = ">=1.1.0,<1.2.0", extras = ["postgresql"]}
fpdf2 = "^2.7.7"
pymupdf = "^1.23.21"
invenio-previewer = "^2.2.0"
invenio-theme = ">=2.5.7,<3.0.0"
invenio-theme = "<4.0.0"


[tool.poetry.group.dev.dependencies]
Expand All @@ -23,6 +23,7 @@ pytest-invenio = ">=2.1.6,<3.0.0"
pytest-black = ">=0.3.0"
sphinx = ">=4.5.0"
mock = "^5.1.0"
safety = "^3.2.0"

[build-system]
requires = ["poetry-core"]
Expand Down
7 changes: 7 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ trap cleanup EXIT
# python -m check_manifest
python -m sphinx.cmd.build -qnNW docs docs/_build/html

safety_exceptions="-i 51668 -i 42194 -i 62019 -i 67599 -i 51457"
msg=$(safety check -o text ${safety_exceptions}) || {
echo "Safety vulnerabilites found for packages:" $(safety check -o bare ${safety_exceptions})
echo "Run: \"safety check -o screen ${safety_exceptions} | grep -i vulnerability\" for more details"
exit 1
}

# TODO: Remove services below that are not neeed (fix also the usage note).
eval "$(docker-services-cli up --db ${DB:-postgresql} --search ${SEARCH:-elasticsearch} --cache ${CACHE:-redis} --mq ${MQ:-rabbitmq} --env)"
python -m pytest
Expand Down
111 changes: 0 additions & 111 deletions setup.cfg

This file was deleted.

22 changes: 0 additions & 22 deletions setup.py

This file was deleted.

0 comments on commit 37f6553

Please sign in to comment.