Skip to content

Commit

Permalink
Merge 39d5f33 into a2a35c0
Browse files Browse the repository at this point in the history
  • Loading branch information
alizeepace committed Sep 15, 2016
2 parents a2a35c0 + 39d5f33 commit 4adcbbe
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 166 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ env:

python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "pypy"

matrix:
fast_finish: true
allow_failures:
- python: pypy

before_install:
- "travis_retry pip install --upgrade pip setuptools py"
Expand Down
50 changes: 0 additions & 50 deletions .tx/config

This file was deleted.

1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ Indexer for Invenio.
- Jiri Kuncar <jiri.kuncar@cern.ch>
- Leonardo Rossi <leonardo.r@cern.ch>
- Javier Martin Montull <javier.martin.montull@cern.ch>
- Alizee Pace <alizee.pace@gmail.com>
3 changes: 0 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ include *.sh
include *.txt
include .dockerignore
include .editorconfig
include .tx/config
include babel.ini
include LICENSE
include pytest.ini
recursive-include docs *.bat
Expand All @@ -38,7 +36,6 @@ recursive-include docs Makefile
recursive-include examples *.json
recursive-include examples *.py
recursive-include examples *.sh
recursive-include invenio_indexer *.po *.pot *.mo
recursive-include invenio_indexer *.py
recursive-include tests *.json
recursive-include tests *.py
40 changes: 0 additions & 40 deletions babel.ini

This file was deleted.

11 changes: 8 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@
'github_banner': True,
'show_powered_by': False,
'extra_nav_links': {
'invenio-indexer@GitHub': 'http://github.com/inveniosoftware/invenio-indexer',
'invenio-indexer@PyPI': 'http://pypi.python.org/pypi/invenio-indexer/',
'invenio-indexer@GitHub': 'https://github.com/inveniosoftware/invenio-indexer',
'invenio-indexer@PyPI': 'https://pypi.python.org/pypi/invenio-indexer/',
}
}

Expand Down Expand Up @@ -328,4 +328,9 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {
'python': ('https://docs.python.org/', None),
'kombu': ('http://docs.celeryproject.org/projects/kombu/en/latest/', None),
}
# Autodoc configuraton.
autoclass_content = 'both'
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ User's Guide
------------

This part of the documentation will show you how to get started in using
Invenio-Base.
Invenio-Indexer.

.. toctree::
:maxdepth: 2
Expand Down
2 changes: 0 additions & 2 deletions examples/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@

from flask import Flask
from flask_celeryext import FlaskCeleryExt
from flask_cli import FlaskCLI
from invenio_db import InvenioDB, db
from invenio_records import InvenioRecords
from invenio_records.api import Record
Expand All @@ -71,7 +70,6 @@
'sqlite:///app.db'),
)

FlaskCLI(app)
FlaskCeleryExt(app)
InvenioDB(app)
InvenioRecords(app)
Expand Down
5 changes: 1 addition & 4 deletions invenio_indexer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,11 @@
Initialization
--------------
First create a Flask application (Flask-CLI is not needed for Flask
version 1.0+):
First create a Flask application:
>>> from flask import Flask
>>> from flask_cli import FlaskCLI
>>> app = Flask('myapp')
>>> app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
>>> ext_cli = FlaskCLI(app)
You initialize Indexer like a normal Flask extension, however
Invenio-Indexer is dependent on Invenio-Records and Invenio-Search so you
Expand Down
2 changes: 1 addition & 1 deletion invenio_indexer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import click
from celery.messaging import establish_connection
from flask import current_app
from flask_cli import with_appcontext
from flask.cli import with_appcontext
from invenio_records.models import RecordMetadata
from invenio_search.cli import index

Expand Down
21 changes: 3 additions & 18 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,13 @@
# as an Intergovernmental Organization or submit itself to any jurisdiction.


[aliases]
test = pytest

[build_sphinx]
source-dir = docs/
build-dir = docs/_build
all_files = 1

[bdist_wheel]
universal = 1

[compile_catalog]
directory = invenio_indexer/translations/

[extract_messages]
copyright_holder = CERN
msgid_bugs_address = info@inveniosoftware.org
mapping-file = babel.ini
output-file = invenio_indexer/translations/messages.pot
add-comments = NOTE

[init_catalog]
input-file = invenio_indexer/translations/messages.pot
output-dir = invenio_indexer/translations/

[update_catalog]
input-file = invenio_indexer/translations/messages.pot
output-dir = invenio_indexer/translations/
47 changes: 8 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
"""Indexer for Invenio."""

import os
import sys

from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

readme = open('README.rst').read()
history = open('CHANGES.rst').read()
Expand Down Expand Up @@ -58,7 +56,12 @@
for reqs in extras_require.values():
extras_require['all'].extend(reqs)

setup_requires = [
'pytest-runner>=2.6.2',
]

install_requires = [
'Flask>=0.11.1',
'celery>=3.1.19',
'invenio-records>=1.0.0a8',
'invenio-search>=1.0.0a4',
Expand All @@ -67,40 +70,6 @@

packages = find_packages()


class PyTest(TestCommand):
"""PyTest Test."""

user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]

def initialize_options(self):
"""Init pytest."""
TestCommand.initialize_options(self)
self.pytest_args = []
try:
from ConfigParser import ConfigParser
except ImportError:
from configparser import ConfigParser
config = ConfigParser()
config.read('pytest.ini')
self.pytest_args = config.get('pytest', 'addopts').split(' ')

def finalize_options(self):
"""Finalize pytest."""
TestCommand.finalize_options(self)
if hasattr(self, '_test_args'):
self.test_suite = ''
else:
self.test_args = []
self.test_suite = True

def run_tests(self):
"""Run tests."""
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)

# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join('invenio_indexer', 'version.py'), 'rt') as fp:
Expand Down Expand Up @@ -134,6 +103,7 @@ def run_tests(self):
},
extras_require=extras_require,
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
classifiers=[
'Environment :: Web Environment',
Expand All @@ -146,10 +116,9 @@ def run_tests(self):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Development Status :: 1 - Planning',
],
cmdclass={'test': PyTest},
)
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import pytest
from celery.messaging import establish_connection
from flask import Flask
from flask.cli import ScriptInfo
from flask_celeryext import FlaskCeleryExt
from flask_cli import FlaskCLI, ScriptInfo
from invenio_db import InvenioDB, db
from invenio_records import InvenioRecords
from invenio_search import InvenioSearch
Expand Down Expand Up @@ -62,7 +62,6 @@ def app(request):
SQLALCHEMY_TRACK_MODIFICATIONS=True,
TESTING=True,
)
FlaskCLI(app)
FlaskCeleryExt(app)
InvenioDB(app)
InvenioRecords(app)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from __future__ import absolute_import, print_function

from click.testing import CliRunner
from flask_cli import ScriptInfo
from flask.cli import ScriptInfo
from flask_sqlalchemy import models_committed
from invenio_db import db
from invenio_search.cli import index as cmd
Expand Down

0 comments on commit 4adcbbe

Please sign in to comment.