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

deps: update #168

Merged
merged 12 commits into from
Jul 17, 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: 15 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,38 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6]
python-version: [3.9]
requirements-level: [pypi]
db-service: [postgresql12]
db-service: [postgresql14]
include:
- db-service: postgresql12
- db-service: postgresql14
DB_EXTRAS: "postgresql"

env:
DB: ${{ matrix.db-service }}
EXTRAS: all,${{ matrix.DB_EXTRAS }},${{ matrix.SEARCH_EXTRAS }}
EXTRAS: tests
steps:
- name: Install python-ldap dependencies
run: |
sudo apt-get update
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

- 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: |
python -m pip install "pip>=20,<20.3" setuptools py twine 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 pyOpenSSL
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
pip install .[$EXTRAS]
pip install -r requirements-devel.txt
pip install ".[$EXTRAS]"
pip freeze
docker --version
docker-compose --version

- name: Run tests
run: |
./run-tests.sh
run: ./run-tests.sh
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
# cds-migrator-kit is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

FROM python:3.6
FROM python:3.9

RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y git curl vim
RUN apt-get install -y git curl vim build-essential python3-dev \
libldap2-dev libsasl2-dev slapd ldap-utils tox \
lcov valgrind
RUN pip install --upgrade setuptools wheel pip pipenv uwsgi uwsgitop uwsgi-tools

RUN python -m site
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ recursive-include tests *.json
recursive-include scripts *.sh
recursive-include examples *.py
recursive-include examples *.sh
recursive-include cds_migrator_kit *.gitkeep
recursive-include cds_migrator_kit *.md
recursive-include cds_migrator_kit *.yaml
exclude scripts/migrator.sh


Expand Down
27 changes: 4 additions & 23 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,7 @@
cds-migrator-kit
==================

.. image:: https://img.shields.io/travis/kprzerwa/cds-migrator-kit.svg
:target: https://travis-ci.org/kprzerwa/cds-migrator-kit

.. image:: https://img.shields.io/coveralls/kprzerwa/cds-migrator-kit.svg
:target: https://coveralls.io/r/kprzerwa/cds-migrator-kit

.. image:: https://img.shields.io/github/tag/kprzerwa/cds-migrator-kit.svg
:target: https://github.com/kprzerwa/cds-migrator-kit/releases

.. image:: https://img.shields.io/pypi/dm/cds-migrator-kit.svg
:target: https://pypi.python.org/pypi/cds-migrator-kit

.. image:: https://img.shields.io/github/license/kprzerwa/cds-migrator-kit.svg
:target: https://github.com/kprzerwa/cds-migrator-kit/blob/master/LICENSE

Migration tool kit from old invenio to new flavours.

*This is an experimental developer preview release.*

TODO: Please provide feature overview of module

Further documentation is available on
https://cds-migrator-kit.readthedocs.io/
To run the interface:
```
gunicorn -b :8080 --timeout 120 --graceful-timeout 60 cds_migrator_kit.app:app
```
6 changes: 3 additions & 3 deletions cds_migrator_kit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

"""Migration tool kit from old Invenio to new Invenio."""

from __future__ import absolute_import, print_function

from .ext import CdsMigratorKit
from .version import __version__

__all__ = ('__version__', 'CdsMigratorKit')
__all__ = ("__version__", "CdsMigratorKit")

__version__ = "0.1.0.dev20180000"
4 changes: 1 addition & 3 deletions cds_migrator_kit/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@

"""CDS Migrator Development instance entrypoint."""

from __future__ import absolute_import, print_function

from flask import Flask
from flask_babelex import Babel
from flask_babel import Babel

from cds_migrator_kit import CdsMigratorKit
from cds_migrator_kit.records.views import blueprint
Expand Down
8 changes: 4 additions & 4 deletions cds_migrator_kit/circulation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ def circulation():


@circulation.command()
@click.argument('users_json', type=click.Path(exists=True))
@click.argument("users_json", type=click.Path(exists=True))
@with_appcontext
def borrowers(users_json):
"""Load users from JSON files and output ILS Records."""
users(users_json)


@circulation.command()
@click.argument('libraries_json', type=click.Path(exists=True))
@click.argument("libraries_json", type=click.Path(exists=True))
@with_appcontext
def libraries(libraries_json):
"""Load libraries from JSON files and output ILS Records."""
libraries(libraries_json)


@circulation.command()
@click.argument('items_json_folder', type=click.Path(exists=True))
@click.argument('locations_json', type=click.Path(exists=True))
@click.argument("items_json_folder", type=click.Path(exists=True))
@click.argument("locations_json", type=click.Path(exists=True))
@with_appcontext
def items(items_json_folder, locations_json):
"""Load items from JSON files.
Expand Down
Loading