Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global: module refactoring #18

Merged
merged 1 commit into from
Oct 26, 2015
Merged

Conversation

krzysztof
Copy link
Member

This PR, addresses Issue #19


from invenio_base.globals import cfg
from invenio_ext.sqlalchemy import db
from invenio_utils.text import to_unicode
Copy link
Member Author

Choose a reason for hiding this comment

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

I will have to rely on invenio_utils, is this OK or should I find equivalent method in some other available libs ? @lnielsen

Copy link
Member

Choose a reason for hiding this comment

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

We can't use invenio utils. Perhaps you can use another library or simply copy the code into the library.

Copy link
Member

Choose a reason for hiding this comment

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

six.text_type should to the work

Copy link
Member Author

Choose a reason for hiding this comment

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

six.text_type(foo) seems to work. It does not support accents, but I think I can assume pid_value and object_value won't contain any.

@jirikuncar jirikuncar changed the title global: new module (WIP) WIP global: new module Oct 18, 2015
@@ -1,15 +0,0 @@
.git
Copy link
Member

Choose a reason for hiding this comment

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

This file should not be removed (i.e. use the one generated by cookiecutter). Probably missing to copy the dot files when overwriting the old code?

@lnielsen
Copy link
Member

@kiryx Good job! It's not an easy task to jump onto a module like this as the first thing. Don't despair from the number of comments - it's all minor things and not easy to know.

from werkzeug.utils import import_string
from werkzeug.local import LocalProxy

__all__ = ["pidproviders", ]
Copy link
Member

Choose a reason for hiding this comment

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

__all__ = ('pidproviders', )

@krzysztof
Copy link
Member Author

From the comments above what is still to be done:

  • Upgrades
  • Using Timestamp changed column name from last_modified to updated
  • doi_link template filter
  • Tests don't pass on Python3 for now
  • Using mock library for testing
  • Circular dependency in registry._collect_providers.py

@krzysztof krzysztof changed the title WIP global: new module global: module refactoring Oct 26, 2015
* INCOMPATIBLE Refactoring and column name change for pidSTORE table.
* Added unit tests for models and PID providers.

Signed-off-by: Krzysztof Nowak <k.nowak@cern.ch>
@lnielsen lnielsen merged commit 1dd2e01 into inveniosoftware:next Oct 26, 2015
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.

None yet

3 participants