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

global: manage flask dependency centrally #183

Merged
merged 2 commits into from Mar 17, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 11 additions & 16 deletions .travis.yml
Expand Up @@ -15,12 +15,9 @@ addons:
notifications:
email: false

sudo: false

services:
- mysql
- postgresql
- rabbitmq

language: python

Expand All @@ -34,20 +31,15 @@ env:
- ES7_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-linux-x86_64.tar.gz"
- ES_HOST=127.0.0.1
matrix:
# ES5 + MySQL
- REQUIREMENTS=lowest EXTRAS=all,mysql,elasticsearch5 SQLALCHEMY_DATABASE_URI="mysql+pymysql://travis@localhost:3306/invenio" ES_URL=$ES5_DOWNLOAD_URL
# ES6 + MySQL
- REQUIREMENTS=release EXTRAS=all,mysql,elasticsearch6 SQLALCHEMY_DATABASE_URI="mysql+pymysql://travis@localhost:3306/invenio" ES_URL=$ES6_DOWNLOAD_URL
# ES7 + PostgreSQL
- REQUIREMENTS=release EXTRAS=all,postgresql,elasticsearch7 SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio" ES_URL=$ES7_DOWNLOAD_URL DEPLOY=true
# ES6 + PostgreSQL
- REQUIREMENTS=devel EXTRAS=all,postgresql,elasticsearch6 SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio" ES_URL=$ES6_DOWNLOAD_URL
# ES7 + PostgreSQL
- REQUIREMENTS=devel EXTRAS=all,postgresql,elasticsearch7 SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio" ES_URL=$ES7_DOWNLOAD_URL
- REQUIREMENTS=lowest EXTRAS=all,mysql,elasticsearch5 SQLALCHEMY_DATABASE_URI="mysql+pymysql://travis@localhost:3306/invenio" ES_URL=$ES5_DOWNLOAD_URL # ES5 + MySQL
- REQUIREMENTS=release EXTRAS=all,mysql,elasticsearch6 SQLALCHEMY_DATABASE_URI="mysql+pymysql://travis@localhost:3306/invenio" ES_URL=$ES6_DOWNLOAD_URL # ES6 + MySQL
- REQUIREMENTS=release EXTRAS=all,postgresql,elasticsearch7 SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio" ES_URL=$ES7_DOWNLOAD_URL DEPLOY=true # ES7 + PostgreSQL
- REQUIREMENTS=devel EXTRAS=all,postgresql,elasticsearch6 SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio" ES_URL=$ES6_DOWNLOAD_URL # ES6 + PostgreSQL
- REQUIREMENTS=devel EXTRAS=all,postgresql,elasticsearch7 SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio" ES_URL=$ES7_DOWNLOAD_URL # ES7 + PostgreSQL

python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"

matrix:
fast_finish: true
Expand All @@ -60,6 +52,7 @@ before_install:
- "mkdir /tmp/elasticsearch"
- "wget -O - ${ES_URL} | tar xz --directory=/tmp/elasticsearch --strip-components=1"
- "/tmp/elasticsearch/bin/elasticsearch > /tmp/local-es.log &"
- "pip freeze"
- "travis_retry pip install --upgrade pip setuptools py"
- "travis_retry pip install twine wheel coveralls requirements-builder"
- "requirements-builder -e $EXTRAS --level=min setup.py > .travis-lowest-requirements.txt"
Expand All @@ -71,6 +64,7 @@ before_install:
install:
- "travis_retry pip install -r .travis-${REQUIREMENTS}-requirements.txt"
- "travis_retry pip install -e .[${EXTRAS}]"
- "pip freeze"

before_script:
# Allow ES to start
Expand All @@ -91,8 +85,9 @@ deploy:
password:
secure: "aowAp1qLIDaS8ahzhEJ+Sn8zqaO2VWQHy59gp667V74zKOKC4KkgverwTQjuJ1h88+CirUbWd3G45FUFZMzxJFx4JhZFG8296jerXCZrwlpoTqjvZZUvZTFtPEu7rq837jYuhGQMaiZs86+CjusBd+Q+SZO0738+TeGuXQouAHCgz3F3CuGtF2TLrFACLccNkUer6lH9GTtSSOdETOx1OX9CoiFcqJmd45Ud1aWqh5dxFl+FMev5q7O3+K3P2lp1r1A9RHzqvDgbrhaC8DrCx8cVCq5dovJQBW5pJyebtzFtVKA1Bxqgu+3aonZY6XxReNRbkWhZIByp5+m46MgSgCcqftvMhbjBvCEo8bElRbQB7V9xgqOqMujwic/6o6lFgz9FH6CpRNg/3/KuheJUjjs2JN34Q6L/Qd0JeBlmDE22g4j1Q1vPHmi30tRKCgi5JSepI9BFKB1kXhTi5dTWJcm+tzHyp3Yle6KfkemLtwjzhTySrWWmuck6RbGiPchjy2xFpuuEL9KYbztP+LrPIcJYB1g8wdME8tYPUaqJqdOqKlYtcpCyHgZO0aYqI+HbUb9EPebSDZjQNBT+uAiC2A0ZhIS8OkPaLmT8L37A1AvGTAI4sT1cptL5CK/xX1TXUjwzIIzpxjWNceYJg0XTnU/3UGoGlfhD15pNLLLzgUM="
distributions: "compile_catalog sdist bdist_wheel"
skip_existing: true
on:
tags: true
python: "2.7"
python: "3.6"
repo: inveniosoftware/invenio-oaiserver
condition: $DEPLOY = true
7 changes: 6 additions & 1 deletion CHANGES.rst
@@ -1,13 +1,18 @@
..
This file is part of Invenio.
Copyright (C) 2016-2019 CERN.
Copyright (C) 2016-2020 CERN.

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.

Changes
=======

Version 1.2.0 (released 2020-03-17)

- Removes support for python 2.7
- Centralises management of Flask dependency via invenio-base

Version 1.1.2 (released 2019-07-19)

- fixes default config OAISERVER_QUERY_PARSER_FIELDS
Expand Down
2 changes: 0 additions & 2 deletions invenio_oaiserver/percolator.py
Expand Up @@ -167,5 +167,3 @@ def get_record_sets(record):
if set_name.startswith(prefix):
name = set_name[prefix_len:]
yield name

raise StopIteration
2 changes: 1 addition & 1 deletion invenio_oaiserver/query.py
Expand Up @@ -58,7 +58,7 @@ def get_affected_records(spec=None, search_pattern=None):
# X Y X OR Y

if spec is None and search_pattern is None:
raise StopIteration
return

queries = []

Expand Down
4 changes: 2 additions & 2 deletions invenio_oaiserver/version.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2019 CERN.
# Copyright (C) 2015-2020 CERN.
#
# 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 @@ -14,4 +14,4 @@

from __future__ import absolute_import, print_function

__version__ = '1.1.2'
__version__ = '1.2.0'
1 change: 1 addition & 0 deletions requirements-devel.txt
Expand Up @@ -11,3 +11,4 @@
-e git+git://github.com/inveniosoftware/invenio-records.git#egg=invenio-records
-e git+git://github.com/inveniosoftware/invenio-pidstore.git#egg=invenio-pidstore
-e git+git://github.com/inveniosoftware/invenio-search.git#egg=invenio-search
-e git+https://github.com/inveniosoftware/invenio-base.git#egg=invenio-base
23 changes: 11 additions & 12 deletions setup.py
Expand Up @@ -16,11 +16,11 @@
history = open('CHANGES.rst').read()

tests_require = [
'SQLAlchemy-Continuum>=1.2.1',
'SQLAlchemy-Continuum>=1.3.6',
'check-manifest>=0.25',
'coverage>=4.0',
'invenio-indexer>=1.1.0',
'invenio-jsonschemas>=1.0.0',
'invenio-jsonschemas>=1.1.0',
'invenio-marc21>=1.0.0a9',
'isort>=4.2.2',
'mock>=1.3.0',
Expand All @@ -34,10 +34,10 @@

extras_require = {
'admin': [
'Flask-Admin>=1.3.0',
'invenio-admin>=1.2.0',
],
'celery': [
'invenio-celery>=1.1.1',
'invenio-celery>=1.2.0',
],
'docs': [
'Sphinx>=1.6.7',
Expand All @@ -60,7 +60,7 @@
'invenio-db[mysql]>=1.0.0',
],
'postgresql': [
'invenio-db[postgresql]>=1.0.0',
'invenio-db[postgresql]>=1.0.4',
],
'sqlite': [
'invenio-db>=1.0.0',
Expand All @@ -84,14 +84,13 @@

install_requires = [
'arrow>=0.13.0',
'Flask>=0.11.1',
'Werkzeug>=0.14.1',
'Flask-BabelEx>=0.9.3',
'dojson>=1.3.0',
'invenio-pidstore>=1.0.0',
'invenio-records>=1.0.0',
'invenio-rest>=1.1.1',
'lxml>=3.5.0',
'invenio-base>=1.2.2',
'invenio-i18n>=1.2.0',
'invenio-pidstore>=1.2.0',
'invenio-records>=1.3.0',
'invenio-rest>=1.2.0',
'lxml>=4.3.0',
]

packages = find_packages()
Expand Down