inspirehep / invenio-grobid

Invenio package for integration of the Grobid metadata extraction service
GNU General Public License v2.0
4 stars 3 forks source link

WIP Add Travis support #4

Closed jacquerie closed 8 years ago

jacquerie commented 8 years ago

Probably not going to work.

jacquerie commented 8 years ago

Mh. Apparently Travis has trouble reading from Invenio's configuration, and thinks cfg.get('GROBID_HOST') is None: https://travis-ci.org/inspirehep/invenio-grobid/jobs/80720351#L1283. I'm not sure what the fix is here. Maybe a terrible inveniomanage config set GROBID_HOST http://localhost:8080?

jalavik commented 8 years ago

The config issue is due to invenio_grobid missing in PACKAGES, so somehow it needs to be added there. We could do it like invenio-utils module: https://github.com/inveniosoftware/invenio-utils/blob/master/.travis.invenio.cfg and https://github.com/inveniosoftware/invenio-utils/blob/master/.travis.yml#L51-L52

Flask-Testing should be part of test_requirements here https://github.com/inspirehep/invenio-grobid/blob/master/setup.py#L42-L47. See e.g. https://github.com/inveniosoftware/invenio-workflows/blob/master/setup.py#L44-L51

jacquerie commented 8 years ago

This has turned out to be a much tougher nut to crack. The closest I've got is here: https://travis-ci.org/inspirehep/invenio-grobid/jobs/80844147, where tests in test_api.py pass, but tests in test_views.py fail. In particular this is caused by url_for failing on webaccount.login, which requires invenio-accounts to work.

Just adding it is not enough: we actually need to create the user in order to be able to login, so inveniomanage has to work, which means we have to have invenio_base. Adding that results into some import error, probably due to some dependency hell generated by its separation.

jalavik commented 8 years ago

Anyway for configuration and all registries to work, we better include invenio_base in PACKAGES anyhow. That said, we do not need to go out of our way to test the views if it is causing this much trouble. In addition, likely the views are subject to change heavily. We could revisit it later.

jacquerie commented 8 years ago

Even reverting to the previous working state required some work. Well, now it is green, but we should really find a way to test views behind authentication.