inveniosoftware-attic / invenio-ext Goto Github PK
View Code? Open in Web Editor NEWInvenio module that provides integration with Flask extensions.
License: GNU General Public License v2.0
Invenio module that provides integration with Flask extensions.
License: GNU General Public License v2.0
invenio
If the restful extension is enabled I get the following error:
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2666, in load_entry_point
18:29:11 web.1 | return ep.load()
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2339, in load
18:29:11 web.1 | return self.resolve()
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2345, in resolve
18:29:11 web.1 | module = __import__(self.module_name, fromlist=['__name__'], level=0)
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/src/invenio-base/invenio_base/manage.py", line 28, in <module>
18:29:11 web.1 | manager = Manager(create_app(), with_default_commands=False)
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/src/invenio-base/invenio_base/factory.py", line 279, in create_app
18:29:11 web.1 | extensions=ExtensionRegistry(app),
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/flask_registry/registries/appdiscovery.py", line 153, in __init__
18:29:11 web.1 | self.register(app, ext_name)
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/flask_registry/registries/appdiscovery.py", line 166, in register
18:29:11 web.1 | ext(app)
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/src/invenio-ext/invenio_ext/restful/__init__.py", line 344, in setup_app
18:29:11 web.1 | 'restful', app=app, with_setup=True
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/flask_registry/registries/modulediscovery.py", line 254, in __init__
18:29:11 web.1 | self.discover(app=app)
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/flask_registry/registries/modulediscovery.py", line 175, in discover
18:29:11 web.1 | self._discover_module(pkg)
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/flask_registry/registries/modulediscovery.py", line 186, in _discover_module
18:29:11 web.1 | self.register(module)
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/src/invenio-ext/invenio_ext/restful/__init__.py", line 341, in register
18:29:11 web.1 | *args, **kwargs)
18:29:11 web.1 | File "/Users/jmartinm/.virtualenvs/inspire-latest-packagesv3/lib/python2.7/site-packages/flask_registry/registries/core.py", line 354, in register
18:29:11 web.1 | setup_func(*args, **kwargs)
18:29:11 web.1 | TypeError: setup_app() takes exactly 1 argument (2 given)
which seems to be caused by passing the api
parameter here which is not expected in the setup_app()
function.
Can we remove the precached values?
I found a message compatibility layer only
. They are still necessary or we can simply remove them?
I found they are used here:
564: auth_types = user_info.get('precached_allowed_deposition_types', set())
158: return type_ in current_user.get('precached_allowed_deposition_types', [])
61: current_user.get('precached_permitted_restricted_collections', []),
111: 'precached_permitted_restricted_collections', [])
20:<pre>{{ tfn_get_fieldvalues_alephseq_like(recid, [], current_user.get('precached_canseehiddenmarctags', False))|safe }}</pre>
1:{{ tfn_get_fieldvalues_alephseq_like(recid, [], current_user.get('precached_canseehiddenmarctags', False))|safe }}
If the db is up to the app developer, then including mysql-python as a dependency is a problem since for the build to be successful, mysql needs to be installed on the machine, otherwise you'll get this error.
Collecting MySQL-python>=1.2.5 (from invenio-ext>=0.1.0->invenio-access->hepdata==2.0.0.dev20150000)
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-GSqXWu/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-GSqXWu/MySQL-python/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-GSqXWu/MySQL-python/setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Given an infinite intbitset
,
intbitset(trailing_bits=True)
and this SQLAlchemy type,
class IntBitSetType(types.TypeDecorator):
impl = types.BLOB
def process_bind_param(self, value, dialect):
if value is None:
return None
return intbitset(value).fastdump()
def process_result_value(self, value, dialect):
if value is None:
return None
return intbitset(value)
calling dict()
on an instance that contains it, raises this exception:
...
File "/home/gs-sis/.virtualenvs/invenio/src/invenio-checker/invenio_checker/views/admin.py", line 201, in get_tasks_data
rule_d = dict(rule)
File "/home/gs-sis/.virtualenvs/invenio/src/invenio/invenio/ext/sqlalchemy/utils.py", line 116, in todict
value = value.tolist()
File "intbitset.pyx", line 770, in intbitset.intbitset.tolist (intbitset/intbitset.c:12711)
File "intbitset.pyx", line 775, in intbitset.intbitset.tolist (intbitset/intbitset.c:12641)
OverflowError: It's impossible to retrieve a list of an infinite set
intbitset
behaves reasonably here, but this conversion was not asked for. Why are these conversions forced in todict
?
Do we have a common way to deprecate packages?
Flask-OAuthlib>=0.6.0,<0.7
On the travis build, without pinning, 0.9.3 is installed since this is what is required by the oauth libs.
Requirement.parse('Flask-OAuthlib>=0.9.3'), set(['invenio-oauth2server', 'invenio-oauthclient']))
pkg_resources.ContextualVersionConflict:
(Flask-OAuthlib 0.9.3 (/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages),
Requirement.parse('Flask-OAuthlib<0.7,>=0.6.0'), set(['invenio-ext']))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.