Skip to content

Conversation

@krzysztof
Copy link
Member

  • Delays the url_map building until first resolve request.

@krzysztof
Copy link
Member Author

@jirikuncar Will this introduce any problems ?

I need this to build url_map where the path or host may contain config variables, e.g.: https://github.com/lnielsen/invenio-jsonschemas/blob/jsonresolver/invenio_jsonschemas/jsonresolver.py#L34-L43

@jirikuncar jirikuncar changed the title global: WIP delay the url_map building WIP global: delay the url_map building Dec 10, 2015
@jirikuncar jirikuncar added this to the v0.1.1 milestone Dec 10, 2015
@jirikuncar
Copy link
Member

@krzysztof it looks good. Please add label BETTER, sign your commit, add yourself to AUTHORS, and add a test-case that check this behavior (instantiate JSONResolver, check url_map to be None, resolve(), and url_map is not None). Thanks

update: even better check that your plugin was not called during JSONResolver.init

@krzysztof krzysztof changed the title WIP global: delay the url_map building global: delay the url_map building Dec 11, 2015
@krzysztof
Copy link
Member Author

Ready
Python 3 problems
Ready

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it probably needs isort

@krzysztof
Copy link
Member Author

  • Fixed isort
  • Renamed exception
  • added top-level endpoint

@krzysztof
Copy link
Member Author

Wait, this test is still wrong...

@krzysztof
Copy link
Member Author

Ok, this one should test the lazy hook registration properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the dead code

@jirikuncar
Copy link
Member

@krzysztof it looks good now. Please remove dead code so we can :shipit: Thanks!

@jirikuncar jirikuncar assigned jirikuncar and unassigned krzysztof Dec 11, 2015
* BETTER Delays the url_map building until first resolve request.

* Adds some missing docstrings.

Signed-off-by: Krzysztof Nowak <k.nowak@cern.ch>
@krzysztof
Copy link
Member Author

Removed dead code

@krzysztof krzysztof mentioned this pull request Dec 11, 2015
@jirikuncar jirikuncar merged commit 197ca0d into inveniosoftware:master Dec 11, 2015
@krzysztof krzysztof deleted the lazy_url_map branch December 14, 2015 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants