Skip to content

Commit 648b123

Browse files
PaulinaLachDiego Rodriguez
authored andcommitted
global: release checklist
* FIX Adds changes according to release preparation checklist. * FIX Pins elasticsearch-dsl to less than 5.1.0 due to change in Response class constructor signature. (addresses inveniosoftware#96) Signed-off-by: Paulina Lach <[email protected]> Co-authored-by: Diego Rodriguez <[email protected]>
1 parent c5405ff commit 648b123

15 files changed

+125
-38
lines changed

.editorconfig

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
#
33
# This file is part of Invenio.
4-
# Copyright (C) 2015, 2016 CERN.
4+
# Copyright (C) 2015, 2016, 2017 CERN.
55
#
66
# Invenio is free software; you can redistribute it
77
# and/or modify it under the terms of the GNU General Public License as
@@ -37,9 +37,10 @@ charset = utf-8
3737
indent_size = 4
3838
# isort plugin configuration
3939
known_first_party = invenio_search
40-
known_third_party = invenio_accounts, invenio_db, invenio_records
40+
known_third_party = invenio_query_parser
4141
multi_line_output = 2
4242
default_section = THIRDPARTY
43+
skip = .eggs
4344

4445
# RST files (used by sphinx)
4546
[*.rst]

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
__pycache__/
33
*.py[cod]
44

5+
# Idea software family
6+
.idea/
7+
58
# C extensions
69
*.so
710

@@ -54,3 +57,6 @@ docs/_build/
5457

5558
# PyBuilder
5659
target/
60+
61+
# Vim swapfiles
62+
.*.sw?

INSTALL.rst

+6
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
Installation
22
============
3+
4+
Invenio-Search is on PyPI so all you need is:
5+
6+
.. code-block:: console
7+
8+
$ pip install invenio-search

MANIFEST.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
#
33
# This file is part of Invenio.
4-
# Copyright (C) 2015 CERN.
4+
# Copyright (C) 2015, 2017 CERN.
55
#
66
# Invenio is free software; you can redistribute it
77
# and/or modify it under the terms of the GNU General Public License as
@@ -33,6 +33,7 @@ include LICENSE
3333
include MAINTAINERS
3434
include pytest.ini
3535
include tests/data/records/authorities/notajson
36+
prune docs/_build
3637
recursive-include docs *.bat *.py *.rst Makefile
3738
recursive-include examples *.json *.py *.sh *.txt
3839
recursive-include invenio_search *.py

docs/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ qthelp:
8787
@echo
8888
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
8989
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
90-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cookiecutterproject_name.qhcp"
90+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Invenio-Search.qhcp"
9191
@echo "To view the help file:"
92-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cookiecutterproject_name.qhc"
92+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Invenio-Search.qhc"
9393

9494
applehelp:
9595
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@@ -104,8 +104,8 @@ devhelp:
104104
@echo
105105
@echo "Build finished."
106106
@echo "To view the help file:"
107-
@echo "# mkdir -p $$HOME/.local/share/devhelp/cookiecutterproject_name"
108-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cookiecutterproject_name"
107+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Invenio-Search"
108+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Invenio-Search"
109109
@echo "# devhelp"
110110

111111
epub:

docs/api.rst

-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ API Docs
2828
.. automodule:: invenio_search.api
2929
:members:
3030

31-
Configuration
32-
-------------
33-
34-
.. automodule:: invenio_search.config
35-
:members:
36-
3731
Utilities
3832
---------
3933

docs/conf.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
#
33
# This file is part of Invenio.
4-
# Copyright (C) 2015, 2016 CERN.
4+
# Copyright (C) 2015, 2016, 2017 CERN.
55
#
66
# Invenio is free software; you can redistribute it
77
# and/or modify it under the terms of the GNU General Public License as
@@ -22,13 +22,19 @@
2222
# waive the privileges and immunities granted to it by virtue of its status
2323
# as an Intergovernmental Organization or submit itself to any jurisdiction.
2424

25+
"""Sphinx configuration."""
26+
2527
from __future__ import print_function
2628

2729
import os
30+
import sys
2831

2932
import sphinx.environment
3033
from docutils.utils import get_source_line
3134

35+
# Plug example application into module path
36+
sys.path.append('examples')
37+
3238
# -- General configuration ------------------------------------------------
3339

3440
# If your documentation needs a minimal Sphinx version, state it here.

docs/configuration.rst

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
..
2+
This file is part of Invenio.
3+
Copyright (C) 2017 CERN.
4+
5+
Invenio is free software; you can redistribute it
6+
and/or modify it under the terms of the GNU General Public License as
7+
published by the Free Software Foundation; either version 2 of the
8+
License, or (at your option) any later version.
9+
10+
Invenio is distributed in the hope that it will be
11+
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with Invenio; if not, write to the
17+
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18+
MA 02111-1307, USA.
19+
20+
In applying this license, CERN does not
21+
waive the privileges and immunities granted to it by virtue of its status
22+
as an Intergovernmental Organization or submit itself to any jurisdiction.
23+
24+
25+
Configuration
26+
=============
27+
28+
.. automodule:: invenio_search.config
29+
:members:

docs/examplesapp.rst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
..
2+
This file is part of Invenio.
3+
Copyright (C) 2017 CERN.
4+
5+
Invenio is free software; you can redistribute it
6+
and/or modify it under the terms of the GNU General Public License as
7+
published by the Free Software Foundation; either version 2 of the
8+
License, or (at your option) any later version.
9+
10+
Invenio is distributed in the hope that it will be
11+
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with Invenio; if not, write to the
17+
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18+
MA 02111-1307, USA.
19+
20+
In applying this license, CERN does not
21+
waive the privileges and immunities granted to it by virtue of its status
22+
as an Intergovernmental Organization or submit itself to any jurisdiction.
23+
24+
25+
Example application
26+
===================
27+
28+
.. automodule:: app

docs/index.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
..
22
This file is part of Invenio.
3-
Copyright (C) 2015, 2016 CERN.
3+
Copyright (C) 2015, 2016, 2017 CERN.
44
55
Invenio is free software; you can redistribute it
66
and/or modify it under the terms of the GNU General Public License as
@@ -34,7 +34,9 @@ Invenio-Search.
3434
:maxdepth: 2
3535

3636
installation
37+
configuration
3738
usage
39+
examplesapp
3840

3941

4042
API Reference

docs/make.bat

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ if "%1" == "qthelp" (
127127
echo.
128128
echo.Build finished; now you can run "qcollectiongenerator" with the ^
129129
.qhcp project file in %BUILDDIR%/qthelp, like this:
130-
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\cookiecutterproject_name.qhcp
130+
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Invenio-Search.qhcp
131131
echo.To view the help file:
132-
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\cookiecutterproject_name.ghc
132+
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Invenio-Search.ghc
133133
goto end
134134
)
135135

invenio_search/config.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# This file is part of Invenio.
44
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012, 2013,
5-
# 2015, 2016 CERN.
5+
# 2015, 2016, 2017 CERN.
66
#
77
# Invenio is free software; you can redistribute it
88
# and/or modify it under the terms of the GNU General Public License as
@@ -25,20 +25,20 @@
2525

2626
"""Invenio Search Engine config parameters."""
2727

28-
# SEARCH_ALLOWED_KEYWORDS -- a list of allowed keywords for the query parser.
2928
SEARCH_ALLOWED_KEYWORDS = []
30-
29+
"""A list of allowed keywords for the query parser."""
3130

3231
#
3332
# ELASTIC configuration
3433
#
3534

36-
# SEARCH_ELASTIC_HOSTS -- list of hosts for Elasticsearch client.
37-
# http://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch
3835
SEARCH_ELASTIC_HOSTS = None # default localhost
36+
"""List of hosts for Elasticsearch client.
37+
38+
Elasticsearch
39+
<https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch>
40+
"""
3941

40-
# SEARCH_ELASTIC_KEYWORD_MAPPING -- this variable holds a dictionary to map
41-
# invenio keywords to elasticsearch fields
4242
SEARCH_ELASTIC_KEYWORD_MAPPING = {
4343
None: ["_all"],
4444
"author": {
@@ -59,3 +59,4 @@
5959
"980__b": ["collections.secondary"],
6060
"542__l": ["information_relating_to_copyright_status.copyright_status"],
6161
}
62+
"""Holds a dictionary to map invenio keywords to elasticsearch fields."""

setup.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ all_files = 1
3333

3434
[bdist_wheel]
3535
universal = 1
36+
37+
[pydocstyle]
38+
add_ignore = D401

setup.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848

4949
extras_require = {
5050
'docs': [
51-
"Sphinx>=1.4.2",
51+
'Sphinx>=1.5.6,<1.6',
52+
'invenio-accounts>=1.0.0b1',
5253
],
5354
'records': [
5455
'invenio-records>=1.0.0a4',
@@ -68,11 +69,12 @@
6869

6970
install_requires = [
7071
'Flask>=0.11.1',
72+
'Flask-Security>=1.7.5',
7173
'pyPEG2>=2.15.2',
7274
# NOTE: Overlays have to choose which elasticsearch version they want to
7375
# use and pin both elasticsearch and elasticsearch-dsl libraries.
7476
'elasticsearch>=2.0.0,<6.0',
75-
'elasticsearch-dsl>=2.0.0,<6.0',
77+
'elasticsearch-dsl>=2.0.0,<5.1.0',
7678
'invenio-query-parser>=0.4.1',
7779
'requests>=2.4.0',
7880
]
@@ -90,7 +92,7 @@
9092
version=version,
9193
description=__doc__,
9294
long_description=readme + '\n\n' + history,
93-
keywords='invenio TODO',
95+
keywords='invenio search',
9496
license='GPLv2',
9597
author='CERN',
9698
author_email='[email protected]',
@@ -100,10 +102,10 @@
100102
include_package_data=True,
101103
platforms='any',
102104
entry_points={
103-
'invenio_base.apps': [
105+
'invenio_base.api_apps': [
104106
'invenio_search = invenio_search:InvenioSearch',
105107
],
106-
'invenio_base.api_apps': [
108+
'invenio_base.apps': [
107109
'invenio_search = invenio_search:InvenioSearch',
108110
],
109111
},
@@ -125,6 +127,6 @@
125127
'Programming Language :: Python :: 3.5',
126128
'Programming Language :: Python :: Implementation :: CPython',
127129
'Programming Language :: Python :: Implementation :: PyPy',
128-
'Development Status :: 3 - Alpha',
130+
'Development Status :: 4 - Beta',
129131
],
130132
)

tests/test_examples_app.py

+16-8
Original file line numberDiff line numberDiff line change
@@ -37,38 +37,46 @@
3737
def example_app():
3838
"""Example app fixture."""
3939
current_dir = os.getcwd()
40-
# go to example directory
40+
41+
# Go to example directory
4142
project_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
4243
exampleappdir = os.path.join(project_dir, 'examples')
4344
os.chdir(exampleappdir)
44-
# setup example
45+
46+
# Setup example
4547
cmd = './app-setup.sh'
4648
exit_status = subprocess.call(cmd, shell=True)
4749
assert exit_status == 0
50+
4851
# Starting example web app
4952
cmd = 'FLASK_APP=app.py flask run --debugger -p 5000'
5053
webapp = subprocess.Popen(cmd, stdout=subprocess.PIPE,
5154
preexec_fn=os.setsid, shell=True)
5255
time.sleep(10)
53-
# return webapp
56+
57+
# Return webapp
5458
yield webapp
55-
# stop server
59+
60+
# Stop server
5661
os.killpg(webapp.pid, signal.SIGTERM)
57-
# tear down example app
62+
63+
# Tear down example app
5864
cmd = './app-teardown.sh'
5965
subprocess.call(cmd, shell=True)
60-
# return to the original directory
66+
67+
# Return to the original directory
6168
os.chdir(current_dir)
6269

6370

6471
def test_example_app(example_app):
6572
"""Test example app."""
66-
# load fixtures
73+
# Load fixtures
6774
cmd = './app-fixtures.sh'
6875
exit_status = subprocess.call(cmd, shell=True)
6976
assert exit_status == 0
7077
time.sleep(10)
71-
# open page
78+
79+
# Open page
7280
cmd = 'curl http://localhost:5000/?q=body:test'
7381
output = json.loads(
7482
subprocess.check_output(cmd, shell=True).decode('utf-8'))

0 commit comments

Comments
 (0)