Code Monkey home page Code Monkey logo

invenio-ext's People

Contributors

crepererum avatar danmichaelo avatar drjova avatar egabancho avatar greut avatar helix84 avatar jalavik avatar jirikuncar avatar jma avatar jmartinm avatar jochenklein avatar jstypka avatar kaplun avatar kneczaj avatar konstantinoskostis avatar letreguilly avatar lnielsen avatar ludmilamarian avatar noumar avatar pamfilos avatar pedrogaudencio avatar pxke avatar romanchyla avatar samihiltunen avatar tiborsimko avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

invenio-ext's Issues

restful: setup_app wrong arguments

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.

legacy: remove precached values for logged in user

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:

  • invenio-deposit/invenio_deposit/models.py

564: auth_types = user_info.get('precached_allowed_deposition_types', set())

  • invenio-deposit/invenio_deposit/restful.py

158: return type_ in current_user.get('precached_allowed_deposition_types', [])

  • invenio-search/invenio_search/facet_builders.py

61: current_user.get('precached_permitted_restricted_collections', []),

  • invenio-search/invenio_search/enhancers/collection_filter.py

111: 'precached_permitted_restricted_collections', [])

  • invenio-formatter/invenio_formatter/templates/format/record/Default_HTML_MARC.tpl

20:<pre>{{ tfn_get_fieldvalues_alephseq_like(recid, [], current_user.get('precached_canseehiddenmarctags', False))|safe }}</pre>

  • invenio-formatter/invenio_formatter/templates/format/record/Default_text_MARC.tpl

1:{{ tfn_get_fieldvalues_alephseq_like(recid, [], current_user.get('precached_canseehiddenmarctags', False))|safe }}

@jirikuncar

remove mysql from direct dependencies

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

sqlalchemy `todict` intbitset conversion fails on infinite sets

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?

setup: Flask-OAuthlib version too low

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']))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.